Getting the state of certain modeless windows

By Balaji Ramamoorthy

To know if certain modeless windows such as the Properties Window, DesignCenter, and DbConnect windows are currently displayed in an AutoCAD session, there are binary system variable that contain this information.

OPMSTATE – Properties Window
ADCSTATE – AutoCAD Design Center
DBCSTATE – Database Connectivity

All three system variables are set to 1 when the corresponding window is visible, and are set to 0 when not visible. To programmatically control the visibility of these modeless windows, you can send the AutoCAD commands such as “PROPERTIES”, “PROPERTIESCLOSE”, “ADC”, “ADCCLOSE”, DBC” and “DBCCLOSE” commands.

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading