Author Topic: How do I programmatically add attribute?  (Read 3741 times)

bu66le

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
How do I programmatically add attribute?
« 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...  :-[
Wise [persons] learn by others’ mistakes, fools by their own - Henry George Bohn

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: How do I programmatically add attribute?
« Reply #1 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])
The Sparx Team
[email protected]

bu66le

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: How do I programmatically add attribute?
« Reply #2 on: January 19, 2005, 06:52:28 pm »
Thank u. It works!  :-*
Wise [persons] learn by others’ mistakes, fools by their own - Henry George Bohn