Macro: Not selecting in V5 and V6


Just wondering what I am doing wrong…
Have 2 curves one open + one closed. When I run this Macro (in V6 then V5 to check), the SelOpenCrv selects properly, then the SelClosedCrv does not select anything. “No object added to selection”

! _-Sweep1 '_SelOpenCrv '_SelClosedCrv _Enter _Enter _SelSrf _SelPolySrf _Cap _SelNone

When I run '_SelClosedCrv outside of the Macro, the Closed Curve gets properly selected.

Many thanks,
Jean P.

Dunno, seems to work in both here - you need an _Enter at the end for it to finish…
Make sure there’s only rail curve being selected. You can have multiple profiles.


Hi Mitch, Hi All,

Thanks for your feedback. Not sure why it is behaving different on your system.
Here is a short screen Capture of the issue in Rhino 5:


Version 5 SR14 64-bit
(5.14.522.8390, 22-May-17)

Asus G501W. I76700HQ. 16GB Ram.
NVidia GTX 960M4GB

OK I tested again here also in French to see if it wasn’t a localization problem, but it works as well… I just used a simple NURBS curve and a circle.

Commande: _-Sweep1
Sélectionner un rail ( EnchaînerBords ): '_SelOpenCrv
1 courbe ajoutée à la sélection.
Sélectionner les courbes de section transversale ( Point ): '_SelClosedCrv
1 courbe ajoutée à la sélection.

I wonder if it isn’t an issue with your closed curve - can you just post the two curves you used here? Or are you having this problem with any two curves?


It is not working with any Closed Curve.
Here is an example file I am using… Should perhaps have posted this earlier :wink:

Script_Issue.3dm (30.0 KB)

OK, I’m stumped - your curves work here as well. Just a shot in the dark, does it work if you add a _SelNone between the SelOpenCrv and SelClosedCrv?

! _-Sweep1 '_SelOpenCrv '_SelNone '_SelClosedCrv _Enter _Enter _SelSrf _SelPolySrf _Cap _SelNone _Enter


Same issue with the Script you handed over… And seing the same on V6 curiously. That’s perhaps a clue.
Not vital for this exercise and there is a workaround to manually select the closed curve but got to be able to make Scripts reliably for LII trainings…

FWIW, Mitch’s macro copy-pasted on Jean’s file in RH6 doesn’t work here either:

Command: _Paste
Command: _-Sweep1
Select rail ( ChainEdges ): '_SelOpenCrv
1 curve added to selection.
Select cross section curves ( Point ): '_SelNone
Select cross section curves ( Point ): '_SelClosedCrv
No objects added to selection.
Select cross section curves ( Point ): _Enter
Select cross section curves ( Point )

Aha… I am running it from the MacroEditor and it works in both V5 and 6. Pasting it into the command line doesn’t work in either here as well, that’s the difference. It’s also working when pasted into a button. Must be something in the command line interpreter?


Hi all - I see this… no explanation so far, from me - _selClosedCrv by itself works fine when pasted to the command line.