Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Rounding a Field number to the nearest .5' that is pulling off of diameter

chris_donohue5FLDZ
Observer

Rounding a Field number to the nearest .5' that is pulling off of diameter

chris_donohue5FLDZ
Observer
Observer

I have a field setup so that it pulls the diameter of a circle & coverts it into inches, but I would like for it to be to the nearest .5". Is there a way to do that through Fields?

chris_donohue5FLDZ_0-1729095921065.png

 

0 Likes
Reply
Accepted solutions (1)
218 Views
2 Replies
Replies (2)

apjones
Collaborator
Collaborator

See if this helps: https://forums.autodesk.com/t5/autocad-forum/field-value-round-up/td-p/10310824

 

Paul's answer below is your better choice.  Please ignore my answer.

Pete

>Please Accept as Solution and give Kudos as appropriate to further enhance these forums. Thank you!
0 Likes

paullimapa
Mentor
Mentor
Accepted solution

To do this you'll have to enter the FIELD command

Field category: select Objects

Field names: select Formula

Leave the Format as Decimal

Precision: select 0.0

In the formula window enter:

0.5*ROUND(1*12/0.5)

The 1 in this case is a place holder.

Then select 1 and right mouse click

on the cursor menu select Insert Field

paullimapa_0-1729100791168.png

Now on the 2nd FIELD window:

Field category: select Objects

Field names: select Object

Pick your Circle

Under Property select Diameter

Leave the Format as Decimal

Precision: select 0.00 <increase precision will result in higher accuracy with the rounding

Don't add the 12 factor here and click OK

paullimapa_1-1729100979796.png

Now back in the original Field window click Evaluate button and you'll see the rounded value to the nearest 0.5 in Preview:

paullimapa_2-1729101041459.png

In this example 9.77 x 12 = 117.24

The nearest 0.5 = 117.0

Here's another example with the Diameter value shown as 11.62

paullimapa_3-1729101199893.png

11.62 x 12 = 139.44

The nearest 0.5 = 139.5

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos