Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Select All" in Macro

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
dwk1204
1884 Views, 8 Replies

"Select All" in Macro

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!

8 REPLIES 8
Message 2 of 9
Kent1Cooper
in reply to: dwk1204


@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;;

Kent Cooper, AIA
Message 3 of 9
dwk1204
in reply to: Kent1Cooper

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?

Message 4 of 9
hmsilva
in reply to: dwk1204


@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

EESignature

Message 5 of 9
Kent1Cooper
in reply to: dwk1204


@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.

Kent Cooper, AIA
Message 6 of 9
Kent1Cooper
in reply to: hmsilva


@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.

Kent Cooper, AIA
Message 7 of 9
hmsilva
in reply to: Kent1Cooper


@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

EESignature

Message 8 of 9
dwk1204
in reply to: hmsilva

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.....

Message 9 of 9
hmsilva
in reply to: dwk1204

You're welcome, dwk1204
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost