Reading and writing a text block inside the drawing


#1

How do I get the actual text into a variable.

strObject is the ID of the object itself. I can’t figure the syntax out to get the actual text.

This is the demo that writes the text but it doesn’t actually read the text

Dim strObject
strObject = Rhino.GetObject("Select text")

If Rhino.IsText(strObject) Then
  Rhino.TextObjectText strObject,"Rhino"
End If

(Dale Fugier) #3

How about this:

Dim strObject, strText
strObject = Rhino.GetObject("Select text")
If Rhino.IsText(strObject) Then
  strText = Rhino.TextObjectText(strObject)
  Call Rhino.Print(strText)
End If

– Dale