-
Notifications
You must be signed in to change notification settings - Fork 332
/
ConvertDotsToText.rvb
32 lines (24 loc) · 849 Bytes
/
ConvertDotsToText.rvb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' ConvertDotsToText -- August 2013
' If this code works, it was written by Dale Fugier.
' If not, I don't know who wrote it.
' Works with Rhino 5.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Sub ConvertDotsToText
Const RH_DOT = &h2000
Dim arrDots, strDot
Dim arrPt, strText
arrDots = Rhino.GetObjects("Select text dots", RH_DOT, True, True )
If Not IsArray(arrDots) Then Exit Sub
Call Rhino.EnableRedraw(False)
For Each strDot In arrDots
If Rhino.IsTextDot(strDot) Then
strText = Rhino.TextDotText(strDot)
arrPt = Rhino.TextDotPoint(strDot)
Call Rhino.AddText(strText, arrPt)
Call Rhino.DeleteObject(strDot)
End If
Next
Call Rhino.EnableRedraw(True)
End Sub