Check if a palette is open

Check if a palette is open

carlos_m_gil_p
Advocate Advocate
981 Views
8 Replies
Message 1 of 9

Check if a palette is open

carlos_m_gil_p
Advocate
Advocate

Hello how are you?
I wanted to ask if anyone knows of any variable, in which I can check if a palette is open.
Or if anyone knows a way to do it.
For example, I want to check if the visual styles manager palette is open.
If it is open, do nothing.
If it is closed, let him open it.


And so check the palettes that I need.
Properties
Layer properties manager
blocks
Among other.


Thank you.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
982 Views
8 Replies
Replies (8)
Message 2 of 9

scot-65
Advisor
Advisor
R2024-LT:
GFCLRSTATE 0
VPMAXIMIZEDSTATE 0 (read only)
ARRAYEDITSTATE OFF (read only)
CLEANSCREENSTATE 0 (read only)
COUNTPALETTESTATE 0 (read only)
DWGHISTORYSTATE 0 (read only)
FILETABSTATE 0 (read only)
RIBBONSTATE 0 (read only)
SHAREDVIEWSTATE 0 (read only)

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 3 of 9

ronjonp
Mentor
Mentor

@carlos_m_gil_p 

No need to check if it's open or not (command "_VISUALSTYLES") & (command "_VISUALSTYLESCLOSE")

Block Palette : (command "_BLOCKSPALETTE") & (command "_BLOCKSPALETTECLOSE")

Properties Palette : (command "_PROPERTIES") & (command "_PROPERTIESCLOSE")

Layers Palette : (command "_LAYER") & (command "_LAYERCLOSE")

Message 4 of 9

paullimapa
Mentor
Mentor

For Layer Properties Manager:

LAYERMANAGERSTATE


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 9

scot-65
Advisor
Advisor
A few more that was not listed via command SET "?" "*STATE":

OPMSTATE - Properties
ADCSTATE - Design Center
TPSTATE - Tool Palettes Window
SSMSTATE - Sheet Set Manager
MSMSTATE - Markup Set Manager
QCSTATE - QuicCalc

There may yet be others.

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 6 of 9

carlos_m_gil_p
Advocate
Advocate

Hello guys, how have you been?
Thanks a lot for your help.


If I see that not all of them are found, so I took from each of you the one that does work.

Now I have a question with the block palette command.
When I enter the command into autocad, it works fine and opens the calculator palette.
But when I run it from lisp, it opens another calculator and I don't understand why.
Could someone tell me what is wrong?

 

These are the ones it shows me in the command bar.

 

  '_quickcalc
  QUICKCALC
 
This is how I am applying it in Lisp.
 
 (vl-cmdf "_.quickcalc")

 

And whatever you place, it does not open the palette, but the direct calculator.

 

Thank you.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 7 of 9

paullimapa
Mentor
Mentor

try this:

(vla-Sendcommand(vla-Get-ActiveDocument(vlax-Get-Acad-Object))"_.QUICKCALC\n")

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 8 of 9

carlos_m_gil_p
Advocate
Advocate

Hello @paullimapa , thank you very much, it worked this way.

It's strange that it didn't work with command or vl-cmdf.

 

Thank you all for the collaboration provided

 


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 9 of 9

paullimapa
Mentor
Mentor

Glad to have helped…cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos