Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Stephen on March 17, 2004, 01:47:01 am

Title: Element Automation
Post by: Stephen on March 17, 2004, 01:47:01 am
To add new Element's through the automation interface it is neecessary to supply a type (string).
Is there an enum of permitted types or does the string just get stored regardless?
???
Title: Re: Element Automation
Post by: Stephen on March 17, 2004, 02:37:28 am
Tiny Documentation Bug (?)
Documentation for Collection.AddNew indicates two string parameters and lists [Type] above [Name].

Code samples "Add and Manage Elements" has example of
...
element = package.elements.AddNew("Login to Website", "UseCase")
...

which appears to use the parameters in the opposite order.
Code sample appears correct.

Still interested in the enum...
Title: Re: Element Automation
Post by: barny451 on March 31, 2004, 11:50:25 pm
I would suspect that's what the 'reference lists' in the automation interface are for; for list 'Element', they are collections of strings like "Class", "Requirement", etc.

see GetReferenceList in the help, and try it, see what it returns

HTH
Title: Re: Element Automation
Post by: Stephen on April 01, 2004, 12:22:11 am
Thanks there - certainly looks like it'll help

I must read all of the documentation
I must read all of the documentation
I must read all of the documentation
...

Stephen