Message 1 of 2
Hide Selected Blocks LISP not working. Help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wrote a quick LISP function to have the user select the blocks they want to hide. The process should be that they keep selecting the blocks - when they are finished they hit enter and the blocks are hidden.
This function partially works. At first, when I select a block it throws an error:
; error: bad argument value: AutoCAD Command: #<VLA-OBJECT IAcadBlockReference 0000...>
But then the command line prompts me to select another block, so I do and it works from there.
How do I get rid of the initial error?
(defun hide ( / sset)
(vl-load-com)
(while
(setq sset (car (entsel)))
(setq sset (vlax-ename->vla-object sset))
(command "._HIDEOBJECTS" sset "")
) ;while
) ;defun