Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Stereotypes
Topics
Topic |
Detail |
---|---|
public Object |
Sub TestStereotypes
Dim o as object Dim idx as integer
''add a new stereotype to the Stereotypes collection o = m_Repository.Stereotypes.AddNew("funky","class") If(o.Update=false) Then Console.WriteLine (o.GetLastError()) End if o = nothing
''make sure you refresh m_Repository.Stereotypes.Refresh
''then iterate through - deleting our new entry in the process For idx = 0 to m_Repository.Stereotypes.Count-1 COnsole.Writeline(m_Repository.Stereotypes.GetAt(idx).Name) If(m_Repository.Stereotypes.GetAt(idx).Name = "funky") then m_Repository.Stereotypes.DeleteAt(idx,false) Console.WriteLine("Delete element") End if Next
End Sub
|