Field with the sum of blocks with the same attribute

Field with the sum of blocks with the same attribute

Anonymous
Not applicable
936 Views
3 Replies
Message 1 of 4

Field with the sum of blocks with the same attribute

Anonymous
Not applicable

Hi all!

 

I am looking for a way to automate the counting of blocks with the same attribute and show it with a field in the layout. How can I do it?

The blocks are luminaries. The name of each of them is the manufacturer code and as an attribute I put L1, L2, L3 ... It depends on the project, this attribute is changed but the name remains the same.

 

properties.PNG

 

In quantity I want the field to come out with the sum of all the luminaries called L4 (in this case).

 

lum.PNG

0 Likes
937 Views
3 Replies
Replies (3)
Message 2 of 4

paullimapa
Mentor
Mentor

I've been wanting an automated block counting routine to update in a FIELD for years....but still no solutions...

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales | Exchange App Store


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 4

Anonymous
Not applicable

Here is a routine that works well but only processes the name of the block. I expected there to be a routine to process an Attribute.
https://forums.autodesk.com/t5/autocad-for-mac-forum/linking-a-field-to-a-block-count/m-p/6422966

0 Likes
Message 4 of 4

paullimapa
Mentor
Mentor

This is a nice try. But unfortunately you still have to run the lisp routine to get the count to update.  This defeats the purpose of using a FIELD which is supposed to automatically update without running any routines.  You might as well use the many lisp codes that are available to just place the block count in a TEXT object which will only update after the lisp routine is run again. 

 

 

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales | Exchange App Store


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes