【发布时间】:2019-05-07 02:58:13
【问题描述】:
我正在尝试使用 python 为 CATIA 编写脚本(我已经使用过 VBA,但在这里我只需要使用 python)。我的代码如下所示:
import win32com.client.dynamic
import numpy as np
CATIA = win32com.client.Dispatch("CATIA.Application")
documents1 = CATIA.Documents
partDocument1 = documents1.Add("Part")
part1 = partDocument1.Part
错误是:
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)
如有任何帮助或建议,请提前致谢!
免责声明:我检查了一些类似的示例,但找不到我的答案。 For Example Similar question but without the answer
【问题讨论】:
标签: scripting python-3.6 catia