I just found your Python snippets and found them very interesting. I wondered how to retrieve the text content of a 3dm-file as a list. I am currently trying to read closed 3dm files and achieved to read closed polylines to measure their area and save them to an excel sheet. Now, I am trying to connect text objects with the measurements in excel but am failing in the attempt to read the content of the text objects from a sries of closed 3dm files. I have to say that my Python knowledge is very, very basic. Could you give me a hint on how to retrieve the information?
I´ve been trying to figure out the whole of last evening and into the night and another few hours today skipping through the RhinoCommon API only to get stuck with File3dmStringTable Methods. I think I would have spent even Sunday to no avail. You saved my day!
Did I get it right? I have to narrow down the instantiated Objects.Enumerator via file3dmObj to then check for TextEntities before appending. I´d never have gotten to that point. Where can I find these descriptions in RhinoCommon? This is a riddle wrapped up in an enigma to me. How did you learn this?
ah ok… it´s getting clearer. still the steps from the variable “file3dm” to “file3dm.objects” to “file3dmObj” to “file3dmObj.Geometry” is everything else but obvious to me… never found this kind of structural breakdown on RhinoCommon which is essential to my understanding of tables. On the other hand I am guessing this is something that probably relates more to python coding logics than rhinocommon. anyway, it´s good to have someone giving a glimpse to move forward from. have a nice weekend.
file3dm is similar to RhinoDoc.
In RhinoDoc you have ‘Objects’ table.
If you iterate through objects in that table you will find instances derived from RhinoObject, which have properties like ‘Id’, ‘Geometry’, ‘Name’…
The same thing is with File3dm class: we iterated through its ‘Objects’ table where File3dmObject instances reside, and retrieved their ‘Geometry’ property.
Thank you for your explanations. As I mentioned, the only thing that is not obvious is the way how the access paths may be addressed properly. Besides that, RhinoCommon is pretty comprehensible as are your explanations. Have a sunny Sunday.