Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5877

Continue macro after script

$
0
0

@MAD3D wrote:

Hi

I found this RhinoScript that creates center points for the circles, it ´s working fine, but how can I create a Rhino button to run the script and add my macro code after that?

This is the script:

 ! _-Runscript (
 curves = Rhino.GetObjects("Select closed planar curves", 4, ,True)
 If IsArray(curves) Then
 Rhino.EnableRedraw False
 For Each crv In curves
 pt = vbNull
 If Rhino.IsCircle(crv) Then
 pt = Rhino.CircleCenterPoint(crv)
 Else
 arr = Rhino.CurveAreaCentroid(crv)
 If IsArray(arr) Then pt = arr(0)
 End If
 If IsArray(pt) Then
 Rhino.SelectObject Rhino.AddPoint(pt)
 End If
 Next
 Rhino.EnableRedraw True
 End If
 )
;How can I continue now and add
_SelCrv
_SelPt
_Project

Thanks

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5877

Trending Articles