Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HELP: Block with attributes that sum themselves

3 REPLIES 3
Reply
Message 1 of 4
behindthegates
2422 Views, 3 Replies

HELP: Block with attributes that sum themselves

Hello

 

It's my first time posting here (and I'm brazilian, so, if my english hurt you, I'm sorry).

 

I've been trying to create a block that, given three values in it's attributes lines, the fourth one would be the sum of them, automatically.

I have an sample image to ilustrate it better - if needed.

 

Sample.png

The texts "Value" and "Total" are text. The "XXX" it's the attributes. The first three must sum automatically and insert it's total in the fourth one.

Is it possible?

 

Thanks already for any thoughs given into it.

3 REPLIES 3
Message 2 of 4
3wood
in reply to: behindthegates

Yes you can.

1. Do not put "kg" or any units in the attributes to be added up.

2. Insert FIELD in the last attribute.

Right-click - Insert Field - Field category: Object - Objet type: click "Select Object" button to pick up the first attribut.

Select "Value" from "Property" list.

Copy the value shown in "Field Expression", it looks like %<\AcObjProp Object(%<\_ObjId 8796084697264>%).TextString>%

Paste it to your Notepad

3. Repeat Step 2 to get all 3 attribute field expression.

4. Back to Field dialogue, Select "Formula" from "Field category", copy and paste 3 attribute field expressions into the Formula area, add "+" in between values. The field expresstion will change into figures automacitally as "100", "10", etc. The formula looks like "100+10+1".

5. Click OK in the Field dialogue.

att.PNG

 

att2.png

Message 3 of 4
behindthegates
in reply to: 3wood

Mr. 3wood, first of all: Thanks A LOT.

But still I'm not being able to use it as I want.
I did follow your steps and worked fine, but only with the default value.

When I edit this value after inserting the block in the drawing, the formula stops working and the total line do not update itself.
When I try to leave de default line blank or with a "---" it also doesn't work. hm

Could you help me a further more? 😧

 

Message 4 of 4
3wood
in reply to: behindthegates

You need REGEN to update the field value.

Please also try my example drawing in the attachment.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost