Zodiac Posted January 20, 2020 Posted January 20, 2020 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. Quote
BIGAL Posted January 21, 2020 Posted January 21, 2020 (edited) 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 January 21, 2020 by BIGAL Quote
Roy_043 Posted January 21, 2020 Posted January 21, 2020 (edited) 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 January 21, 2020 by Roy_043 1 Quote
BIGAL Posted January 21, 2020 Posted January 21, 2020 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. Quote
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.