-ChangeLayer not recognized in * v6 Beta *

Hey Guys,
Have a Macro that runs nicely in v5, but having probs in v6. Seems “ChangeLayer” doesn’t work.

It’s a macro to basically make a One-Sided Wall with a Hatch: It should take a Curve, change the specific Layer, then offset the curve, fill it with a Hatch, put the Hatch in its own layer, then leave you with just the Orig Line (in its new Layer) and the Hatch (in its own specific layer.)

All seems to work except the ChangeLayer. (And its also a bit sluggish)

! -_ChangeLayer “04 Heavy”
-_Copy _Pause _InPlace _SelNone _SelLast _Offset _Cap=_Flat
_Distance 6 _Pause _Pause _Enter
_Selnone _Sellast _SetObjectName “Temp”
-Hatch Pause Enter Pattern “ansi31” Enter
_SelNone _SelLast
-_ChangeLayer “07A Hatch Wall”
_SelNone _-SelName “Temp” _Delete
_SelNone _SelLast "

Hi Alan - you may need a Pause after ChangeLayer to allow selection. But the problem looks to me like the style of the double quotes… at least, if I replace them in MacroEditor, the thing works. Hm.


Hi Pascal

I’m not sure how (in the heck) you changed any quote styles, but I can’t get the thing to work.

I did try putting _Pause after “04 Heavy” and didn’t do anything.

This works for you in Beta?

Hi Alan - all I can say is that if I copy and paste your macro into MacroEditor, create the required layers, AND replace all the " marks in the editor it runs and if I use the " from the pasted text it does not…

The Pause is suggested in order to allow you to select a curve if one is not pre-selected, for the ChangeLayer operation.


This seems to work here:

! -_ChangeLayer _Pause "04 Heavy" _SelLast
-_Copy _Pause _InPlace _SelNone _SelLast _Offset _Cap=_Flat
_Distance 6 _Pause _Pause _Enter
_Selnone _Sellast _SetObjectName "Temp"
-Hatch Pause Enter Pattern "ansi31" Enter
_SelNone _SelLast
-_ChangeLayer "07A Hatch Wall"
_SelNone _-SelName "Temp" _Delete
_SelNone _SelLast

I did add a _SelLast at the end of the first line.

The curly quotes thing is something you need to be careful with, always work in a bog-standard text editor like notepad, not something that has formatting like Word. And on the Mac side, the OS itself adds curly quotes everywhere by default, you need to turn that off in system preferences…


Thanks for jumping in. Quotes aside, it seems the actual ChangeLayer is the thing (or one of them) that’s not working. I did just SetObjectName “temp” and that worked fine.

I copy/pasted your text into my Macro Editor, and no love.

Thing is, this has been a working button for me for some time now in v5. Why should it be different in v6, and why is it working for you guys, and not me?

So, @pascal and @Helvetosaur,

Figured it out. My “04 Heavy” is a SubLayer of another Layer I have. When I use a new layer that’s not nested, it works.

v5 was cool to just use the that layer name.

EDIT: Figured out I use my Upper Layer, then two colons, then my SubLayer. Like this:
-ChangeLayer “2D::04 Heavy”

That sounds right?

You will need to know the parent layer(s)… then the syntax is
i.e. use :: to string together the full path from parent to sublayer



1 Like