The Hidden Intelligence Of CATIA V5 – Part 1 (Formulas and Parameters)
When I think of the countless customers I have consulted with over the years, it amazes me how many don’t use parameters to control the design and capture design intent! What is a parameter, you ask? A parameter can be thought of in two ways when it comes to CATIA V5. Parameters are built the moment you start a new part – as you can see in the image below, we already have parameters for the Part Number, Nomenclature, Revision, Product Description, and Definition created automatically. Parameters are being created each time you build any feature. These types of parameters are known as system parameters.
You can and should build your own parameters to define your design intent. It’s every bit as important during the initial stages of a design to define your intent this way as it is to make sure sketches are constrained properly. In fact, it helps you in your sketch constraints (every constraint is a feature that has parameters associated to it). In this simple example of a piece of standard rectangular tubing shown below, there are constraints defining the height, width, wall thickness, and radii. Even though this is very easy to create, if I am a designer I would want to design it in such a way that I never have to waste any time designing a piece of rectangular tubing again. If I am a design leader, I feel the same and don’t want any of my designers doing this again in any design that involves any piece of rectangular tubing. The use of parameters will get us there!
The parameters I am talking about are user defined parameters. Simple to create but very, very powerful in their functionality. The simplest way to create a user defined parameter in CATIA V5 is through the fx icon found on the Knowledge toolbar.
You might be thinking, where have I seen that icon before? Oh yeah, in Excel when I need to create a formula for my cell. That is the point we are making here! In Excel, I use this function to compute things for me and make it easy to come up with a desired result. In CATIA, we will create some parameters and then, when necessary, assign formulas to them to come up with our desired result. When you click on the icon, you get the Formulas dialog and when you click on the drop down list next to the New Parameter of Type button, you can see you have many, many options.
They are not necessarily listed in alphabetical order, but more or less by popularity. Although not at the top of the list, in my experience Length and Angle have been by far the most used. With that said, one thing to keep in mind is they are unit specific, meaning you cannot substitute an Integer parameter for a Length parameter. An Integer parameter would be used in a case where a whole number would be the input – for example, the number of items in a pattern. For a Length parameter if no units are specified in the formula it would go with whatever the current units are set to in the Tools —> Options —General – Parameters and Measure – Units tab.
Back to the tubing file. I could very easily set up 6 length parameters based on what I said earlier, setting the type to Length and clicking the New Parameter of Type button, as shown below.
There may come a time when I need to link a formula to a parameter, like in this example where I would maybe want the INSIDE RADII parameter to be equal to half of the WALL-THICKNESS value. I also would want my WALL-THICKNESS value to always be equal to my INSIDE RADII value plus the WALL THICKNESS value. These would be very easy to set up. During the creation of the INSIDE RADII parameter, I would simply click on the Add Formula button to launch the Formula Editor.
As you can see, INSIDE RADII is already selected and there is an = sign at the end of the box. Where the cursor is blinking is where you would key in your formula. Without going all geeky on you here, there are a ton of things you could link to from the Dictionary side, but to keep it simple you can either scroll down through the Members of Parameters and find User Parameters and filter the list in Members of All area, or what I like to do when it is a user parameter is to simply select it from the specification tree under the Parameters node and then add in the rest of the formula (which in this case is /2.) and click on the OK button. That would take you back to the Formulas dialog, and you would create the next parameter for OUTSIDE RADII with the formula INSIDE RADII + WALL-THICKNESS by picking from the tree and adding a + sign in between them as shown below.
Now that all of your user parameters have been defined, you would simply link them to the existing sketch constraints (system parameters). That is a super easy task: simply double-click on the constraint like you are going to edit the value key in the = sign and pick your user parameter to link them. See the video below as I link the HEIGHT, WIDTH and 1 of the WALL-THICKNESS parameters. How easy is that!
We could go on with this and create parameters on the 3D side for the overall length, but tubing is usually cut to length anyway. In the video below, I demonstrate on the 3D side how we can use this for every piece of rectangular tubing we could ever need.
Notice I did not enter the sketch one single time and made all my modifications on the 3D side. In closing, we have shown how to create simple parameters and add simple formulas to them and drive your sketch constraints by them in order to save time. The world of CATIA V5 is all about re-use of data and capturing business intelligence we already know exists in all companies. How can we help you? Rest assured Tata Technologies has proven this to many companies time and again. Contact us for ALL your CATIA needs.
Stay tuned for Part 2 in the future!