Réserver une Démo

SVP notez : Cette page d’aide n’est pas pour la dernière version d’Enterprise Architect. La dernière aide peut être trouvée ici.

Pré. Proc.

Iterate Through a .EAP File

This is an example of the VB.Net code to iterate through a .eap file starting at the Model level, after the repository has been opened.

Sub DumpModel()

     Dim idx as Integer

     For idx=0 to m_Repository.Models.Count-1

          DumpPackage("",m_Repository.Models.GetAt(idx))

     Next

End Sub

''output Package name, then element contents, then process child Packages

Sub DumpPackage(Indent as String, Package as Object)

     Dim idx as Integer

     Console.WriteLine(Indent + Package.Name)

     DumpElements(Indent + "", Package)

     For idx = 0 to Package.Packages.Count-1

          DumpPackage(Indent + "", Package.Packages.GetAt(idx))

     Next

End Sub

''dump element name

Sub DumpElements(Indent as String, Package as Object)

     Dim idx as Integer

     For idx = 0 to Package.Elements.Count-1

          Console.WriteLine(Indent + "::" + Package.Elements.GetAt(idx).Name)

     Next

End Sub