Author Topic: Error in creation of static class attribute in EA?  (Read 2813 times)

JuergenA

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Error in creation of static class attribute in EA?
« on: January 24, 2005, 09:32:37 am »
Hello,

I create a new class with a new static class attribute via VBA automation.

The code does work but if I put the new class
into a class diagram in EA, the new attribute
is NOT static (underlined), although the "static" checkbox
has is checked in the attribute property dialog of EA.

Is this a bug or have I forgotten a refresh on anything?

thx,
 Juergen


Public Sub test()

   Dim aClass As EA.Element
   Dim aAttr As EA.Attribute
   
   Set aClass = m_Repository.Models.GetAt(0).Packages.GetByName("Logical View") _
       .Packages.GetByName("BO_Model").Packages.GetByName("Enumerations").Elements.AddNew("NewClass", "Class")
   Set aAttr = aClass.Attributes.AddNew("NewAttribute", "Any")
   aAttr.IsStatic = True
   aAttr.Update
   aClass.Attributes.Refresh
   

End Sub