3D PLM PPR Hub Open Gateway

Knowledge Modeler

Literal Feature Overview

The benefits of using parameters and relations
Technical Article

Abstract

The purpose of this article is to explain the benefits of using parameters and relations from a developer standpoint. To keep up with the material discussed in this article, it is better to have a prerequisite knowledge of the parameter, formula and design table principles from an end user point of view. If you are a brand new on these subjects, take a look at the Knowledge Advisor User's Guide. It is also absolutely required to dabble with the ObjectSpecsModeler principles.


Introduction

Parameters are those objects you manipulate when you edit a feature in order to display or modify its properties. Relations are objects whereby you specify that a parameter is defined with respect to others. As an end user, you can create parameters from the "Formulas" dialog box as well as from most workbenches.

Parameters are referred to as literals. Parameters and relations as well as the services to manage them are all described in the KnowledgeInterfaces framework.

[Top]

Some Basic Capabilities

A hole is a mechanical feature which is defined by its type (simple, tapered, etc.), its extension (blind, up to last, etc.)and its parameters: its diameter, its depth, its threading and some others characteristics depending or not on the hole type.

When you edit a hole, you display a panel with the values of the hole characteristics. All these characteristics are defined in the CATIA internal code as feature attributes (CATISpecAttribute).

[Top]

Accessing the Feature Attributes in F(x)

When you click the icon, most of the hole characteristics are displayed in the parameter list. To be displayed and managed by the "Formulas" dialog box services, the hole feature as well as its parameters must fulfill two main conditions edicted by the KnowledgeInterfaces framework:

In the mechanical modeler, all the features implement CATIParmPublisher from the very beginning.

From F(x), you can access the values of the hole parameters and modify them as well, you can add a formula to these parameters and you are also warned when a parameter is constrained by a formula (the value field is grayed out).

If you define your own feature and want to make your feature attributes displayed and managed in , you must implement your attributes as parameters.

[Top]

Adding Knowledgeware Relations

There is another advantage of implementing attributes as CATICkeParm objects: you can constrain a parameter by a rule or use it in a check and benefit from all the advantages provided by the knowledgeware products (Knowledge Advisor for example).

In the figure above, the hole diameter named PartBody\Hole.1\Diameter is constrained by a rule. The value field of the "Edit name or value of the current parameter is grayed out. You are warned by a push button (not simply an icon) that the hole diameter is constrained by a relation. You can't modify the hole diameter value. Clicking the push button opposite the value field displays the relation edition box.

Relations only take CATICkeParm objects as their arguments. Relations are objects that implement the CATICkeRelation interface.

You can create your own relations. To do so, you must create the appropriate CATICkeRelation object by using one of the methods provided by the CATICkeParmFactory interface. This is explained and exemplified in the Creating and Managing Relations article [1].

[Top]

Using Specific Editing Capabilities

Back to our hole example. If the hole diameter is constrained by a rule:

You can find these editing capabilities not only in but also in the hole edition box (the dialog box which is displayed when you click the hole feature in the geometry area or in the specification tree).

The hole edition box uses the capabilities provided by the CATICkeParamFrame interface. These capabilities operate on CATICkeParm objects constrained by CATICkeRelation objects.

Portion of the dialog box which is managed by the LiteralsEditor framework.
Portion of the Hole edition box managed by the LiteralsEditor framework.

[Top]

Other Benefits

The other benefits deal with manipulators, event managing, unit and magnitude management, and adding user functions.

[Top]

Manipulators

When editing a parameter, right-clicking the value field displays a contextual menu which provides you with commands to help you select the value to be assigned to a parameter.

When you modify the parameter value, you use the use the arrows to increment or decrement the amount to be specified. This object which appears to the end-user as up and down arrows is called a spinner. The object which describes how the spinner behaves is called a manipulator.

You can describe a manipulator as an object which has bounds, which increments or decrements its value by a certain number of the appropriate units etc. The manipulator dictates the lower and upper bounds of the parameter value (Range command in the contextual menu), the number of steps to be memorized by the system when you add a new step from the Change Step command or a list of authorized values for multiple-value parameters.

A manipulator is a LiteralFeatures capability which can be accessed on CATICkeParm objects. For information on how to create a manipulator, see Using Manipulators [2].

[Top]

Event Managing

The KnowledgeInterfaces framework provides you with a number of services whereby you can be notified whenever certain types of events occur. These events are:

[Top]

Unit and Magnitude Management

Literals support a large number of units and magnitudes i.e. quantities expressed in specific units. Length,
Angle and Time are magnitudes for example.

See About Units [3] for information on the services provided to manage units.

Magnitudes are managed through a dictionary, see Using Persistent Parameters [4] for examples illustrating how to use units and magnitudes.

[Top]

Adding User Functions

Parameters can be constrained by relations. Within a relation, you can use other parameters as well as operators and functions. If the default functions do not suit your application needs, you can add new functions. These new functions will be used by the end-user from the dictionary.

See Writing a User Function [5] for more information on how to write a user functions.

[Top]


In Short

The KnowledgeInterfaces framework provides you with services to publish your features and integrate your feature attributes to the F(x) capabilities. When your feature attributes meet the LiteralFeatures requirements, you can benefit from additional knowledgeware capabilities:


References

[1] Creating and Managing Relations
[2] Using Manipulators
[3] About Units
[4] Using Persistent Parameters
[5] Writing a User Function
[Top]

History

Version: 1 [Jan 2000] Document created
[Top]

Copyright © 2000, Dassault Systèmes. All rights reserved.