How to get an array of string from all the TextDot objects in a file using rhinocommon?

I somehow managed to get the RhinoObject version of all the TextDot objects, but can’t find a way to get the text information inside them. Is there something like rs.coercecurve for Text in RhinoCommon? Converting guid to different geometry types seems to bother a lot of people.

Thanks for reading my question, it would be a great help if you can give me some clues.

What version of rhino are you using? There are some differences between r5 and r6 regarding texts.

TextDotObject textObj = (TextDotObject)rhino_obj.Geometry;

Might work, not on a PC right now I can have a look later

@lando.schumpich I am using rhino 6, thanks. It works. :heart: