Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: oliver2007 on May 06, 2008, 01:43:30 pm
-
Hello,
Through the automation interface I create a diagram under an element. After creating the diagram I want to make the element a Composite.
I am able to to set the subtype of an existing element to 8 which should turn the element into a Composite. When I right click on the changed Element the Composite box is ticked.
But the Element does not work like a Composite the double click does not lead to the underlying diagram and the rendering of the element does not change.
Any suggestions?
Thanks
-
I think you have to set the diagram's ParentID to make the element behave like it should.
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1208414605/4#4
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1204640516/0#0
-
The Parent_ID is set to the element.
If I make the element Composite by hand, the element looks exactly the same in the database as the one created by automation.
-
I'm at my wit's end then. You'll have to wait for one of the big shots to find a solution. Or send a support request to Sparx, they usually give you an answer on the next (Australian) day.
-
There's a field in t_object called NType. [I think that's it, it's been a while.] For a Class, you need to set this to 8, rather than the default of 0. I am not sure whether these values are the same for all classifiers, but I suspect they are.
I do not know - actually I do not remember - if this can be set by any API call. It is worth trying the Subtype property, which maps to 0 for 'normal' classifiers.
HTH, David