Contentbrowser
We all know that CONTENTBROWSEROPEN opens that particular window and CONTENTBROWSERCLOSE closes it.
The question I have is what's the name of the variable that stores the value so as to determine that the next time you start Bricscad it should do so with that window in the state you left it?
The reason for my question is so that I can use that variable to check what it's state is so as to create a keyboard shortcut that just toggles the state instead of having to do so with 2 shortcuts.
Comments
-
I opened the Content Browser, and exported all of the sysvars.
Then I closed the Content Browser and exported all of the sysvars.
Then I compared to the two lists of sysvars and there is no difference, so apparently there is no sysvar for this.0 -
Please send in a feature request.
Probably not very reliable:
(defun c:ToggleContentBrowser ( / doc oldWid) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (setq oldWid (vla-get-width doc)) (vl-cmdf "_.contentbrowseropen") (if (= oldWid (vla-get-width doc)) (vl-cmdf "_.contentbrowserclose") ) (princ) )
0 -
I looked previously and couldn't see any variables related to panel states. However, you can use -TOOLPANEL to toggle with.
Here's what I came up with.
; TOGGLE PANELS ON/OFF (defun PANELTOGGLE (PanelName) (acet-sysvar-set '("CMDECHO" 0 )) (command "._-TOOLPANEL" PanelName "_Toggle") (acet-sysvar-restore) ) ; Content Browser (defun C:CBT () (PANELTOGGLE "Content Browser") ) ; Layers (defun C:LAT () (PANELTOGGLE "Layers") ) ; Structure (defun C:STT () (PANELTOGGLE "Structure") )
Regards,
Jason Bourhill
CAD Concepts0 -
@rkmcswain said:
I opened the Content Browser, and exported all of the sysvars.
Then I closed the Content Browser and exported all of the sysvars.
Then I compared to the two lists of sysvars and there is no difference, so apparently there is no sysvar for this.Thank you for trying. Much appreciated to confirm that it isn't just me not finding it.
0 -
Roy, unfortunately your solution just make my Bricscad 'hang' which means I have to give it a hard shutdown.
Jason, yours works nicely
My thanks to both of you nonetheless.
0