Using Python To Automate Autodesk Inventor
Is there a way to open and control a solid model in Inventor using python? My goal to start with a database of dimensions and simulate every configuration.
Solution 1:
This snippet is a great place to start:
#Open Inventor
invApp = win32com.client.Dispatch("Inventor.Application")
#Make inventor visible
invApp.Visible = True
#Set file names of template
Part_FileName_BaseIPT = 'C:\\Base.ipt'
#Open the base model
oPartDoc=invApp.Documents.Open(Part_FileName_BaseIPT)
#Collect parameters
oParams = oPartDoc.ComponentDefinition.Parameters
#Set Angularity
oParams.Item("Name").Expression = *Value*
#Update document
oPartDoc.Update()
#Save new version
oPartDoc.Save
Post a Comment for "Using Python To Automate Autodesk Inventor"