Hi Hakan,
I am not sure I follow - so you want to have the _Section command run and instantly run the script on all resulting section curves?
Like this:
Option Explicit
Call Main()
Sub Main()
Call Rhino.Command("_Section _MultiPause")
If Rhino.LastCommandResult() = 0 Then
'change this for different rounding
Dim intRound: intRound = 2
Dim arrC : arrC = Rhino.SelectedObjects()
If isnull(arrC) Then Exit Sub
Dim i
Rhino.EnableRedraw False
For i=0 To Ubound(arrC)
If Rhino.IsCurve(arrC(i)) Then
Call Rhino.AddTextDot(Round(Rhino.CurveLength(arrC(i)), intRound), Rhino.CurveMidPoint(arrC(i)))
Call Rhino.CurveArrows(arrC(i), 3)
End If
Next
Rhino.EnableRedraw True
End If
End Sub
This script works so well for me. I am very happy for that. I have one more question regarding this. For example, I want 123, not 123.23. So it should not show beyond the point. What changes should be made in the code?
Thank you very much dear Jarek.
How can I learn about macro, scripting? I am learning Python. But I donāt know how to use it with Rhino.
Where should I start?
Can you give me the source?
Python is definitely a way to go with Rhino these days. We discussed it before, I listed some reasources in this very postā¦
I would start with the 101 Primer of Python for Rhino and then just ask away in this forum - a lot of people should be able to help. The hardest part is to get started.