Search the Community
Showing results for tags 'visibility state'.
Found 3 results
Hi, I have a dwg with a bunch of the same block in it (called Cabinet). This particular block has a number of visibility states. I have assigned an attribute (called SetVisState) to the block that I can modify via ATTOUT and ATTIN. I want a LISP routine to check this attribute in each block, then update it's visibility state based on this attribute. Unfortunately I have next to no experience with LISP, so any guidance would be appreciated. I have tried looking around this forum and others, but so far have only managed to run a LISP that checks the current visibility state and then toggles between states (I need it to check attribute value then change vis state accordingly). I tried Lee Macs code for getting attributes, but couldn't figure out how to apply that to my scenario either. Thanks in advance.
Hello all, I've posted on SEVERAL forums trying to get an answer to this problem, I've compiled so many different Lisp routines that I've lost count, but none have quite been able to do what i want. i've attached a dwg with two blocks in it, the scope of what I'm trying to accomplish is at the bottom of this code: (defun BKVZ ( / blk idx obj sel vis ) (setq blk "WELD DETAIL" ;; Block Name vis "EQUAL WELD" ;; New Visibility State ) (if (setq sel (ssget "_X" (list '(0 . "INSERT") (cons 2 (strcat "`*U*," blk))))) (repeat (setq idx (sslength sel)) (if (= (strcase blk) (strcase (LM:blockname (setq obj (vlax-ename->vla-object (ssname sel (setq idx (1- idx)))))))) (LM:SetVisibilityState obj vis) ) ) ) (princ) ) ;; I would like the visibility state of several different dynamic blocks ;; to reference a text field within the drawing, and the blk variable to be used for several different dynamic ;; blocks within my drawing. for example in this drawing i have two dynamic blocks, and two text fields that ;; represent the visibility states that i want to use for the blocks (this value will change so i want to use it as a ;; variable to change the db viz prop) . I would like to be able to use this code to change the vis states of ;; several blocks within the same dwg, each of which would have a text field that will display the present vis state. ;; if i have to use setq blk1, blk2, blk3, etc to represent each block that is fine, but with several different possible ;; vis states, i would like that varible to reference the text field. so as the text field changes, so does the vis state of the ;; dynamic block. ANY HELP WOULD BE APPRECIATED. THANK YOU!! NEW-LISP-TRIAL.dwg
Hello guys! I have a block with 6 visibility which I can change easyli with the drop-down list. It works well. But if I change the scale of the block it lose the drop-down list. In the block editor I can see the 6 different states but no drop-down list in the model space. Why? Could you help me? Do you have any ideas? thank you for the answer! T