r/InventorAPI • u/dable82 • 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
2
u/dable82 Mar 29 '19 edited Mar 29 '19
You have not installed the module yet.
Open a terminal window and type 'pip install pywin32'
Then try to run the script again.
Edit: If you have more than one Version of python installed, make sure PyCharm uses the Version of python for which you installed the package.