Jump to content

Modification of block data export lisp


AbdRF

Recommended Posts

Hi,
I am using this awesome lisp to export block details (Name,coordinates,rotation,etc).I need it to also give attribute value with column heading as tag name.
Attached Image shows the present data given by lisp. I am also attaching the lisp file and sample dwg with attribute block.

image.png.8b056827e919f36076accd2b7734b4ca.png


blkdata.lsp

Block data sample.dwg

Thanks

Link to comment
Share on other sites

Something like this use tagstring for getting tag name. This is not tested. May need tlst reversed. Easiest to test on real dwg.

 

(setq tlst '())
(if (vlax-property-available-p blk 'attributes)
(progn
(foreach att  blk 'getattributes)
     (setq tlst (cons (vla-get-textstring att)))
)
)
(setq blst (cons tlst blst))

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...
On 2/12/2020 at 7:53 AM, BIGAL said:

Something like this use tagstring for getting tag name. This is not tested. May need tlst reversed. Easiest to test on real dwg.

 


(setq tlst '())
(if (vlax-property-available-p blk 'attributes)
(progn
(foreach att  blk 'getattributes)
     (setq tlst (cons (vla-get-textstring att)))
)
)
(setq blst (cons tlst blst))

Thanks @BIGAL
Will try it out
 

 

 

 

Link to comment
Share on other sites

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...