Please help me find a Routine to toggle On/Off Xref & Layer Manager.
So I can open Xref or Layer Manager and close it without clicking X (close) button.
I already got one for Property Palette.
Thank you in advance
|
Please help me find a Routine to toggle On/Off Xref & Layer Manager.
So I can open Xref or Layer Manager and close it without clicking X (close) button.
I already got one for Property Palette.
Thank you in advance
Xref
at command line:DIESEL macro:Code:(if (=(getvar "erstate")1)(command "_externalreferencesclose")(command "_externalreferences"))LayerCode:$M=$(if,$(=,$(getvar,erstate),1),^C^C_externalreferencesclose,^C^C_externalreferences)
at command line:DIESEL macro:Code:(if (=(getvar "layermanagerstate")1)(command "_layerclose")(command "_layerpalette"))What could be easier for Property Palette than the default Ctrl+1?Code:$M=$(if,$(=,$(getvar,layermanagerstate),1),^C^C_layerclose,^C^C_layerpalette)
Last edited by Tom Beauford; 2018-05-14 at 01:29 PM.
Hi Tom
Thank you for your help but could please help me how to used this code.
My knowledge is limited to a regular lisp routine only.
I tried to do this:
TOGGLE LAYER PALETTE ON/OFF
(DEFUN C:2 ()(command "_layerclose")(command "_layerpalette"))
TOGGLE XREF MANAGER PALETTE ON/OFF
(DEFUN C:3 ()(command "_externalreferencesclose")(command "_externalreferences"))
It's opens but when I enter the same command it's doesn't close or toggle.
Here is a sample routine I got to Toggle On/Off Property Palette:
PROPERTY PALETTE ON/OFF
(DEFUN C:1()
(if
(equal (getvar 'opmstate) 2)
(princ "\nNo toggle for you!")
(progn
(if
(equal (getvar 'opmstate) 0)
(command "properties")
(command "propertiesclose")
);if
);progn
);if
(princ))
Can you help me do the same.
Thank you in advance
Last edited by ELIANDEFI; 2018-05-16 at 07:05 AM.
Addto your acaddoc.lsp file so it will automatically load every time you open a drawing.Code:(DEFUN C:2 ()(if (=(getvar "layermanagerstate")1)(command "_layerclose")(command "_layerpalette"))) (DEFUN C:3 ()(if (=(getvar "erstate")1)(command "_externalreferencesclose")(command "_externalreferences")))
Hi Tom
It works very well!
Thank you for spending time to help me.
Till next time.
Last edited by ELIANDEFI; 2018-05-17 at 03:34 PM.