Site Tools


How To: Convert Annotation Dots to Text

Developer: RhinoScript
Summary: Illustrates RhinoScript code that converts annotation dots to text object.

Example

 Sub ConvertDotsToText
   Dim arrDots, strDot
   arrDots = Rhino.GetObjects("Select dots", 0, True, True )
   If Not IsArray(arrDots) Then Exit Sub
 
   Dim arrPt, strText
   For Each strDot In arrDots
     If Rhino.IsTextDot(strDot) Then
       strText = Rhino.TextDotText(strDot)
       arrPt = Rhino.TextDotPoint(strDot)
       Rhino.AddText strText, arrPt
       Rhino.DeleteObject strDot
     End If
   Next
 End Sub

Here is the button macro version.

 _-NoEcho
 _-RunScript (
 arrDots = Rhino.GetObjects("Select dots", 0, True, True )
 If IsArray(arrDots) Then
 For Each strDot In arrDots
 If Rhino.IsTextDot(strDot) Then
 strText = Rhino.TextDotText(strDot)
 arrPt = Rhino.TextDotPoint(strDot)
 Rhino.AddText strText, arrPt
 Rhino.DeleteObject strDot
 End If
 Next
 End If
 )


developer/scriptsamples/convertdotstotext.txt ยท Last modified: 2015/09/14 (external edit)