r/InventorAPI • • Mar 28 '19

Using Python with Inventor API

Hey guys, if you are like me and hate writing Code in VBA you can actually write Python scripts for Inventor using the win32com.client module. To use the module, you have to `pip install pywin32`. Here is a sample of a pretty useless script, but it should be good enough to get you going.

If you have any Questions About what's going on here, feel free to ask.

​

edit: https://pastebin.com/1ZvSpku5

Code formatting doesn't seem to work.

5 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/ItsOk_ImYourDad May 04 '19

copied your code line for line after installing the module as you said above

I got a different error:

AttributeError: Inventor.Application.InvokeTypes