plackowski Posted July 31, 2020 Posted July 31, 2020 I've attached two drawings, each containing almost identical blocks named REVBLK. In one case, the test function below finds the block. In the other case, it does not. Why? Some context - I modified our REVBLK a few weeks ago, condensing the attributes so the revision block will fit in a smaller space. My lisp routine to update the title block can no longer locate the revised REVBLK. (defun _TestFunction ( / ) (setq rbname "REVBLK") (setq ss (ssget "_X" (list (cons 2 rbname)))) (if ss (princ "testfunction found revblk") (princ "no revblks found") ) ) blockfound.dwg noblockfound.dwg Quote
Tharwat Posted July 31, 2020 Posted July 31, 2020 Hi, You block must be dynamic and that's why ssget function can't select it / them. So you need to iterate though the selection set and check if the name of the block is your target one and the following should allow you to select them. (cons 2 (strcat "`*U*," rbname)) 1 Quote
plackowski Posted July 31, 2020 Author Posted July 31, 2020 (edited) Awesome thank you! Unfortunately, I did not intend to make the block dynamic, and I'm not sure what I did that caused it. It also looks like there are no easy ways to convert it back without recreating it from the original block again... Edit: That was much easier than I thought. I had added a Basepoint Parameter unnecessarily. Deleting it converted it back. Edited July 31, 2020 by plackowski Quote
Tharwat Posted July 31, 2020 Posted July 31, 2020 If so, then just dive into the block editor and delete any dynamic parameter then save and close the editor and that should solve it back to its original normal structure. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.