I have some driven parameters that are listed in my part list. I need these to display and round to the nearest sixteenth of an inch. My variable will display in decimals and carries over four places. I know when using fractions you set it to 1/16 and your done. Here I am at a loss...
Any help would be appreciated.
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
In your parts list where you are showing the parameter. Right click the column header and select Format Column. Check "Apply Units Formatting". Set for length, Fractional (choose your fraction stack method), Precision and decide if you want to show the Unit String (in.)
I hope this was what you were looking for.
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
That, I don not believe you can do. If you use decimals and set the precision to 4 places that's exactly what you're going to get. A precise decimal number to 4 places. I think the only way you can round to a 1/16", would be to go with fractional values.
That said, there may be a way to do somehting like this using ilogic. I've barely even cracked the book I have on trying to learn that so I'm afraid I'd be a bad source of advice there. You may way to pose this to the Inventor Customization forum, there are some very talented people in there that might have some ideas.
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
This is a bit of iLogic I found that will round a model dimension to the nearest increment that you set.
A couple notes, there needs to be a parameter with the same name as the one in the code. Replace model_dimension with the name of a a dimension (d51, d14, etc) or a parameter name and the code will save the result of the rounding to parameter_name. There is a function called ceiling which will always round a value up to the nearest whole number I think. That might help you with your rounding up need. I hope this helps.
inc = .0625
parameter_name = Round(Round(model_dimension,4) / inc) * inc
A couple notes, there must be a parameter matching the names in the code, and you need to replace
Just to be clear, I found this code from a blog. I'm certainly not smart enought to write any code for myself
Here's the link to where I found it:
http://opendesignproject.org/2012/02/03/inventor-ilogic-rounding-decimals/
Hi dexterdweller,
You could create a User Parameter to format your Driven/Reference Parameter. And then just use the User Parameter (named as you like) as a custom iProperty in the BOM and Parts List.
A formula such as this:
round(d8 * 16 ul / 1 in) * 1 in / 16 ul
Where d8 is the Reference Parameter, will round to the nearest 16th, then you would check the Export Parameter option (red arrow below) , and then right click on the parameter (green arrow), and set the user parameter's Custom Property Format to a 4 place percision.
Then you would configure your BOM and/or Parts list to see the resulting custom iProperty (post back if you need help with that part of it).
An alternate way that allows you change the round value easier:
See cwhetten's posts at this link for an explanation of the equation and funky units conversion:
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com