hello steve
i need to label a bunch of curves with a single line font, i'm iterating and changing the label for each curve, i haven't been able to apply your solution to my original code (which is part of a much larger script) this is (part of) my original code:
Code:
import rhinoscriptsyntax as rs
crvs=rs.GetObjects ("select crvs",4)
for i in crvs:
centroid = rs.CurveAreaCentroid (i)
tagTEMP = int(centroid[0][2])
currentLevelTAG = str(tagTEMP)
rs.AddText (currentLevelTAG, centroid[0],height=7.0,font="MecSoft_Font-1")
it outputs fine except for the type of font.
i tried your solution by doing this:
Code:
import rhinoscriptsyntax as rs
crvs=rs.GetObjects ("select crvs",4)
for i in crvs:
centroid = rs.CurveAreaCentroid (i)
tagTEMP = int(centroid[0][2])
currentLevelTAG = str(tagTEMP)
point = centroid[0]
cmd = "-_TextObject Height=7 currentLevelTAG "
cmd += str(point[0]) + "," + str(point[1]) + "," + str(point[2])
cmd += " Enter"
rs.Command (cmd)
the text is added thousands of units away from the centroid of the curves + can't get it to replace the label (i don't use command scripting very often).
thanks
diego