Book a Demo

Author Topic: Scripting : insert attribute in Model Document  (Read 2749 times)

Danny F

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Scripting : insert attribute in Model Document
« on: October 03, 2012, 07:36:59 pm »
Hi,

When creating a <<model document>> on a <<master document>> diagram you can drag and drop a package onto the model document.
(that package is then input to the RTF template)

In my script I access a <<model document>> with no attribute(s). (no packages)
My script needs to add an existing package as attribute.

I found no way of doing that ?

I'm working on the 'attributes' collection from the model document.
The only method I have is AddNew() - which creates a new package
How can I insert an existing package into the collection ?
OR How can I make the new package a 'link' to the existing package ?

thanks









« Last Edit: October 03, 2012, 07:37:32 pm by dannyf »
Reg.

Danny

Danny F

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Re: Scripting : insert attribute in Model Document
« Reply #1 on: October 18, 2012, 12:12:13 am »
TWIMC and just to communicate my solution to the problem.

you have to point the attribute.ClassifierID to the object_ID of the package (the package you want make an attribute in the <<model document>>)  

gr

Danny
Reg.

Danny