Jump to content

Recommended Posts

Posted

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?

Posted

(ssget "_X" '((0 . "INSERT") (2 . "ISO_A1_Title_Block")))

 

See here for DXF reference

 

Lee

  • 11 years later...
Posted
 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.

Posted


(ssget "_X" (list (cons 0  "INSERT") (cons 2  BlkName )))

  • Like 1
Posted
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"))

 

  • Like 1
Posted (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 by mhupp

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...