JaviJavi12 Posted November 25, 2022 Posted November 25, 2022 Greetings, I´m trying to extract and sum specific data attributes from blocks in my drawing. While Lee Mac's Global Attribute Extractor & Editor is excellent, I need some help with two minor modifications: 1. How to select a certain group of blocks of my interest (by indicating a window selection) and not the entire drawing? 2. My blocks have two attributes: CODE and AMOUNT. When running MacAtt, I get the data for every instance of the block that is found, like this: Is there a way to sum the amount of instances with the same attribute in CODE in order to get a shorter table like this? Any direction provided will be very appreciated, thanks! Quote
Steven P Posted November 26, 2022 Posted November 26, 2022 For simplicity the second point I would just fix it in a spreadsheet - look at pivot tables maybe? Maybe there is something in the options that can group things together to make the sums easier? As for point 1...... Lee Mac makes some very good LISPS, and sorry to say for all I have tried most of them I struggle to follow. Looking quickly at this one I don't think it is an easy one to do, maybe if Lee is passing this way he could suggest what to do (I suspect he lurks in the background, watching). Since MacAttExt can work on a batch of drawings I think it is designed that way, so no way to select just part of each drawing. Maybe there is another LISP out there that will do this? Quote
BIGAL Posted November 28, 2022 Posted November 28, 2022 Yes I have up to 5 attributes deep sorted and counted, eg I have a block called DOOR so there are 19 Door blocks with attribute color but count is. DOOR BLACK 5 DOOR WHITE 6 DOOR SILVER 8 Going even further DOOR BLACK 820x2100 22 DOOR BLACK 1020x2100 4 Happy to discuss not free but Beer price. Post a sample dwg and will test. 1 Quote
JaviJavi12 Posted November 28, 2022 Author Posted November 28, 2022 On 11/26/2022 at 6:37 AM, Steven P said: For simplicity the second point I would just fix it in a spreadsheet - look at pivot tables maybe? Maybe there is something in the options that can group things together to make the sums easier? As for point 1...... Lee Mac makes some very good LISPS, and sorry to say for all I have tried most of them I struggle to follow. Looking quickly at this one I don't think it is an easy one to do, maybe if Lee is passing this way he could suggest what to do (I suspect he lurks in the background, watching). Since MacAttExt can work on a batch of drawings I think it is designed that way, so no way to select just part of each drawing. Maybe there is another LISP out there that will do this? Your comment makes sense. I posted an example with a few blocks but in reality I need to work with 100+ different blocks that have several materials associated. I´d like to reduce the time spent in counting them as much as possible, but if it's not as efficient as I think, then I'll have to fix it in the spreadsheet as you say. Quote
JaviJavi12 Posted November 28, 2022 Author Posted November 28, 2022 You can try with this sample dwg, please. The block I'm interested in counting is the hexagon-shaped one named 'CED-LUMINARIA'. Test_bloques_ELE.dwg Quote
BIGAL Posted November 29, 2022 Posted November 29, 2022 Is this correct result, the code uses block attributes order. 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.