'Script written by Davide del Giudice
'Script copyrighted by Co-de-iT www.co-de-it.com
'Script version Sunday, 21 February 2010 20:40:21
'run and call subroutine
'----------------------------------------------------------
Call convert_annotation_dot_to_points_copy_label_to_points()
Sub convert_annotation_dot_to_points_copy_label_to_points()
'declare variables
'-------------------------------------------------------
Dim arrDots,strDot,strobject,strText1
Dim arrPt, strText,i
Dim count,numdots
'get input
'-------------------------------------------------------
arrDots = Rhino.GetObjects("Select annotation dots", 0, True, True )
strobject=Rhino.GetObject("select object to prefix",0)
'number classification starts from 0
'-------------------------------------------------------
count=-1
'testing if script have to shut down or go forward
'-------------------------------------------------------
If Not IsArray(arrDots) Then Exit Sub
'iterations loop
'-------------------------------------------------------
For Each strDot In arrDots
For i=0 To numdots
strText = Rhino.TextDotText(strDot)
strText1 = Rhino.TextDotText(strobject)
arrPt = Rhino.TextDotPoint(strDot)
Rhino.AddPoints array(arrPt)
Rhino.DeleteObject strDot
count=count+1
'select first o second line for addtextDot or Addtext
'-----------------------------------------------------
Rhino.AddTextdot "pt"&count&"_"& strText1 & " "& "("&strText&")" &":"&" "& Rhino.Pt2Str (arrPt, 0) , arrPt
'Rhino.AddText "pt"& count&"_"& strText1 & " "& "("&strText&")" &":"&" "& Rhino.Pt2Str (arrPt, 0) , arrPt,0.5
Next
Next
'credits
'------------------------------------------------------
Msgbox "visit http://www.co-de-it.com for more stuff"
End Sub