Hi all
I have a problem when trying to get objects from a 3dm file by a Python script.
import Rhino
import rhinoscriptsyntax as rs
filepath = rs.OpenFileName( '3dm file ?' )
file3dm = Rhino.FileIO.File3dm.Read( filepath )
table = file3dm.Objects
print table.Count
for ix in range( table.Count ):
obj = table[ ix ]
print obj.Id
If I run this script, picking a 3dm file, then I get this message:
Message: ‘File3dmObjectTable’ object is not subscriptable
… referring to this line
obj = table[ ix ]
I meant to call this:
https://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_FileIO_File3dmObjectTable_Item.htm
But it does not work.
Am I trying to do something wrong ?
Thanks