I have a script that writes tabular data to a list that works in IronPython. I am trying to convert the script to CPython in order to do some post processing with numpy and pandas. I am getting an AttributeError message. Is there a way to do this in CPython?
data = []
del data[:]
force = Tree.FirstActiveObject
force.Activate()
Pane=ExtAPI.UserInterface.GetPane(MechanicalPanelEnum.TabularData)
Con = Pane.ControlUnknown
for R in range(1,Con.RowsCount+1):
data.append([])
for C in range(2,Con.ColumnsCount+1):
print(Con.cell(R,C).Text)
data[-1].append(Con.Cell(R,C).Text)
Traceback (most recent call):
File "Mechanical Scripting Editor", line 31, in
AttributeError : '__ComObject' object has no attribute 'ControlUnknown'