dshall

Limiting Decimal Spaces for Areas

Recommended Posts

Does anybody know how to limit the decimal spaces for areas?  I am  not sure if my landscaper needs to put in 326.3468524 s.f. of sod.  I think 330 sf would be accurate enough.

 

 

post-50-0-10767300-1469791977_thumb.png

bbb minimize decimal numbers 1.plan

Share this post


Link to post
Share on other sites

Only by using a user macro instead of the one Chief provides.  This has been discussed before and the macro posted in another thread.  Search the forum ;)

Share this post


Link to post
Share on other sites

Yes!

I'd love a setting for this.

The builder asked me to confirm that we needed 85.4541016 square feet of tile for the bathroom.

I asked him if my estimate was not accurate enough.

Share this post


Link to post
Share on other sites

My question is, how did this ever get out off the software engineer's desk and in to the program? And then remain in the program after a couple of updates? Really strange thinking IMO.

  • Upvote 1

Share this post


Link to post
Share on other sites

OK guys,

 

Create an "Owner Context" - "Evaluated" macro named "Area Rounded" with the following contents:

x = area.round(0)

 

then use that macro in the Polyline Label.

 

I agree that 7 decimal places is too much and Chief should change that to 2-3 decimal places but with a user macro you have control.  In addition, you actually get the numerical value so it's possible to do math calculations within the macro.

Share this post


Link to post
Share on other sites

......

 

....Create an "Owner Context" - "Evaluated" macro named "Area Rounded" with the following contents:

x = area.round(0)

 

then use that macro in the Polyline Label.

 

....

 

 

Joe,  I wish I new how to do what you are recommending,  but I don't.  i am not a programmer and I do not have time to learn.  I am looking for the answer.  I would like to hire you in about 2 weeks to get this crap worked out and then I will share in a video with others.

 

I wish the designers and the  programmers could stick to what they do best.

Share this post


Link to post
Share on other sites

My question is, how did this ever get out off the software engineer's desk and in to the program? And then remain in the program after a couple of updates? Really strange thinking IMO.

I don't get it either.  

Share this post


Link to post
Share on other sites

Yes!

I'd love a setting for this.

The builder asked me to confirm that we needed 85.4541016 square feet of tile for the bathroom.

I asked him if my estimate was not accurate enough.

 

LOL,  I am  going through this now with a site analysis of pervious and impervious areas.  I do not need any decimal spaces,  I am not a mechanical engineer.  The closest tolerance I am expected is to the whole number.

Share this post


Link to post
Share on other sites

......

 

Joe,  I wish I new how to do what you are recommending,  but I don't.  

DSH just paste the text Joe provided in to the "Value" of the macro and select "Owner Object" from the context drop down.

 

Thanks Joe !!!!

Share this post


Link to post
Share on other sites

and just change the (0) to the number of decimal places you want

i.e. x = area.round(1) gives you x.y as the output

x = area.round(2) gives you x.yy as the output

Share this post


Link to post
Share on other sites

DSH just paste the text Joe provided in to the "Value" of the macro and select "Owner Object" from the context drop down.

 

Thanks Joe !!!!

 

Would it be possible to show a picture of the macro with Joe's fix shown and a pic of where I am to find this macro?  Thanks.

Share this post


Link to post
Share on other sites

here you go

The macro "Area Rounded" is one I created by clicking the "New" button in the DBX

post-65-0-09333600-1469802819_thumb.jpg

Share this post


Link to post
Share on other sites

Would it be possible to show a picture of the macro with Joe's fix shown and a pic of where I am to find this macro?  Thanks.

Here are pics.

post-47-0-73968300-1469802921_thumb.jpg

post-47-0-46304900-1469802929_thumb.jpg

Share this post


Link to post
Share on other sites

Here are pics.

Joe you're showing area.round(0) instead of x=area.round(0) is the x= needed?

Share this post


Link to post
Share on other sites

Scott,

 

You might want to look at the June2016 Macro of the Month - Area_Perimeter_Volume since it already does all three (2 decimal places)

Share this post


Link to post
Share on other sites

Joe you're showing area.round(0) instead of x=area.round(0) is the x= needed?

only if you wanted to perform additional calculations.  A macro returns the value of the last line.

 

So if you wanted to multiply by some other value you could do this:

 

x = area.round(0)

x/3

 

which would display 1/3 of the area but that wouldn't be rounded.  If you wanted the result rounded you would change it to:

 

x = area

(x/3).round(0)

 

or you could write the macro as

 

(area/3).round(0)

Share this post


Link to post
Share on other sites

only if you wanted to perform additional calculations.  A macro returns the value of the last line.

 

So if you wanted to multiply by some other value you could do this:

 

x = area.round(0)

x/3

 

which would display 1/3 of the area but that wouldn't be rounded.  If you wanted the result rounded you would change it to:

 

x = area

(x/3).round(0)

 

or you could write the macro as

 

(area/3).round(0)

Thx

Share this post


Link to post
Share on other sites

BTW, some Polyline based objects (Roads, Driveways, Sidewalks, Slabs, Countertops, etc) have Default Labels that you can assign a macro to so that any time you create one of those objects it is automatically labeled.  All of those have the area attribute.

Share this post


Link to post
Share on other sites

BTW, some Polyline based objects (Roads, Driveways, Sidewalks, Slabs, Countertops, etc) have Default Labels that you can assign a macro to ....

Darned if I can find where that default setting might be... :(

Share this post


Link to post
Share on other sites

if you have Joe's site package, it does it all for you automatically.

Share this post


Link to post
Share on other sites

I tried making this macro...rounded to two places...and the macro works fine...but, I get an evaluation error.  

 

Why would the macro work perfectly but generate an evaluation error?

 

 

post-227-0-75615500-1469806497_thumb.png

post-227-0-38597200-1469806513_thumb.png

Share this post


Link to post
Share on other sites

My question is, how did this ever get out off the software engineer's desk and in to the program? And then remain in the program after a couple of updates? Really strange thinking IMO.

 

^^^^this.  its crazy since it would probably take all of 2 min. to fix for them.

Share this post


Link to post
Share on other sites

Thanks guys,  I finally got it.  Some years I am a little slow on the uptake.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Member Statistics

    27465
    Total Members
    6254
    Most Online
    SuzLeigh
    Newest Member
    SuzLeigh
    Joined