Book a Demo

Author Topic: How to create Composite through Automation  (Read 3250 times)

oliver2007

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
How to create Composite through Automation
« 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

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: How to create Composite through Automation
« Reply #1 on: May 06, 2008, 05:23:35 pm »

oliver2007

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: How to create Composite through Automation
« Reply #2 on: May 06, 2008, 05:32:28 pm »
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.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: How to create Composite through Automation
« Reply #3 on: May 06, 2008, 06:00:40 pm »
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.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: How to create Composite through Automation
« Reply #4 on: May 06, 2008, 10:01:55 pm »
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
No, you can't have it!