pycatia.dnb_state_interfaces.dnb_3d_state¶
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.dnb_state_interfaces.dnb_3d_state.DNB3DState(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectDNB3DStateInterface representing the 3D State object.Role: Represents a 3D State object and provides APIs to update an existing 3Dstate object.- add_3d_position(i_position: Position) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Add3DPosition(DNBIA3DStatePosition iPosition)Adds the specified 3D Position to the given 3D state as a child. This inputstate object should be defined inside the product hierarchy of the ‘this’state. Otherwise this method would return E_FAIL.Parameters:iPositionThe 3D position object to be added.Example:This example adds a specified 3D position to a 3D State as achild.Dim myState1 As DNB3DStateDim myPostion As DNB3DStatePositionmyPostion =myState1.Add3DState(myPostion)
- Parameters:
i_position (DNBIA3DStatePosition) –
- Return type:
None
- add_3d_state(i_state: DNB3DState) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Add3DState(DNB3DState iState)Adds the specified 3D state to the given 3D state as a child. This inputstate object should be defined inside the product hierarchy of the ‘this’state. Otherwise this method would return E_FAIL.Parameters:iStateThe 3D State object to be added.Example:This example adds a specified 3D state to a 3D State as achild.Dim myState1 As DNB3DStateDim myState2 As DNB3DStatemyState2 =myState1.Add3DState(myState2)
- Parameters:
i_state (DNB3DState) –
- Return type:
None
- assign_3d_state(i_process: Activity, i_condition: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Assign3DState(Activity iProcess,CATBSTR iCondition)Assigns the 3D state to a specified process, based on the givencondition.Parameters:iProcessThe activity to which the 3D state is to be assigned.iConditionThe condition on which the 3D state is assigned to the specifiedprocess. iCondition should be one of “Begin Condition” or “End Condition” or“3D Context”Example:This example assigns myState to mySelectedAct as a “BeginCondition” .Dim myState As DNB3DStatemySelectedAct =myState =myState1.Assign3DState(mySelectedAct, “BeginCondition”)
- Parameters:
i_process (Activity) –
i_condition (str) –
- Return type:
None
- get_children(i_type: str, o_children_array: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub GetChildren(CATBSTR iType,CATSafeArrayVariant oChildrenArray)Returns the list of all the 3D states or 3D positions or both, managed bythe given 3D state.Parameters:iTypeThe type of children to be obtained which can be “3D State” or “3DPosition” or “All”.Returns:oChildrenArray The list of 3D states or 3D positions or both, managedby the given 3D state.Example:This example returns the list of 3D States managed bymyState.Dim myState As DNB3DStateDim statesArray()myState =numStates = myState.GetNumberOfChildren(“3D State”)Redim statesArray(numStates - 1)myState.GetChildren “3D State”,statesArray
- Parameters:
i_type (str) –
o_children_array (tuple) –
- Return type:
None
- get_condition_name(i_related_activity: Activity) str ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetConditionName(Activity iRelatedActivity) AsCATBSTRReturns the condition type on which the 3D State has been assigned to aspecified activity.Parameters:iRelatedActivityThe activity to which the 3D state has been assigned based on acondition.Returns:oConditonName The condition type on which the 3D State has beenassigned and can have the value as “Begin Condition” or “End Condition” or “3DContext”Example:This example returns the condition on which the given activity hasbeen assigned to the state.Dim myState As DNB3DStateDim conditionName as StringDim activitiesArray()myState =mySelectedAct =conditionName = myState.GetConditionName(iRelatedActivity)
- Parameters:
i_related_activity (Activity) –
- Return type:
str
- get_number_of_children(i_type: str) int ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetNumberOfChildren(CATBSTR iType) As longReturns the number of 3D states or 3D positions or both, managed by thegiven 3D state.Parameters:iTypeThe type of children to be obtained which can be “3D State” or “3DPosition” or “All”.Returns:oNumberOfChild The number of 3D states or 3D positions or both, managedby the given 3D state.Example:This example returns the number of 3D States managed bymyState.Dim myState As DNB3DStateDim statesArray()myState =numStates = myState.GetNumberOfChildren(“3D State”)
- Parameters:
i_type (str) –
- Return type:
int
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetNumberofRelatedActivities(CATBSTR iConditionType) AslongReturns the number of activities/processes associated with the 3D Statebased on the condition on which the state has beenassigned.Parameters:iConditionTypeThe condition on which the state has been assigned. The conditiontype should be one of “Begin Condition” or “End Condition” or “3D Context” or“All”.Returns:oNumActivities The number of activities assigned to the given 3D statebased on the specified condition.Example:This example returns the number of activities assigned to myStateas a “End Condition”.Dim myState As DNB3DStateDim activitiesArray()myState =numOfActivities = myState.GetNumberofRelatedActivities(“End Conditon”)
- Parameters:
i_condition_type (str) –
- Return type:
int
- get_parent() AnyObject ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetParent() As CATBaseDispatchReturns the parent for the 3D StateReturns:oParent The parent under which the 3D state has been created whichcould be “3D States” or “Mfg Positions”Example:This example returns the number of activities assigned to myStateas a “End Condition”.Dim myState As DNB3DStatemyState =parentObj = myState.GetParent
- Return type:
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub GetRelatedActivities(CATBSTR iConditionType,CATSafeArrayVariant oActivitiesArray)Returns the list of activities/processes associated with the 3D State basedon the condition on which the state has been assigned.Parameters:iConditionTypeThe condition on which the state has been assigned. The conditiontype should be one of “Begin Condition” or “End Condition” or “3D Context” or“All”.Returns:oActivitiesArray The list of activities assigned to the given 3D statebased on the specified condition.Example:This example returns the list of activities assigned to myState asa “End Condition”.Dim myState As DNB3DStateDim activitiesArray()myState =numOfActivities = myState.GetNumberofRelatedActivities(“End Conditon”)Redim activitiesArray(numOfActivities - 1)myState.GetRelatedActivities “EndConditon”,activitiesArray
- Parameters:
i_condition_type (str) –
o_activities_array (tuple) –
- Return type:
None
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetRelatedObject() As CATBaseDispatchReturns the product/resource/MA/ASTMA on which the given state is beingdefined.Returns:oRelatedObj The product/resource/MA/ASTMA on which the given state isbeing defined.Example:This example returns the product/resource/MA/ASTMA on which thegiven state is being defined.Dim myState As DNB3DStatemyState =Set relObj = myState.GetRelatedObject
- Return type:
- remove_3d_position(i_position: Position) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Remove3DPosition(DNBIA3DStatePosition iPosition)Removes the specified 3D position from the given 3D state’s definitionlistParameters:iPositionThe 3D position object to be removed.Example:This example removes a specified 3D state from a 3D state’sdefinition list .Dim myState1 As DNB3DStateDim myPostion As DNB3DStatePositionmyPostion =myState1.Remove3DPosition(myPostion)
- Parameters:
i_position (DNBIA3DStatePosition) –
- Return type:
None
- remove_3d_state(i_state: DNB3DState) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Remove3DState(DNB3DState iState)Removes the specified 3D state from the given 3D state’s definitionlistParameters:iStateThe 3D State object to be removed.Example:This example removes a specified 3D state from a 3D state’sdefinition list .Dim myState1 As DNB3DStateDim myState2 As DNB3DStatemyState2 =myState1.Remove3DState(myState2)
- Parameters:
i_state (DNB3DState) –
- Return type:
None
- property state_name: str¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property StateName() As CATBSTRReturns or sets the Name of the 3D State.Example:This example fetches the Name of a 3D State.Dim stateName As StringstateName = mySelected3DState.StateNameThis example sets the Name of a 3D State.mySelected3DState.StateName = “NewStateName”
- Return type:
str
- unassign_3d_state(i_process: Activity) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Unassign3DState(Activity iProcess)Unassigns the 3D state from a specified process.Parameters:iProcessThe activity from which the 3D state is to beunassigned.Example:This example unassigns myState frommySelectedAct.Dim myState As DNB3DStatemySelectedAct =myState =myState.Assign3DState(mySelectedAct)
- Parameters:
i_process (Activity) –
- Return type:
None