Attribute links in CATIA let the user associate a text in the drawing file with a parameter in the 3D model. The basics of the attribute links have been well explained by my colleague, Mark Potrzebowski, in his blog post “How to create an attribute link in CATIA”.
But what if you want to link a text in drawing to a measurement in the 3D model, and you want the value to show a very specific number of decimal places? In this blog post, we will cover exactly that.
As an example, I will explain how to show in your drawing the mass of the part rounded to three decimal places.
We start by creating a new parameter, in this case of type Mass, because the parameter’s units must match the units of the measure.
Rename the new parameter to a more meaningful name, for example MassRounded, and click Add Formula.
In the Formula Editor dialog box that opens, select the Math section in the Dictionary, and double-click the round(Real, String, Integer):Real function in the list to put it into the body of the formula, as shown below.
Here’s the description of the function in CATIA’s Help Documentation.
Put the mouse cursor between the opening parenthesis and the 1st comma and select the Mass measure in the tree to put the measure as the 1st argument for the round function.
Type “kg” after the 1st comma, and 3 after the 2nd comma. This means that the mass will be rounded to 1.e-3kg, which is 1g. The formula should look as shown below.
Close the Formula Editor and the Formulas dialog boxes. The MassRounded parameter now displays the mass in kg, rounded to 3 decimal places.
In the Drawing, create a text and initiate creation of the Attribute link the usual way.
Activate the 3D model and select the MassRounded parameter in the tree.
Once CATIA switches back to the drawing, select the MassRounded parameter in the Attribute Link Panel box, and click OK.
Close the Text Editor. The text now displays the mass of the part with the required number of decimal places.
Voila! Now whenever the mass of the part changes and the drawing is updated, the text in the drawing will display the new mass of the part.
The use of parameters, formulas, and attribute links are covered in the Rand 3D training courses CATIA Knowledge Advisor and Expert and CATIA Generative Drafting.
About the Author
Follow on Linkedin Visit Website More Content by Iouri Apanovitch