Attribute value to count blocks

Attribute value to count blocks

bgraverholt
Advocate Advocate
9,370 Views
8 Replies
Message 1 of 9

Attribute value to count blocks

bgraverholt
Advocate
Advocate

Is there a way to have a block attribute count the total number of certain blocks that are located in the drawing? Preferably be able to automatically count as you instert more blocks. Or if I have to update it with attsync that would be fine to. Or is there a way to create a table that automatically counts certain blocks as you insert them and remove them?

0 Likes
9,371 Views
8 Replies
Replies (8)
Message 2 of 9

dbroad
Mentor
Mentor

I am not sure this is as automatic as you want but I use data extraction.  It does require the use of an external extraction template file though.  The data extraction template must be selected and manually updated.  At plot time, data extraction offers to do an automatic update.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 9

thisispreston
Advocate
Advocate

Surely if you just want to know the number of a certain block in a drawing you can just pick one and select similar? Or use the BCOUNT command....

-----------------------------------------------
"music is my religion" - Jimi Hendrix
0 Likes
Message 4 of 9

bgraverholt
Advocate
Advocate

Yeah I have a lisp to count all selected blocks but and get the information from that. But I am looking for something that allows me to have it in an attribute or table that I can print with out having to update it manually. 

Message 5 of 9

pendean
Community Legend
Community Legend
Look up the topic of DATA EXTRACTION in HELP in AutoCAD: come back if you get stuck trying to implement and share with us where you stopped and what you've tried.
0 Likes
Message 6 of 9

Anonymous
Not applicable

I'm familar with the Data Extraction tool, however, if I may add to the original question.  I have a block that has two attributes, one is a plant code (AR) and one is a plant count (i.e. 13).  I'll may have 50 blocks within the drawing with the AR code but they may all have different counts.  Is there a way that I could use DE to total the plant counts or will I have 50 different rows, since they are all unique?

Message 7 of 9

greg.youngCXLLN
Advocate
Advocate

I understand your question, I have an attributed block linked to x & y coordinates which works well. But I want to add a an attribute of an automatic point count, so 01, 02 etc... there could be a couple of hundred or more. Currently I have to edit each Point number manually (03 below is manual input)

 

gregyoungCXLLN_0-1637282638903.png

 

Message 8 of 9

dbroad
Mentor
Mentor

That would be custom feature that requires some level of custom programming.  Consider learning LISP.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 9 of 9

bgraverholt
Advocate
Advocate

We a lisp now for this but the new AutoCAD now has a count feature where you can count blocks by attributes and create a table that will automatically update as you add more blocks

 

0 Likes