Question

I am developing an Addin to Enterprise Architect. But before that i need to know if python 2.7 supports an ActiveX Interface?.i searched a lot but there is no direct answer. Any help or code sample is much appreciated.

Was it helpful?

Solution

You can try the pywin32 library. After you import the win32com part, the following script accesses the EA interface:

 App = win32com.client.dynamic.Dispatch("EA.App")
 EA = App.Repository

 if not EA.OpenFile("PATHTOYOUR.eap"):
     print ("load failed")

 for package in EA.Models:
     print(package.Name);

 Project = EA.GetProjectInterface()
 Project.Exit()

I don't know how you develop an addin for EA, but that should you get started.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top