Hi Everyone-
I'm trying to use the API to build multiple assemblies. (I've probably got 400+ assemblies to build from maybe 75 parts.) I'm not a COM or .NET programmer, but I've written quite a few scripts in Python. The book IronPython in Action arrived two days ago and so far I'm making progress.
I figure I'd post code as I go along for other to look at and (hopefully) learn from. If you have any suggestions or examples I'd love to see them.
So, with that said, here's a quick and dirty way to get AlibreX.dll imported into IronPython.
You can type in the lines above into the command line interpreter and then add the following:
>>> interfaces = [entity for entity in dir(AlibreX)} #Build a list of all interfaces in AlibreX
>>> len(interfaces)
212
>>> print [entity for entity in interfaces if entity.startswith('Au')]
['AutomationHook']
I'm trying to use the API to build multiple assemblies. (I've probably got 400+ assemblies to build from maybe 75 parts.) I'm not a COM or .NET programmer, but I've written quite a few scripts in Python. The book IronPython in Action arrived two days ago and so far I'm making progress.
I figure I'd post code as I go along for other to look at and (hopefully) learn from. If you have any suggestions or examples I'd love to see them.
So, with that said, here's a quick and dirty way to get AlibreX.dll imported into IronPython.
Code:
import sys
sys.path.append(r'c:\Program Files\Alibre Design\Program') #Got to be able to find AlibreX.dll
import clr
clr.AddReferenceToFile('AlibreX')
import AlibreX
You can type in the lines above into the command line interpreter and then add the following:
>>> interfaces = [entity for entity in dir(AlibreX)} #Build a list of all interfaces in AlibreX
>>> len(interfaces)
212
>>> print [entity for entity in interfaces if entity.startswith('Au')]
['AutomationHook']