Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: martin1 on April 01, 2014, 04:59:20 pm

Title: Default diagram type for Objects/Instances
Post 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
Title: Re: Default diagram type for Objects/Instances
Post by: qwerty on April 01, 2014, 08:04:37 pm
Check the _defaultDiagramType property.

q.
Title: Re: Default diagram type for Objects/Instances
Post by: martin1 on April 01, 2014, 09:36:35 pm
Thanks, but how do I apply this to objects/instances?
Title: Re: Default diagram type for Objects/Instances
Post by: qwerty on April 02, 2014, 12:24:52 am
Oh, I see you already mentioned the property in your OP  :-[

Can't you apply this to an Object metaclass in your MDG?

q.
Title: Re: Default diagram type for Objects/Instances
Post by: martin1 on April 02, 2014, 05:26:00 pm
Quote
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
Title: Re: Default diagram type for Objects/Instances
Post by: qwerty on April 02, 2014, 07:48:04 pm
Your stereotype must extend Class and Object metaclasses. That should do.

q.

P.S. I found this bug report from 2010 in my mail:

Quote
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

Quote
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
Title: Re: Default diagram type for Objects/Instances
Post by: martin1 on April 02, 2014, 11:47:56 pm
Thanks, I checked that out, doesn't work. Maybe I did something wrong or the bug from 2010 is still in effect.

Martin
Title: Re: Default diagram type for Objects/Instances
Post by: qwerty on April 03, 2014, 12:32:05 am
I would have a look into your profile if it is not confidential.

q.
Title: Re: Default diagram type for Objects/Instances
Post by: martin1 on April 03, 2014, 04:03:25 pm
Thanks for your offer, but right now I cannot share it.