MiGo Posted September 16, 2009 Share Posted September 16, 2009 I have seen it before but can't find it. In an (ssget "x" '((... what do I put in if I want to get a block named ISO_A1_Title_Block? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 16, 2009 Share Posted September 16, 2009 (ssget "_X" '((0 . "INSERT") (2 . "ISO_A1_Title_Block"))) See here for DXF reference Lee Quote Link to comment Share on other sites More sharing options...
MiGo Posted September 16, 2009 Author Share Posted September 16, 2009 Thanks Lee perfect Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 16, 2009 Share Posted September 16, 2009 Not a problem Quote Link to comment Share on other sites More sharing options...
mhupp Posted October 7, 2020 Share Posted October 7, 2020 On 9/16/2009 at 10:25 AM, Lee Mac said: (ssget "_X" '((0 . "INSERT") (2 . "ISO_A1_Title_Block"))) Could you use this with a variable? (setq BlkName (vla-get-effectivename (vlax-ename->vla-object (car (entsel "\nSelect block: ")))) (ssget "_X" '((0 . "INSERT") (2 . BlkName ))) ;SELECT BLOCK BY NAME This doesn't seem to work. Quote Link to comment Share on other sites More sharing options...
rlx Posted October 7, 2020 Share Posted October 7, 2020 (ssget "_X" (list (cons 0 "INSERT") (cons 2 BlkName ))) 1 Quote Link to comment Share on other sites More sharing options...
ronjonp Posted October 7, 2020 Share Posted October 7, 2020 3 hours ago, mhupp said: Could you use this with a variable? (setq BlkName (vla-get-effectivename (vlax-ename->vla-object (car (entsel "\nSelect block: ")))) (ssget "_X" '((0 . "INSERT") (2 . BlkName ))) ;SELECT BLOCK BY NAME This doesn't seem to work. See if this sheds any light. You cannot use ' to quote a variable, LIST and CONS need to be used. (setq blkname "Test") (print '((0 . "INSERT") (2 . blkname))) ;;;((0 . "INSERT") (2 . BLKNAME)) (print (list '(0 . "INSERT") (cons 2 blkname))) ;;;((0 . "INSERT") (2 . "Test")) 1 Quote Link to comment Share on other sites More sharing options...
mhupp Posted October 8, 2020 Share Posted October 8, 2020 (edited) Thank you rlx and ronjonp. used this to make a quick little lisp to draw a line to all the blocks of a given name from 0,0. rlx been meaning to contact you about that lisp + dcl you help me with a few months back. Rather than using the lisp + DCL file went the route of using getfiled. Edited October 8, 2020 by mhupp Quote Link to comment Share on other sites More sharing options...
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.