Controlling Decimal Places Of A Parameter Value Through A Formula
Controlling Decimal Places Of A Parameter Value Through A Formula
(OP)
Using Catia V5R19, Service Pack 8, Build Number 19;
Is it possible to control the decimal places of a value parameter by means of a formula?
Any response will be greatly appreciated!
Is it possible to control the decimal places of a value parameter by means of a formula?
Any response will be greatly appreciated!





RE: Controlling Decimal Places Of A Parameter Value Through A Formula
Tools - Options - General - Parameters and Measures - Units
this will show on a global scale for all parameters.
You can also use the round math function. see attached.
I made 4 parameters
length.1 - input
length.2 - result
round_num (integer)for the number of decimal places to round to
Unit (string) multi pull down for in or mm (inch or milli)
Regards,
Derek
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
if you want to forget Unit as a variable string and round_num as a variable integer
below is units inch and 2 decimal places
round(Length.1,"in",2)
round(Length.1,Unit,round_num)
what is important is the variable types.
Length.1 is a length
Length.2 is a Length
Unit is a type string
round_num is type integer
what error are you receiving?
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
Syntax Error line 1 :
Parameter Radius.1 cannot be used in this context.
Do you want to go back to the editor (otherwise the relation will be broken and deactivated)
I want to associate a driving dimension in the sketch environment with a formula by;
• right-clicking the dimension
• Scrolling down to xxx.x object
• Clicking on "Edit formula"
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
Retarded I know, but older versions of Catia this was a Radius only and would cause severe problems with peoples scripts and code if they toggled it in a major revision change.
Regards,
Derek
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
One with a formula tied to the constraint.
Another tied to an equivalent dimension in a formula.
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
•Control the decimal precision of a driving dimension in the part environment
•Dimension that driving dimension in a drawing maintaining the decimal precision from the part environment, over writing the global decimal precision.
I have been able to achieve this by locking the parameters, but the drawback is that you have to unlock the parameters if you want to edit the sketch and/or feature dimension.
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
Answer:
When I detail features (i.e. Detailing a counterbore from its top view) using the "Attribute Link" inside a Text editor box, the decimal precision is displayed with respect to what the global settings are at that moment. At first it's OK, but if you change the global decimal precision setting and update the drawing, those linked values get updated to the new decimal precision setting. I want to eliminate this from happening. So I figured if I can force the sketched/part feature dimension in the desired decimal precision it will never change regardless of what the global setting precision is.
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
I see, interesting way of locking the dimension.
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
A couple of things to think about.
1)
Tools - Options - Mechanical Design - Draft - Administration
Prevent update of standard
Prevent switch of standard
2)
Select the dimension in drafting - edit properties
Graphics tab - Turn off pickable.
This will make it impossible to select the dimension on the screen
To set it back you will have to search and select - all dimensions and set them all back to pickable.
3)
Just a time saver but do you use Generate Dimensions? Works great if your models are have constraints and history.
Regards,
Derek
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
2. I have turned off "pickable" and it does not prevent the values from changing because they are dependent on the global settings in "Parameters and Measure"/ "Units".
3. No, I've never used "Generate Dimensions" always the standard dimensions toolbar.
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
Can someone please?
1. Create a "Pad"
2. Create a counter bore using the "Hole" function
3. High-light the counter bore diameter, "right-click" the dimension and click "Edit Formula..."
4. Click "Math" under "Dictionary"
5. Click "round (Real): Real" function under "Members of math"
6. Try rounding the counter bore dimension value to 2 decimal places in "inch" units
I can't figure out number 6, can anyone help?
Any response will be greatly appreciated!
RE: Controlling Decimal Places Of A Parameter Value Through A Formula
You can not round the input value of counter bore and place the output back as the input. This causes a logical loop. You would need to create a parameter for counter bore size and if you are going to that extent you might as well round the number yourself.