Behavior (Object)

Represents a behavior.
Role: A behavior is a set of tasks performed on a technological object. It can be V5 command, CAA command, VBA command, external application or behavior defined into the BKT product. A behavior contains a set of variables: the inputs entered by the user and the outputs produced by the behavior. This interface manipulates the characteristics of a behavior: children behaviors, inputs/outputs and activity.

Properties


Property Behaviors() As (Read Only)
Returns the collection of children behaviors.
Example:
This example retrieves in BehCollection the collection of Behaviors currently managed by a Behavior Beh.
 Dim BehCollection As Behaviors
 Set BehCollection = Beh.Behaviors
 

Methods


Sub Activate()
Activates a behavior.
Example:
This example activates a Behavior Beh.
 Beh.Activate 
 
Sub Deactivate()
Deactivates a behavior.
Example:
This example deactivates a Behavior Beh.
 Beh.Deactivate 
 
Func GetInput( pName) As
Returns the value of one available input of the behavior.
Parameters:
pName
the name of the input
Example:
This example retrieves in BehParameter the published input CATIAParameter Nb_Cylinder currently managed by a Behavior Beh.
 Dim BehParameter as Parameter
 Set BehParameter = Beh.GetInput("Nb_Cylinder")
 
Func GetOutput( pName) As
Returns the value of one available output of the behavior.
Parameters:
pName
the name of the output
Example:
This example retrieves in BehPower the published output CATIAParameter Power currently managed by a Behavior Beh.
 Dim BehPower as Parameter
 Set BehPower = Beh.GetOutput("Power")
 
Sub PutOutput( pName, oValue)
Valuates an available output of the behavior. The behavior must be in operating state, otherwise it fails.
It can be applicable from a CATIABehaviorVBScript Execution for instance.
Parameters:
pName
the name of the output
oValue
the value of the output
Example:
This example assigns to the published CATIAParameter Power of a Behavior Beh. the value of BehPower
 Dim BehPower as Parameter
 ...
 Beh.PutOutput "Power", BehPower
 
Func TestInput( pName) As
Tests if the behavior's input is set or not.
Parameters:
pName
the name of the input
Example:
This example tests the existence of the value of the published CATIAParameter Nb_Cylinder currently managed by a Behavior Beh.
 if (Beh.TestInput("Nb_Cylinder"))
 
Func TestOutput( pName) As
Tests if the behavior's output is set or not.
Parameters:
pName
the name of the output
Example:
This example tests the existence of the value of the published CATIAParameter Power currently managed by a Behavior Beh.
 if (Beh.TestOutput("Power"))