Drawing a polyline and moving it to a specific layer

Good morning friends,

I have a macro that allows me to draw a line and have it automatically move to a specific layer. It is:

! _Line _Pause _Pause _Sellast _-ChangeLayer “reg::.18” _SelNone

(the layer is called .18 and is a sublayer of “reg”).

When I tried to use the same macro for a polyline, however, it failed:

! _Line _Pause _Pause _Sellast _-ChangeLayer “reg::.18” _SelNone

Suspect it has to do with the fact that a polyline might have an unpredictable number of steps. Is there any way to get around this?

Thank you.

Hi @cosmas, yes in Rhino 6 you can use multipause eg. like this:

! _-Polyline _MultiPause _SelLast


I suspect you may also have the problem with “curly quotes” (Mac problem) - or maybe not, maybe it’s just Discourse that adds them, but check it out anyway. Curly quotes don’t work in scripts.

This works:

! _Polyline _Multipause _Sellast _-ChangeLayer "reg::.18"

HTH, --Mitch

Thank you to both!! It worked. I appreciate the heads up about the “curly quotes”.