Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Ian Mitchell on October 15, 2019, 12:30:19 am

Title: When is an element 'embedded' ?
Post by: Ian Mitchell on October 15, 2019, 12:30:19 am
Does anyone know of a way to find out if a particular element is 'embedded' ?
The error message which comes up when I try to drop such an element into a diagram says "When dropping embedded elements (Ports, Object nodes etc.)..." which suggests that all elements of type 'Port' and  'Object Node' are automatically 'embedded' - it's just the 'etc' at the end of the message which worries me - are there more?
And are they a fixed set?
The EA15 help has some more examples of embedded element types: Parts, Pins and Parameter Sets (at https://www.sparxsystems.com/enterprise_architect_user_guide/15.0/automation/element2.html)

Title: Re: When is an element 'embedded' ?
Post by: qwerty on October 15, 2019, 12:46:05 am
I think it's hard coded in EA. Maybe they could replace the "etc." with the concrete list...

q.
Title: Re: When is an element 'embedded' ?
Post by: Ian Mitchell on October 15, 2019, 01:10:11 am
Well, you're a big help :-)
I think I've decided that it's hard-coded in EA.
I guess this means another afternoon of EA particle physics - throw stuff at it, see what bounces off, then work backwards to see what the rules are.
Unless anyone else has some more helpful suggestions ?

@Q - I'll re-post any initial conclusions for you to put into The Book
Title: Re: When is an element 'embedded' ?
Post by: qwerty on October 15, 2019, 02:19:50 am
Will do so :-)

q.
Title: Re: When is an element 'embedded' ?
Post by: philchudley on October 15, 2019, 10:57:38 pm
Hi All

I encountered this issue when writing my EA SafeDelete add in a few years ago. I could not find a definitive list, but through a bit of experimentation I found the following Object Types, simply tested with a switch case using element.Type:

Port
ActionPin
ProvidedInterface
RequiredInterface
ActivityParameter
ExpansionNode
ObjectNode
Part

This may provide a start for further investigations.

All the best

Phil
Title: Re: When is an element 'embedded' ?
Post by: qwerty on October 16, 2019, 12:17:08 am
It's on my list now.

q.