Dear community,
this time i would like to present you my COM wrapper in Python for 3DExperience use.
So, why did i write it? i simply wanted an alternative, possibility to use Python instead VBA for scripting, its simply more modern language with much bigger set of libraries available.
Benefit is of course coming from Python language itself, its portable, its extendable and easy to bundle.
The whole library is currently a github project available under this link:
https://github.com/tsolina/experience
(pip install is not supported just yet)
in provided library are some examples too, including bounding box which can be executed either as standalone python script or much faster through synced instance using com interface
wrapper itself supports even writting synthax like this,
sel.clear().add(p.hybrid_bodies().item(1)).copy().clear().add(p.hybrid_bodies()).paste().clear()
Named services are added instead to avoid using magic strings whenever possible
here is little example to create line through two points and assign it to the set:
or a little snippet to traverse through the product,
here as well a snippet to access items in database,
with additional snippets including bounding box example available in the list of examples.
So, what is supported?
generally everything supported by 3DExperience Automation (VBA)
As wrapper is assigned directly to the COM, it should be generally version independent, so no need to recompile anything for different 3Dx versions.
Some very specific libraries are not wrapped yet, simply because i had no license to test the wrapped functionality. However, their underlying COM can be accessed directly
If you decide to give it a try, feel free to contact me if youll need support.
Of course, i would be very excited to see some of your scripts using this wrapperpythonPython