【问题标题】:Using python to automate Autodesk Inventor使用 python 自动化 Autodesk Inventor
【发布时间】:2018-03-01 16:05:27
【问题描述】:

有没有办法在 Inventor 中使用 python 打开和控制实体模型?

我的目标是从维度数据库开始并模拟每个配置。

【问题讨论】:

    标签: python python-2.7 autodesk autodesk-inventor


    【解决方案1】:

    这个 sn-p 是一个很好的起点:

    #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
    

    【讨论】:

      猜你喜欢
      • 2020-04-25
      • 2015-08-31
      • 2013-08-14
      • 2018-05-06
      • 2014-11-06
      • 2010-10-26
      • 2014-11-25
      • 2021-11-19
      • 2020-08-05
      相关资源
      最近更新 更多