Relation (Object)

Represents the relation object.
It is an abstract object which is not intended to be created as such, but from which the check, design table, formula, rule, objects derive.
See also:
, , ,

Properties


Property Comment() As
Returns or sets the comment associated with the relation. The comment explains the relation's purpose. It is passed as the second input argument of the relation creation methods of the collection.
Example:
This example retrieves the maximummass relation comment and displays it in a message box:
 relcomment = maximummass.Comment
 MsgBox "maximummass comment : " & relcomment
 
Property Context() As (Read Only)
Returns the context of the parameter.
The context of a parameter can be a part, a product, a drafting, or a process document, depending where the parameter is.
Returns:
The context
See also:
, , CATIADrawing, CATIAProcess
Property NbInParameters() As (Read Only)
Returns the number of input parameters of the relation.
Property NbOutParameters() As (Read Only)
Returns the number of output parameters of the relation.
The output parameters of the relation are those constrained by the relation.
Property Value() As (Read Only)
Returns the definition of the relation. It returns an empty string if the relation is not an expressional one (for example for a design table). The definition is the body to be executed to compute one or several parameters. It is passed as the last input argument of the relation creation methods of the collection.
Example:
This example retrieves the maximummass relation definition and displays it in a message box:
 reldef = maximummass.Value
 MsgBox "maximummass relation is defined as " & reldef
 

Methods


Func GetInParameter( iIndex) As
Returns an input parameter of the relation.
This method can return an object that is not a parameter, that is, you cannot handle it as a Parameter object. For example, in a relation like
Area.1 = area(PartBody\Pad.1\Sketch.1)
the object PartBody\Pad.1\Sketch.1 is a sketch and not a parameter.
To use such an object, call the Visual Basic TypeName function to retrieve its real type.
Dim objectType
 objectType = TypeName(oParameter)
 If objectType = "Parameter" Then
 ...
Parameters:
iIndex
The searched input parameter index in the relation.
Legal values: 1 ≤ iIndex ≤
Func GetOutParameter( iIndex) As
Returns an output parameter of the relation. Use TypeName method on the returned parameter to get the real type of the parameter.
Parameters:
iIndex
The searched input parameter index in the relation.
Legal values: 1 ≤ iIndex ≤
Sub Modify( iValue)
Modifies the relation.
Parameters:
iValue
The new relation value
Sub Rename( iName)
Renames the relation.
Parameters:
iName
The new relation name