I am trying to write scripts for CATIA with python(I already used VBA but here I need to do with python only). My code looks like this:
import win32com.client.dynamic
import numpy as np
CATIA = win32com.client.Dispatch("CATIA.Application")
documents1 = CATIA.Documents
partDocument1 = documents1.Add("Part")
part1 = partDocument1.Part
Error is :
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)
For any help or suggestion thanks in advance!
Disclaimer: I have checked some similar examples but couldn't find my answer. For Example Similar question but without the answer