[BUG] Rhino 6 cannot read hidden textobject text

Hello,

I have encountered a “feature”, but rather a bug to me in Rhino 6.

When you open a file with text objects in hidden layers, you can get those text objects but you cannot read the text content in those objects. It is only possible to read the text when those layers have showed once (rendered in the canvas once).

The red marked will be empty if the text layer is hidden when opening the file.

Steps to reproduce:

  1. create an empty Rhino 6 file.
  2. create a text object with whatever content.
  3. give a name “text” to the object in the property panel and set the object to another layer, “layer1” for example.
  4. hide the layer. The text object should also be hidden then.
  5. save the file and close
  6. open the saved file. open python script editor
  7. paste the following code to the script editor and run.
import rhinoscriptsyntax as rs

textObj = rs.ObjectsByName("text")[0]

print rs.TextObjectText(textObj)
  1. the print result will be empty instead of actual text object text

As our scripts highly rely on text objects, I hope this could be fixed soon :slight_smile:

Thanks in advance!
Chen

Hi Chen - thanks, I see that. The text entity ‘plain text’ is not filled in if the object is hidden but RichText is filled in correctly - for now you can use something like this :

x = rs.coercegeometry(textObj[0])
print x.RichText

https://mcneel.myjetbrains.com/youtrack/issue/RH-52919

-Pascal