AutoCAD LT General Discussion

AutoCAD LT General Discussion

Reply
Active Member
toganivalu.graham
Posts: 6
Registered: ‎11-28-2011
Message 1 of 5 (1,395 Views)
Accepted Solution

Block - Automated attribute values - add/subtract

1395 Views, 4 Replies
03-06-2013 02:06 PM

Hello all,

 

This may be a long-shot and one for the CAD guru's out there and any assistance would be greatly appreciated.

 

Background - I am working on multple civil earthworks plans that depict cut and fill set-out data. So far I have started labelling these with a use of a label block that has attributes - which i fill in as i place the blocks. See attached screen dump. N for natural surface, F for final design surface and a value "X" which is the difference of the two - which is either going to be +ve or -ve depending on whether its in cut of fill.

 

Issue - seeing as there are so many points to label, i would liike to 'automate' the "X" similar to excel where it will give me the answer as opposed to calculating and tryping them in manually.

 

Hope that made sense and i look forward to receiving any ideas.

 

Cheers!

GT 

GT
Adelaide - SA
Australia
Valued Mentor
sthompson1021
Posts: 477
Registered: ‎03-02-2010
Message 2 of 5 (1,371 Views)

Re: Block - Automated attribute values - add/subtract

03-06-2013 02:55 PM in reply to: toganivalu.graham

Hi, I haven't tried it but I think you could insert a simple table in your block and use that to do the math for you.

Valued Mentor
AcadAdamLT
Posts: 492
Registered: ‎12-14-2010
Message 3 of 5 (1,341 Views)

Re: Block - Automated attribute values - add/subtract

03-07-2013 07:09 AM in reply to: toganivalu.graham

Hi,

this can most likely be done using fields and a custom field expression, the field will read the value of the first attribute and then subtract it with the second attribute value, however this field expression does not exist as standard so you'll have to make it yourself, my knowledge in field expression is limited and I don't have the time to try it out for the moment,

maybe someone with more experience will pick up on this.

PS: It also needs to read the value of the attribute as numbers and not as a text string.

 

Good luck!

Signature, sincerely... //Adam
AutoCad LT 2014
Give Kudos where credit is due, Mark "accepted as solution" if the post solved your question.
Valued Mentor
sthompson1021
Posts: 477
Registered: ‎03-02-2010
Message 4 of 5 (1,327 Views)

Re: Block - Automated attribute values - add/subtract

03-07-2013 11:10 AM in reply to: toganivalu.graham

Hi, I tried my idea of using a table in a block and couldn't get it to work. Not sure if I was doing something wrong or if you just can't use tables in blocks. Anyway,  I made a simple table that you could just copy and paste where you need. Hope this helps. 

Distinguished Mentor
steven-g
Posts: 599
Registered: ‎05-11-2009
Message 5 of 5 (1,325 Views)

Re: Block - Automated attribute values - add/subtract

03-07-2013 11:28 AM in reply to: sthompson1021

You can put formulas into fields

http://cadingandcoding.blogspot.be/2008/10/exploring-autocad-field-capabilities-by.html

Regards Steven Gray
Setting Out (Joinery Manufacturing)
Autocad 2013LT
Windows 7 professional
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.