Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: martin1 on April 01, 2014, 04:59:20 pm
-
Hi,
I know how to set the default diagram type for stereotypes (using the _defaultDiagramType attribute). Is there a way to specify the default diagram type for objects/instances created from my stereotypes? Currently this defaults to a "composite structure diagram".
Thanks
Martin
-
Check the _defaultDiagramType property.
q.
-
Thanks, but how do I apply this to objects/instances?
-
Oh, I see you already mentioned the property in your OP :-[
Can't you apply this to an Object metaclass in your MDG?
q.
-
Oh, I see you already mentioned the property in your OP :-[
Can't you apply this to an Object metaclass in your MDG?
q.
I already thought of doing so, but how do I relate the object metaclass to my stereotype? Just creating an object metaclass with the _defaultDiagramType attribute in my stereotype profile does not seem to be sufficient.
Martin
-
Your stereotype must extend Class and Object metaclasses. That should do.
q.
P.S. I found this bug report from 2010 in my mail:
EA Version: 7.5.850
EA Edition: Corporate Floating
EA Add In: No Add-In
Repository Type: MySQL
Operating System: Windows XP
Service Pack: 2
------------------------------------------------------------------------
-------
ISSUE DETAILS
Subject:
_defaultDiagramType not inherited
Details:
I have another issue with the MDG file. My metaclass has a
_defaultDiagramType which works correctly for extending stereotypes. In
my case I have an abstract stereotype Device which inherits to a couple
of other stereotypes (like DEV Display etc.). When I create a composite
diagram for the latter these are of type CompositeDiagram. So they do
not inherit the _defaultDiagramType.
and the last response
Hi Thomas,
Thank you for your note.
This behaviour is being investigated and we will provide you with a
further response as soon as possible. Your reference number for this
enquiry is 10086625.
Best Regards,
Simon Cotching
-
Thanks, I checked that out, doesn't work. Maybe I did something wrong or the bug from 2010 is still in effect.
Martin
-
I would have a look into your profile if it is not confidential.
q.
-
Thanks for your offer, but right now I cannot share it.