Is it possible to access a block's description?? If so, how?!? Thanks in advance!
Hi Matt If you wanna access the entities in a block reference use something like this: (setq BlkTbl (tblobjname "BLOCK" "MyBlockName") CurEnt (cdr (assoc -2 (entget BlkTbl))) ) (while (setq CurEnt (entnext CurEnt)) (setq EntLst (entget CurEnt)) ;Do your thingis with each block entity ) Cheers
Entget returns the insert object, not the block definition. You may have to use tblobjectname to get the block definition data. (defun C:GetDesc ( / ) (setq ent (entget (car (entsel "\n Select a block... ")))) (setq bent (entget (tblobjname "BLOCK" (cdr (assoc 2 ent))))) (setq lay (cdr (assoc 8 ent))) (setq desc (cdr (assoc 4 bent))) (princ lay) (princ desc) (princ) )
Thanks guys.... It was staring me in the face the whole time, mocking me. -- Matt W There are 3 kinds of people: Those who can count, and those who can't. | Entget returns the insert object, not the block definition. | You may have to use tblobjectname to get the block definition data. | | (defun C:GetDesc ( / ) | (setq ent (entget (car (entsel "\n Select a block... ")))) | (setq bent (entget (tblobjname "BLOCK" (cdr (assoc 2 ent))))) | (setq lay (cdr (assoc 8 ent))) | (setq desc (cdr (assoc 4 bent))) | (princ lay) | (princ desc) | (princ) | ) | |
Hi Matt Didn't recognize that you are looking for the *Description* of a Block. Allen has the answer... Cheers
Matt, I'm not familiar with this DBViewer thing. Did a few web searches, but found nothing useful. A link or a company name would help. Thanks Joe Burke
Check the Customer Files news group. I've posted two files there; one for 2002 and one for 2004. It's an ARX file. -- Matt W There are 3 kinds of people: Those who can count, and those who can't. | Matt, | | I'm not familiar with this DBViewer thing. Did a few web searches, but found nothing | useful. A link or a company name would help. | | Thanks | Joe Burke | |