Continue macro after script


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)
 arr = Rhino.CurveAreaCentroid(crv)
 If IsArray(arr) Then pt = arr(0)
 End If
 If IsArray(pt) Then
 Rhino.SelectObject Rhino.AddPoint(pt)
 End If
 Rhino.EnableRedraw True
 End If
;How can I continue now and add


I got it!! :slight_smile:


Hi again

I have my script working, but the next step , altough simple, I don´t think I can get away by using macro commands.
See the images and if you have any tips fee free :slight_smile:

1 -I have some dozens of circles in my scene, I run my script and I get the center point.

2-Script result:

3-This image shows what would be my goal, to project the center point onto the surface and copy/or project flat the circle on the bottom to the Z height.