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:
- create an empty Rhino 6 file.
- create a text object with whatever content.
- give a name “text” to the object in the property panel and set the object to another layer, “layer1” for example.
- hide the layer. The text object should also be hidden then.
- save the file and close
- open the saved file. open python script editor
- paste the following code to the script editor and run.
import rhinoscriptsyntax as rs
textObj = rs.ObjectsByName("text")[0]
print rs.TextObjectText(textObj)
- 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
Thanks in advance!
Chen