Is there a way to toggle through the various Visibility States of a dynamic block by using the keyboard, or am I limited to using the grip and Properties Palette?
For example, I have a sink block with about 20 different VS. I want to be able to click on it, then hit a single key to go through the various different states. In some scenarios it will save me time.
Thanks!
Solved! Go to Solution.
Solved by h_s_walker. Go to Solution.
Unfortunately not.
Have you lookup using a double lookup parameter? That can usually cut down lists a bit.
Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
If you have the properties tab open you can sort of do this.
You have to click on the visibility drop down twice. (once to open, once to close)
You can now use the up and down arrows to cycle through the options.
Your visibility drop down should look like the attached picture if it is selected correctly in order to use the arrows.
This may not be exactly what you wanted but if you have properties always open like I do it is a time saver.
Note:
One of my many "multi-visibility grip" blocks is having trouble with this. The others seem to work fine.
Please mark this as the solution if you feel it has fixed your problem.
EDIT:
I see now that you already said besides the properties palette. But I can't delete the response anyway so maybe it'll help somebody else
I have the same need for this request, so I put together this AutoLISP alternative for keyboard shortcuts to quickly toggle through Visibility States.
VS - Gets the list of Visibility States of a Dynamic Block out of the Block Editor
V - Cycles through the Visibility States in the Block Editor
VV - Cycles through the Visibility States in reverse order in the Block Editor
You may change the V or VV shortcuts as you wish, but I like it because V is near the spacebar which can be used as the enter key. So you can press V and ride your thumb on the spacebar to quickly toggle through Visibility States.
;------------------------------------------------------------------------------- ; c:VS - Get list of Visibility States of a Dynamic Block ;------------------------------------------------------------------------------- (defun c:VS (/ State$ Properties^ Vla-Object^) (if (setq Vla-Object^ (car (entsel "\nSelect Dynamic Block with Visibility States: "))) (if (= (vla-get-isdynamicblock (setq Vla-Object^ (vlax-ename->vla-object Vla-Object^))) :vlax-true) (progn (setq *Visibilities@ nil) (setq Properties^ (vlax-invoke Vla-Object^ 'getdynamicblockproperties)) (foreach State$ (vlax-get (car Properties^) 'allowedvalues) (setq *Visibilities@ (append *Visibilities@ (list State$))) (princ (strcat "\n" State$)) );foreach (setq *Visible$ (nth 0 *Visibilities@)) (princ "\nDynamic Block selected for the list of Visibility States.") (princ "\nIn Block Editor use shortcuts V and VV to cycle through Visibility States.") (textscr) );progn (progn (setq *Visibilities@ nil) (princ "\nNone selected.") );progn );if );if (princ) );defun c:VS ;-------------------------------------------------------------------------------
;------------------------------------------------------------------------------- ; c:V - Cycle through Visibility States in Block Editor ;------------------------------------------------------------------------------- (defun c:V (/ Cnt# Num# State$) (if (and *Visibilities@ *Visible$) (if (> (length *Visibilities@) 1) (progn (setq Cnt# 0) (foreach State$ *Visibilities@ (if (= *Visible$ State$) (setq Num# Cnt#) );if (setq Cnt# (1+ Cnt#)) );foreach (if (= *Visible$ (last *Visibilities@)) (setq *Visible$ (nth 0 *Visibilities@)) (setq *Visible$ (nth (1+ Num#) *Visibilities@)) );if (command "_-BVSTATE" "S" *Visible$) );progn );if (princ "\nRun VS first, out of the Block Editor.") );if (princ) );defun c:V ;-------------------------------------------------------------------------------
;------------------------------------------------------------------------------- ; c:VV - Cycle through Visibility States in reverse order in Block Editor ;------------------------------------------------------------------------------- (defun c:VV (/ Cnt# Num# State$) (if (and *Visibilities@ *Visible$) (if (> (length *Visibilities@) 1) (progn (setq Cnt# 0) (foreach State$ *Visibilities@ (if (= *Visible$ State$) (setq Num# Cnt#) );if (setq Cnt# (1+ Cnt#)) );foreach (if (= *Visible$ (nth 0 *Visibilities@)) (setq *Visible$ (last *Visibilities@)) (setq *Visible$ (nth (1- Num#) *Visibilities@)) );if (command "_-BVSTATE" "S" *Visible$) );progn );if (princ "\nRun VS first, out of the Block Editor.") );if (princ) );defun c:VV ;-------------------------------------------------------------------------------
Can't find what you're looking for? Ask the community or share your knowledge.