PDA

View Full Version : Doing some simple mathematics with fields



Alistair0610
2007-02-07, 09:48 AM
I've successfully created dynamic blocks using attributes with fields to automatically display the X, Y and Z co-ordinates (see attached block).

I have had a request to create another dynamic block that does a bit of simple subtraction on the Z value. Basically to subtract the layer works depth from a final road level.

I tried unsuccessfully to use the formula function to do the maths, but DIESEL is definitely not my strong suit, and all I could get was an output of "####".

I thought I would try and create a table with the first value as the Z value field, the second with the constant to be subtracted, and the third to be the sum of the first two. Unfortunately the field does not seem to be recognised as a numeric value and is evaluated as 0, no matter what value is displayed.

Also I can't find a way of inserting attributes in a table, only MTEXT fields.

Do any of you genius's out there have any suggestions?

Regards
Alistair

Mlabell
2007-02-07, 01:36 PM
My suggestion would be to get Civil 3D, or Land desktop. Everything you are trying to accomplish can be done with those programs, and a whole lot more...

But to help you with your problem could you possibly post this sample table as well? It would help in dissecting what errors you may be having. If the table is linked to the DB that would be better.

Mike.Perry
2007-02-08, 11:24 AM
I've successfully created dynamic blocks using attributes with fields to automatically display the X, Y and Z co-ordinates (see attached block).

I have had a request to create another dynamic block that does a bit of simple subtraction on the Z value. Basically to subtract the layer works depth from a final road level.

I tried unsuccessfully to use the formula function to do the maths, but DIESEL is definitely not my strong suit, and all I could get was an output of "####".

I thought I would try and create a table with the first value as the Z value field, the second with the constant to be subtracted, and the third to be the sum of the first two. Unfortunately the field does not seem to be recognised as a numeric value and is evaluated as 0, no matter what value is displayed.As Mark already suggested above, could you please post the actual Table and the Dynamic Block used to link into that Table.



Also I can't find a way of inserting attributes in a table, only MTEXT fields.The _.EAttExt command should do want you are after achieving.

Have a good one, Mike

Alistair0610
2007-02-08, 12:00 PM
I tried posting a reply earlier, but it disappeared int the ether somewhere.

Here is a drawing with a dynamic block and a table, hopefully illustrating where my failings are.

I suspect the best way would be to do a bit of maths on in the formula field of the dynamic block.

I can get the table to detect the elevation on which it is inserted, but I can't do any maths on the result of that field.

Oh well..

Thanks for all your help again guys.

Mike.Perry
2007-02-08, 12:02 PM
I tried posting a reply earlier, but it disappeared int the ether somewhere.

Here is a drawing with a dynamic block and a table, hopefully illustrating where my failings are.

[ SNIP ]Hi Alistair

Could you please try re-attaching the DWG file to your above post.

:beer: Mike

Alistair0610
2007-02-08, 12:43 PM
Doh!

I'm not having much luck today. I've edited the earlier post.

jfields.61630
2007-02-09, 01:31 PM
In the table cell that you want your formula, click and insert field> formula>in the formula dialog box (says formula) right click and choose insert field>choose object> choose your existing elevation field> choose position> add constant variable i.e. -.012 > and that should result in the answer that you desire. I will look at the dynamic block one as well and see if I can get it to work. It may need something specific with it being a dynamic block...some one with more knowledge on those than me. But still learning. Hope this helps.

Mlabell
2007-02-09, 06:20 PM
I've successfully created dynamic blocks using attributes with fields to automatically display the X, Y and Z co-ordinates (see attached block).

I have had a request to create another dynamic block that does a bit of simple subtraction on the Z value. Basically to subtract the layer works depth from a final road level.

I tried unsuccessfully to use the formula function to do the maths, but DIESEL is definitely not my strong suit, and all I could get was an output of "####".

I thought I would try and create a table with the first value as the Z value field, the second with the constant to be subtracted, and the third to be the sum of the first two. Unfortunately the field does not seem to be recognised as a numeric value and is evaluated as 0, no matter what value is displayed.

Also I can't find a way of inserting attributes in a table, only MTEXT fields.

Do any of you genius's out there have any suggestions?

Regards
Alistair


So far from what I have dissected:
1) the table definately needs to be kept out of the dynamic block.
2) I have spent to much time on it and have yeilded no results. Sorry! :banghead:
I will post what I have attempted, but I think there is a problem with recognizing the value on the insert point according to how fields sees the value. I have tried many things, and my current stab, is keeping attributes in the block, and not using a table, you can make one of the attributes using eattext like Mike Perry said in an earlier post.

Alistair0610
2007-02-13, 09:00 AM
Many thanks for all of your efforts guys. I'm afraid I'm stumped too. It's the sort of thing that I feel should be possible, but I just can't quite figure it out. Maybe it will in a future release.

milad004122389
2007-03-05, 08:00 AM
I've successfully created dynamic blocks using attributes with fields to automatically display the X, Y and Z co-ordinates (see attached block).

I have had a request to create another dynamic block that does a bit of simple subtraction on the Z value. Basically to subtract the layer works depth from a final road level.

I tried unsuccessfully to use the formula function to do the maths, but DIESEL is definitely not my strong suit, and all I could get was an output of "####".

I thought I would try and create a table with the first value as the Z value field, the second with the constant to be subtracted, and the third to be the sum of the first two. Unfortunately the field does not seem to be recognised as a numeric value and is evaluated as 0, no matter what value is displayed.

Also I can't find a way of inserting attributes in a table, only MTEXT fields.

Do any of you genius's out there have any suggestions?

Regards
Alistair






HELLO .HIIIIIIIIIIIIIIIII

milad004122389
2007-03-05, 08:44 AM
So far from what I have dissected:
1) the table definately needs to be kept out of the dynamic block.
2) I have spent to much time on it and have yeilded no results. Sorry! :banghead:
I will post what I have attempted, but I think there is a problem with recognizing the value on the insert point according to how fields sees the value. I have tried many things, and my current stab, is keeping attributes in the block, and not using a table, you can make one of the attributes using eattext like Mike Perry said in an earlier post.



HI .FOR UUUUUUUU

amccullick
2007-09-07, 04:50 PM
I couldn't figure out how to make the formula not show all three points but here is my best guess.