Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: JuergenA 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