Jump to content

Attribute Extraction Lisp Routine_Help


Zodiac

Recommended Posts

recently i have came across an attached LISP code "attribute extraction" that allows extraction from block from the software of BricsCAD, 
Wanted to extract 3 information out from the block, but only manage to extract 2. which is the description & qty. If anyone can help me with this i would appreciate, as i don't have any experience writing of modifying LISP. 

Thanks in advance!

https://drive.google.com/open?id=1MmNfzvgQN0Q3IjMYMdIIW6G7KdWKqVvo 
The code is within the share folder.

Link to comment
Share on other sites

The foreach att  part of the code looks through the attributes of a block, if you want just one block name then you can pick a block and get all the attributes the other way is select blocks and get attributes and another is a list of names and tag names.

 

So what I am saying is you need to explain more what it is your trying do. How many block names and attributes.

 

I have a block extract to table and it auto works out how many columns to match the max attributes as not every block has the same number of attributes.

Edited by BIGAL
Link to comment
Share on other sites

The tag strings are hard coded. You need to change this:

(list "QTY-S" "Name" "PTNO-S")

To something like this:

(list "QTY-S" "Name" "ATT1" "ATT2" "ATT3" "ATT4")

where "ATT1" etc. are valid tag strings.

 

BTW: The code should only be used for blocks with the same attributes in the same order.

Edited by Roy_043
Link to comment
Share on other sites

Like Roy_043 you can use something like (attext "blkname,1,3,4,5) typed at command line representing the block name and the attribute order rather than tag-name. A more global answer.

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