Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bu66le on January 18, 2005, 05:55:55 pm

Title: How do I programmatically add attribute?
Post by: bu66le on January 18, 2005, 05:55:55 pm
What should I do if I want to programmatically add attribute to an element? I got an error when I try to instantialize Element or Attribute.
Anyone...  :-[
Title: Re: How do I programmatically add attribute?
Post by: KP on January 18, 2005, 06:25:45 pm
You need to call the AddNew() method of the element's Attributes collection, and then call the Update() method of the returned attribute. Search for "Collection" in the helpfile for more info. Let me know if you're still having trouble ([email protected])
Title: Re: How do I programmatically add attribute?
Post by: bu66le on January 19, 2005, 06:52:28 pm
Thank u. It works!  :-*