pycatia.behavior_interfaces.behavior¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357
Warning
The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.
- class pycatia.behavior_interfaces.behavior.Behavior(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectBehaviorRepresents a behavior.Role: A behavior is a set of tasks performed on a technological object. It canbe V5 command, CAA command, VBA command, external application or behaviordefined into the BKT product. A behavior contains a set of variables: theinputs entered by the user and the outputs produced by the behavior. Thisinterface manipulates the characteristics of a behavior: children behaviors,inputs/outputs and activity.- activate() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Activate()Activates a behavior.Example:This example activates a Behavior Beh.Beh.Activate
- Return type:
None
- property behaviors: Behaviors¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Behaviors() As Behaviors (Read Only)Returns the collection of children behaviors.Example:This example retrieves in BehCollection the collection of Behaviorscurrently managed by a Behavior Beh.Dim BehCollection As BehaviorsSet BehCollection = Beh.Behaviors
- Return type:
- deactivate() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Deactivate()Deactivates a behavior.Example:This example deactivates a Behavior Beh.Beh.Deactivate
- Return type:
None
- get_input(p_name: str) AnyObject ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetInput(CATBSTR pName) As AnyObjectReturns the value of one available input of the behavior.Parameters:pNamethe name of the inputExample:This example retrieves in BehParameter the published inputCATIAParameter Nb_Cylinder currently managed by a BehaviorBeh.Dim BehParameter as ParameterSet BehParameter = Beh.GetInput(“Nb_Cylinder”)
- Parameters:
p_name (str) –
- Return type:
- get_output(p_name: str) AnyObject ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetOutput(CATBSTR pName) As AnyObjectReturns the value of one available output of the behavior.Parameters:pNamethe name of the outputExample:This example retrieves in BehPower the published output CATIAParameterPower currently managed by a Behavior Beh.Dim BehPower as ParameterSet BehPower = Beh.GetOutput(“Power”)
- Parameters:
p_name (str) –
- Return type:
- put_output(p_name: str, o_value: AnyObject) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub PutOutput(CATBSTR pName,AnyObject oValue)Valuates an available output of the behavior. The behavior must be inoperating state, otherwise it fails.It can be applicable from a CATIABehaviorVBScript Execution forinstance.Parameters:pNamethe name of the outputoValuethe value of the outputExample:This example assigns to the published CATIAParameter Power of aBehavior Beh. the value of BehPowerDim BehPower as Parameter…Beh.PutOutput “Power”, BehPower
- Parameters:
p_name (str) –
o_value (AnyObject) –
- Return type:
None
- test_input(p_name: str) int ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func TestInput(CATBSTR pName) As longTests if the behavior’s input is set or not.Parameters:pNamethe name of the inputExample:This example tests the existence of the value of the publishedCATIAParameter Nb_Cylinder currently managed by a BehaviorBeh.if (Beh.TestInput(“Nb_Cylinder”))
- Parameters:
p_name (str) –
- Return type:
int
- test_output(p_name: str) int ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func TestOutput(CATBSTR pName) As longTests if the behavior’s output is set or not.Parameters:pNamethe name of the outputExample:This example tests the existence of the value of the publishedCATIAParameter Power currently managed by a BehaviorBeh.if (Beh.TestOutput(“Power”))
- Parameters:
p_name (str) –
- Return type:
int