I have what I hope is a quick question..
Trying to add this macro to a new command in my cui. Does Select all not work in macros?
^C^Clayiso;\;_select;all;;_chprop;la;c-rway-x;;
Thanks in advance!
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
@dwk1204 wrote:....
Trying to add this macro to a new command in my cui. Does Select all not work in macros?
^C^Clayiso;\;_select;all;;_chprop;la;c-rway-x;;
....
It should, but used a little differently -- I don't think it will work in noun-verb operation in a macro, though there may be a way to get it to. But it's easy enough to do otherwise. Without putting it into mine to test it, I suggest you try either the direct way, doing the selection inside the CHPROP command:
^C^Clayiso;\;_chprop;all;;la;c-rway-x;;
or if you really want to do it via SELECT separately for some reason, you need to use what it found as the Previous selection in CHPROP:
^C^Clayiso;\;_select;all;;_chprop;p;;la;c-rway-x;;
Thanks Kent ...Didn't even think of just using the "all" option within chprop command. The issue is, even tho the command does a "layiso" first it still changes all entities in drawing to the layer specified in macro?
@dwk1204 wrote:Thanks Kent ...Didn't even think of just using the "all" option within chprop command. The issue is, even tho the command does a "layiso" first it still changes all entities in drawing to the layer specified in macro?
If "even tho the command does a "layiso" first it still changes all entities in drawing to the layer specified in macro", is because your "layiso" setings are to turn the layers off, try change the setings to "Lock layers" and affter the "chprop", restore the "Layiso" setings to "off"...
Try
^C^C_layiso;_S;_L;;\;_chprop;_all;;la;c-rway-x;;_layiso;_S;_O;;;_LAYERP;
Remember, if the macro don't ends, the "Layiso" setings will remain locked...
Henrique
@dwk1204 wrote:Thanks Kent ...Didn't even think of just using the "all" option within chprop command. The issue is, even tho the command does a "layiso" first it still changes all entities in drawing to the layer specified in macro?
Well, that is a surprise -- it finds things even in Layers that are turned off.
It wouldn't, I believe, do that with selection options other than All, so theoretically you could try a Window selection of the whole area of the drawing in the current space, such as [untested]:
^C^Clayiso;\;_chprop;(getvar 'extmin);(getvar 'extmax);;la;c-rway-x;;
Or you could use (ssget) with a Layer filter with the name extracted from the selected object.
Or you could use LAYMRG, giving it c-rway-x in the type-it-in option for the Layer to merge into, as long as you don't mind the Layer of the thing you select being Purged from the drawing, and any things on that Layer inside Block definitions also changing to Layer c-rway-x.
@hmsilva wrote:.... your "layiso" setings are to turn the layers off, try change the setings to "Lock layers" and affter the "chprop", restore the "Layiso" setings to "off".......
That sounds like a good idea [or Freeze if that's a choice] for those who have new-enough versions to have LAYISO settings. Still being stuck back in 2004, LAYISO for me has no options, but only turns Layers off.
@Kent1Cooper wrote:
That sounds like a good idea [or Freeze if that's a choice] for those who have new-enough versions to have LAYISO settings. Still being stuck back in 2004, LAYISO for me has no options, but only turns Layers off.
the choices in the command "LAYISO" are
Command: LAYISO
Current setting: Hide layers, Viewports=Off
Select objects on the layer(s) to be isolated or [Settings]: s
Enter setting for layers not isolated [Off/Lock and fade] <Off>:
but, there is the problem of not being common to all AutoCAD versions...
Henrique
Thanks to all, I went with:
^C^C_layiso;_S;_L;;\;_chprop;_all;;la;c-rway-x;;_layiso;_S;_O;;;_LAYERP;
and it works great!! Thanks Again.....