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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top