cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter Decimal Place

bwudtke
10-Marble

Parameter Decimal Place

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.5-20-2014+8-12-31+AM.png

Thank you!

Brock


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 ACCEPTED SOLUTION

Accepted Solutions
John.Pryal
12-Amethyst
(To:bwudtke)

Hi, there is a config option Param_dec_places. You the number of decimal places here.

Regards

John

View solution in original post

6 REPLIES 6
John.Pryal
12-Amethyst
(To:bwudtke)

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.

param_accuracy.PNG

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.)

TomU
23-Emerald III
(To:Patriot_1776)

It appears to affect the displayed value only. Here is how I tested:

Default Setting:

7.PNG

Relation:

6.PNG

Parameter Display:

5.PNG

Change setting to "2".

Parameter Display:

8.PNG

Save model, close, erase from session.

Change setting to "12".

Open model.

Parameter Display:

9.PNG

Patriot_1776
22-Sapphire I
(To:TomU)

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

Announcements