CATIA Knowledgeware Infrastructure

Relations
Parameters
Formulas
Design Tables

Tips and Techniques - Summary

This part is intended for those of you who need a quick answer to their questions about the Knowledgeware capabilities. However, using this part requires a prerequisite knowledge of the CATIA basic concepts.   

Relations

Reordering Relations Sets and Parameters Sets

You can now reorder parameters sets and relations sets as you already could do for parameters and relations.

  1. Select the relations set that you want to reorder in the specification tree.

  2. Right-click it and select Relations.xxx object>Reorder....

  3. In the Reorder window, select In or After and select a relation.

    • In: Enables you to reorder a relations set or a parameters set in an existing set.

    • After: Enables you to reorder a relations set or a parameters set below an existing set.

Note that:
  • Your can only reorder a parameters set located under an existing parameters set and a relations set under an existing relations set.
  • The first relations set or parameters set of a document cannot be reordered.
  • A parameters set or a relations set can only be reordered in the same document.
  • Parameters and relations order now corresponds to the creation order. Objects are not gathered by types any longer.

Hiding relations

You can hide a knowledge relation (formula, rule, check, ..) by right-clicking this relation in the specification tree and by selecting the Hide command.

  • A visual indicator located at the relations set level indicates that the set contains hidden relations.
    Note that this indicator is not recursive.
  • If you try to delete a relations set containing hidden relations, a message is displayed asking you if you want to delete the relations set that contains hidden relations.
    Note that if you try to delete a relations set containing another relations set with hidden relations, the message will be displayed.

Parameters

Creating a Parameter

Click . In the Formulas Editor, select a type from the New Parameter of type  list, then click New Parameter of type. The new parameter is added to the parameters list. A default name is given to the parameter. If need be, rename this parameter.

Creating a multiple-value parameter

To assign multiple values to a parameter, select Multiple values at parameter creation and enter the values one by one to specify the value list.

Switching between Simple and Multiple Values After Creating a Parameter

It is possible to add values to a single value parameter after creating it. To do so, use one of the 2 methods described below:

First Method
  1. Click the icon in the Knowledge tool bar.  In the Formulas Editor, select a type from the New Parameter of type  list, then click New Parameter of type with Single value. The new parameter is added to the parameter list. A default name is given to the parameter. If need be, rename this parameter.

  1. Click OK when done.

  1. Double-click the parameter in the specification tree. The Edit Parameter window is displayed.

  2. Right-click the value field of the Edit Parameter window and select Add Multiple Values ....

  3. In the Value List window, enter the new values.

  4. Click OK when done.

Second Method
  1. Click the icon in the Knowledge tool bar.  In the Formulas Editor, select a type from the New Parameter of type  list, then click New Parameter of type with Single value. The new parameter is added to the parameter list. A default name is given to the parameter. If need be, rename this parameter.

  1. Click OK when done.

  2. Click the icon in the Knowledge tool bar.  In the Formulas Editor, select the parameter that you have just created.

  3. Right-click the Value field of the Edit name or value of the current parameter field and select Add Multiple Values ....

  4. In the Value List window, enter the new values.

  5. Click OK when done.

Deleting a parameter

There are two ways to proceed:

Or

Only user parameters can be deleted (the Material parameter cannot be deleted). 

Displaying parameters in the f(x) dialog box

The parameter list displayed in the Formulas Editor depends on the selected feature. If you click the document root feature in the specification tree, you display all the document parameters. If you click a given feature in the specification tree, you display only the parameters related to this feature.

Displaying parameter values in the geometry area
To display parameter values in the geometry area, you must have the Formulas Editor open. Selecting a parameter from the parameter list will highlight this parameter in the specification tree and display its value in the geometry area.

Updating parameters values

To update the values of a multiple values parameter:

  1. Double-click the parameter in the specification tree. The Edit Parameter window is displayed.

  2. Right-click the value field of the window, and select Update Values.... The Value List window is displayed.

  3. Edit the values and click OK when done.

Declaring a parameter as constant

Select Properties from the parameter contextual menu. In the Parameter properties tab, check Constant.

Editing or modifying a parameter

There are three ways:

Editing constrained parameters

When a parameter is constrained, a push button is provided opposite the value field of its edition box. This push button represents the relation which constrains the parameters. Clicking this button displays the editor of the relation which constrains the parameter (the formula editor or the rule editor for example).

Adding a comment to a parameter

There are two ways to proceed:

Associating a URL with a parameter

Access the Knowledge Advisor workbench, then click the Comment & URLs icon. 

Hiding a parameter from the specification tree  

There are two ways to proceed:

Importing parameters

Click the icon in the Knowledge tool bar. Then click Import.... A file selection dialog box is displayed.  Select either a .xls file (Windows only) or a .txt file. If the imported parameters already exist in the document, the import process automatically updates the document.

Importing parameters from a VPDM

You can now directly import parameters into the Formula editor from a VPDM.

Ordering Parameters

To reorder parameters, right-click the parameter to be reordered, and select Reorder....  The Reorder dialog box is displayed. In the specification tree, click a parameter below which the parameter to be reordered will be located. Click OK when done.

Specifying a parameter value as a measure  

Edit the parameter, then in the value field of the parameter editor, select Measure Between from the contextual menu. The Measure Between dialog box is displayed. You can use this dialog box to measure the distance between two edges for example. Select Between as measure type, then click successively two edges in the geometry area. The distance between both edges is displayed in the Results pane.

Specifying a tolerance (Length or Angle parameter only)

The default tolerance specified in Parameters Tolerance tab of the Tools>Options>General> Parameters and Measure settings can be redefined. To do this, edit the parameter, right-click the value field of the parameter editor and select Tolerance>Edit....

When a formula links two parameters, and if the input parameter has a tolerance, this tolerance will not be propagated to the output parameter. The value is the only information that is taken into account by formulas or rules.
To know more about working with parameters please see the About Parameters section.

For more information on editing tolerances on a sample part, see Computing Mean Dimensions in the Part Design User's Guide.

Specifying lower and upper bounds  

Edit the parameter, then in the edition box, right-click the value field and select Add Range.... This capability does not apply to parameters such as booleans or strings.

Specifying an increment/decrement amount  

Edit the parameter, then in the edition box, right-click the value field and select Change step.... Select 1mm or click the New one command. In this case, the New step dialog box is displayed and you can enter another step.

Note that:

Specifying the Material parameter value

There are two ways to proceed:

  •  
Select the part you want to apply the material to, then click the icon.  Select one of the material in the library which is displayed. Before doing this, check that the material catalog is installed on your machine.
  •  
Edit the material parameter from the specification tree, then enter the new material in the parameter editor.

Valuating a boolean with a predicate

It is possible to valuate a boolean with a predicate instead of using operators.
See the example provided in the  KwrPredicate.CATPart file.

Modifying the Part Number of a Part in the Formula Editor

It is possible to modify the part number of a document (CATPart, CATProduct, ...).

  1. Open the document.

  2. Click the icon in the Knowledge tool bar. Select the Part Number from the parameters list.

  3. Change the part number in the Edit name or value of the current parameter field.

Note that the part number can also be modified in the Parameters Explorer in Knowledge Advisor.

Creating a Parameters set using a macro

To create a parameters set using a macro, enter the following script:

set mainset = params.RootParameterSet
set SetsColl = mainset.ParameterSets
set newSet = SetsColl.CreateSet("Name of the new set")

Note that:

Formulas

 

In the Formulas editor, the default step is 1 whatever the unit.

Creating a formula

There are three ways to proceed:

Quickly Accessing Parameters Values in the Formulas Editor

A new field enables you to change a parameter value when creating and especially editing a formula.

This field is especially useful when you want to modify the value of a parameter valuated by a formula.
  • Double-click the parameter in the specification tree.

  • Click the icon located next to the parameter value field. The Formula Editor opens.

  • In the Relation body, select the parameter to be modified and change its value. To get an example, see below.

  1. Open the KwrPredicate.CATPart file.

  2. Click the icon in the Knowledge tool bar.

  3. Create 3 parameters of length type with the following values:

    • Length.1=12mm
    • Length.2=14mm
    • Length.3=0mm
  4. Select the Length.3 parameter from the Parameter list and click Add Formula. The Formula Editor is displayed.

  5. Enter the following formula into the editor and click OK when done:

    Length.3=Length.2 *Length.1
  6. Double-click Length.3 in the specification tree. The Edit Parameter dialog box is displayed.

  7. Click the icon located next to the parameter value field. The Formula Editor is displayed.

  8. In the Editor, select Length.2 in the Members of All column and set its value to 9mm in its value field.

  1. Click OK when done. The Length.2 and Length.3 values are updated in the specification tree.

Using the dimensions of a sketch in a formula
Unless sketch dimensions are declared as constraints, you cannot manipulate them as parameters in relations. This applies for example to the radius of a circular sketch or to the width and length of a rectangular sketch.

Editing or modifying a formula

There are four ways to proceed:

Displaying only a formula definition in f(x)

When you click a formula in the specification tree, then click the Formulas icon, the parameter list displays the constrained parameter, the formula activity and the parameters used as input in the formula.

Specifying a measure in a formula or

Activating / deactivating a formula

There are three ways to proceed:

Importing parameters and formulas

Click the icon in the Knowledge tool bar.  In the f(x) dialog box, click Import, then specify the import file path.  The import file must be either a .txt file or a .xls file. The parameters and formulas are applied to the document. If the imported parameters already exist in the document, the document is automatically updated by the import process.

Deleting a formula 

There are three ways to delete a formula:

  1. Click . From the parameter list of the f(x) dialog box, select the parameter which is constrained by the formula to be deleted, then click  Delete Formula.

  2. In the specification tree, right-click the formula to be deleted,  then select Delete.

  3. Editing the parameter. In the parameter editor, right-click the value field, then select Formula>Delete.

Design Tables

Creating a Design Table from the Document Parameter Values

Click the icon in the Knowledge tool bar. Check Create a design table with current parameter values. Select the parameters to insert,  then specify the .xls (Windows) or .txt file where the design table is to be created.

Creating a Design Table from a pre-existing File

Click the icon.  Check the Create a design table from a pre-existing file.  Specify the file containing the design table data, then create the necessary associations.

Editing a Design Table

There are two ways to proceed:

Or

Adding a Column to a Design Table

To add a column to a design table, open the .txt file in a text editor or the .xls file in Excel, and add a column to the file.

Adding Ranges and Values to a Design Table

It is possible to add ranges and default values to a design table. The ranges will appear between [;], and the default values between <> (see example below).

It is possible to specify a range:

Note that:

Deleting a Design Table

In the specification tree, right-click the design table to be deleted, then select Delete.

Making a Query in a Design Table

The syntax which is authorized in the Filter field of the Design Table dialog box (Configurations tab) is the same as for Knowledge Advisor checks. You can type the filtering relation directly in the appropriate field or click Edit... to access the language dictionary.
An example of a query relation:  TangE >10 deg and yE > 10mm

Rearranging Columns in a Design Table

The way columns are arranged in a design table is identical to the way the associations were defined. You can now rearrange the columns without deassociating the parameters and the columns and associating them again just afterwards. To do so,  click the Associations tab in the Design Table window, and use the Up and Down arrow buttons.

Selecting the Design Table Editor on Unix

The environment variable CATTermDT enables you to choose the terminal from which the design tables editor will be started. The editor can be set up by using the environment variable CATTextEditorDT. xterm is used by default.
This way, you can select the terminal, which can impact the way the editor behaves. For example, for Japanese users, if vi is started from xterm, vi will not support kanji whereas if it is started from aixterm (AIX), kanji will be supported.
Example: export CATTermDT=aixterm

Selecting the Design Table External file from a VPDM

You can now select your design table external file from a VPDM.

About the parameters that cannot be inserted in a design table

Only parameters which are not already constrained by any other relation or by any other design table can be used to create a design table. If a parameter is already constrained, it does not appear in the Parameters to insert list in the design table dialog box.

Tips about selecting the parameters to be inserted  in a design table

The Filter Name and Filter Type filters can be used to restrict the display of a parameter list. If you specify x in the Filter Name field of the Select parameters to insert dialog box, you will display all the parameters with the letter x in their name (xA, xB, xC, xD, xE). If you select the Renamed Parameters from the Filter Type list, you will display all the parameters you have renamed in the Formulas Editor (yA, xB, xA, yC, xC, yB, yD, xD, yE, xE, TangE).
Parameters to be inserted can be multiselected. You just have to keep on pressing the Ctrl key when you select parameters. If you do this, the group of multiselected parameters will be carried forward onto the Inserted parameters list in the order in which they are displayed in the initial list.
When the design table is created, the rank of the columns fits the rank of the parameters in the Inserted parameters list. If you want to have columns ordered in a given way in the design table, you must insert the parameters one by one.

Tips about the access functions to the design table

In the formula (rule or check) editor, select the Design Table item in the dictionary, the list of the methods that can be applied to a design table is displayed. Select a method, then click F1 to display the associated documentation.

About the broken status

When the active configuration does not fit the set of configurations resulting from a query operation, you get a message prompting you to deactivate the filter (uncheck the filter box) or change your configuration. If neither action is undertaken, your design table takes on a broken status. In the specification tree, a broken or invalid design table is displayed.