Message 1 of 4
List of visibility states does not work with all blocks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
With this peace of code I want to get the visibility states in a list. It works fine with some blocks, but not with others.
The blocks looks the same to me, but I can not find out why it does not work with all blocks.
This is the code and in the attachment I have a drawing with to almost similar dynamic blocks.
One will work and the other one gives nil.
(defun c:lv (/ list_visi)
(if (and (setq blk (car (entsel "\nSelect Dynamic block with Visibility State :")))
(= (vla-get-isdynamicblock (setq blk (vlax-ename->vla-object blk))) :vlax-true)
)
(progn
(setq props (vlax-invoke blk 'getdynamicblockproperties))
(foreach prop (vlax-get (car props) 'allowedvalues)
(setq list_visi (cons (list prop) list_visi))
)
)
)
(setq list_visi (reverse list_visi))
)