AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rounding Expression

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
667 Views, 1 Reply

Rounding Expression

Anonymous
Not applicable

Goal: to modify this expression to round the inverts and lengths using two places.  It is currently rounds the info to 0 places before doing the calculations.

 

ROUND({Start Invert Elevation}-{End Invert Elevation})/ROUND({2D Length - Center to Center})

 

I picked this expression up from another board by a user named Christopher.  I am trying to "fix" the problem caused by the rounding calculations in the pipe labeling.  If you calculate the slope of a pipe using 9 places as it is calcuated by C3D, then you come up with the same result.  But my label is only to 2 which will give you a slightly different result is calculated.

 

The above expression works the way I need in that it is rounding the criteria and then does the calculation to come up with the info for the label.  The only problem I have is that it is rounding it to a whole number instead of to 2 places before doing the calc.

 

Is there something I can add to the expression to cause it to use .xx?

 

Thanks in advace

Wayne

0 Likes

Rounding Expression

Goal: to modify this expression to round the inverts and lengths using two places.  It is currently rounds the info to 0 places before doing the calculations.

 

ROUND({Start Invert Elevation}-{End Invert Elevation})/ROUND({2D Length - Center to Center})

 

I picked this expression up from another board by a user named Christopher.  I am trying to "fix" the problem caused by the rounding calculations in the pipe labeling.  If you calculate the slope of a pipe using 9 places as it is calcuated by C3D, then you come up with the same result.  But my label is only to 2 which will give you a slightly different result is calculated.

 

The above expression works the way I need in that it is rounding the criteria and then does the calculation to come up with the info for the label.  The only problem I have is that it is rounding it to a whole number instead of to 2 places before doing the calc.

 

Is there something I can add to the expression to cause it to use .xx?

 

Thanks in advace

Wayne

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
Accepted solution

(ROUND(({Start Invert Elevation}-{End Invert Elevation})*100)/ROUND(({2D Length - Center to Center})*100))/100

 

The above expression worked.  Only change I made was to take off the last /100 and chose the "grade/slope" option under the expression editor and then I displayed the label to two places.

 

This answer was given to me on the C3D Customization board.

0 Likes

(ROUND(({Start Invert Elevation}-{End Invert Elevation})*100)/ROUND(({2D Length - Center to Center})*100))/100

 

The above expression worked.  Only change I made was to take off the last /100 and chose the "grade/slope" option under the expression editor and then I displayed the label to two places.

 

This answer was given to me on the C3D Customization board.

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

Post to forums  

Autodesk Design & Make Report