Control the number of decimal places shown on a form

Control the number of decimal places shown on a form

mjuengel
Participant Participant
771 Views
2 Replies
Message 1 of 3

Control the number of decimal places shown on a form

mjuengel
Participant
Participant

How can I control the number of decimal places shown on a form?  I currently have the parameters set to 4 decimal places (the sketch shows everything to 4 decimal places), however, my form only shows 3 decimal places (the value is rounded to 3 decimal places) for the reference parameters while showing 4 for the non-reference parameters.  How do I get the form to show 4 decimal places for all parameters?

0 Likes
Accepted solutions (1)
772 Views
2 Replies
Replies (2)
Message 2 of 3

blandb
Mentor
Mentor

May want to try this in the ilogic forum:

 

https://forums.autodesk.com/t5/inventor-programming-ilogic/bd-p/120 

 

 

 

 

Autodesk Certified Professional
0 Likes
Message 3 of 3

WCrihfield
Mentor
Mentor
Accepted solution

Hi @mjuengel.  I am not sure there is actually a direct way to control those details to the degree you want to control them.  The main place to control how numerical values appear in your documents is by going to the Tools tab, Options panel, and clicking on the Document Settings button.  Then, within the Document Settings dialog, go to the Units tab, then under where it says "Modeling Dimension Display", select different options from the two drop-down menus there.  This is obviously a document level setting, not an application wide setting, and is mostly just a visual effect, not actually changing any numerical values, but just  showing them differently.

 

Within the Parameters dialog directly, there is no such setting / control over how many decimal places will be shown.  We can trick it into showing more or less following zeros by typing in a value with more following zeros, then a 1 or other digit at the end of it, then enter button, then go back and change the last digit to a zero.  But when you put a numerical parameter into an iLogic Form, there is no control / property of that parameter item that will let you control its number of places after the decimal point, or rounding.

However, if you mark a parameter for export in the Parameters dialog, that will automatically create a custom iProperty matching that parameter, and you can control the formatting of that iProperty's value that way, then include that custom iProperty in the iLogic Form.  But changing the value of that custom iProperty will not change the value of that parameter it is a copy of.  Changing the parameter's value does change the iProperty though.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes