Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hey guys,
I am trying to drive some parameters with a number, and it automatically rounds to two decimal places. I would assume there is a way to set this decimal place but I am having a hard time finding it.
Thank you!
Brock
Solved! Go to Solution.
Hi, there is a config option Param_dec_places. You the number of decimal places here.
Regards
John
Hi, there is a config option Param_dec_places. You the number of decimal places here.
Regards
John
Interesting... By default mine is 6 places but it is truncated as using the parameter in relations is much greater.
in this case, I set x=pi in part relations. I used "x" in the sketch and as a height value of an extrude. Removing the rounding, it has more than 6 digit accuracy.
Here is a question for PTC then: That "param_dec_places" option in the config.pro file says it sets the number of decimal places to display in parameters. Does it affect only the display then, and the number actually goes out to 14 places?
If I remember, there's also a way to truncate the display in notes and such. I think it's syntax is: parameter[.1] (for one-place, [.2] for 2-place, etc.)
It appears to affect the displayed value only. Here is how I tested:
Default Setting:
Relation:
Parameter Display:
Change setting to "2".
Parameter Display:
Save model, close, erase from session.
Change setting to "12".
Open model.
Parameter Display:
Makes sense, thanks for checking that Tom!
You remember correct Frank. Plus, you can also control the display (rounding up) by relation. For example floor(parameter+0.005) would yeild as a value 2.2600 instead of say 2.2554
John