Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: ssands on December 30, 2015, 08:00:23 am

Title: Can't Change element type anymore
Post by: ssands on December 30, 2015, 08:00:23 am
I want to change an element type. I used to be able to do this rather easily.

according to the online Help (http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/changingobjecttype.html), I still should.

But I don't have that option anymore.

Any ideas?

(also, it would be really nice if this forum supported posting an image directly to the post. Having to upload an image somewhere and then paste a link is too obtrusive).
Title: Re: Can't Change element type anymore
Post by: qwerty on December 30, 2015, 08:17:10 am
From - to? Not all changes are possible.

If the menu entry is missing: check View/Perspectives/Menu - the most useless feature in EA.

q.
Title: Re: Can't Change element type anymore
Post by: ssands on December 30, 2015, 09:10:25 am
From - to? Not all changes are possible.

If the menu entry is missing: check View/Perspectives/Menu - the most useless feature in EA.

q.
I understand that not all changes are possible, but the menu entry is not visible (not even greyed out).

I checked check View/Perspectives/Menu and everything is checked (under Complete).

Do you see the option when you right click and element and select Advanced?

I am on the latest version:   V12.1 build 1225
Title: Re: Can't Change element type anymore
Post by: qwerty on December 30, 2015, 11:51:54 am
My build is 1224 and I see the menu under Element/Advanced. Has it ever been in the context menu?

q.
Title: Re: Can't Change element type anymore
Post by: ssands on December 30, 2015, 12:16:15 pm
My build is 1224 and I see the menu under Element/Advanced. Has it ever been in the context menu?

q.
I *thought* that is where I always found it. (I could be wrong though). It's on the main menu.

I'm just gonna blame holiday fatigue and assume it's me.  ;)
Title: Re: Can't Change element type anymore
Post by: Geert Bellekens on December 30, 2015, 03:06:36 pm
I can confirm that this option has never been on the context menu (to my knowledge anyway).

Geert
Title: Re: Can't Change element type anymore
Post by: YogaMatt on December 30, 2015, 10:09:58 pm
Element->Advanced->Change Type does not support, for example, changing Components to Packaging Components.
Would this particular example be possible to script?

Please would anyone be kind enough to give an example script?  ;)

If this example can be scripted, then
Title: Re: Can't Change element type anymore
Post by: Geert Bellekens on December 30, 2015, 10:19:54 pm
I think packaging components are a bit different because they are both package AND element.
You can script anything, but I think in this case you would have to create an entry in t_packages as well as changing the element type in  t_object.ObjectType

Geert

Title: Re: Can't Change element type anymore
Post by: qwerty on December 30, 2015, 10:30:52 pm
Geert is right. A Packaging Component is a plain package with t_package.NType == 20.

q.
Title: Re: Can't Change element type anymore
Post by: YogaMatt on December 31, 2015, 08:22:41 pm
Thank you both Geert and QWERTY. That makes sense.
I now understand that because the existing element (a component) is not a package, then one has to both change the existing element's object type, plus create a new entry in the t_packages table.
Just to confirm, both entries would have the same GUID?

PS How does one give positive Karma on this forum, in recognition of useful responses.
Title: Re: Can't Change element type anymore
Post by: qwerty on December 31, 2015, 09:08:46 pm
Yes. Just verified that.

q.
Title: Re: Can't Change element type anymore
Post by: RoyC on January 04, 2016, 10:54:55 am
>>  PS How does one give positive Karma on this forum, in recognition of useful responses.

Click on the 'Helpful' link just underneath the Karma line.