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.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
DNB3DState

Interface representing the 3D State object.

Role: Represents a 3D State object and provides APIs to update an existing 3D
state 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 input
state object should be defined inside the product hierarchy of the ‘this’
state. Otherwise this method would return E_FAIL.

Parameters:

iPosition
The 3D position object to be added.

Example:
This example adds a specified 3D position to a 3D State as a
child.

Dim myState1 As DNB3DState
Dim myPostion As DNB3DStatePosition
myPostion =
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 input
state object should be defined inside the product hierarchy of the ‘this’
state. Otherwise this method would return E_FAIL.

Parameters:

iState
The 3D State object to be added.

Example:
This example adds a specified 3D state to a 3D State as a
child.

Dim myState1 As DNB3DState
Dim myState2 As DNB3DState
myState2 =
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 given
condition.

Parameters:

iProcess
The activity to which the 3D state is to be assigned.

iCondition
The condition on which the 3D state is assigned to the specified
process. iCondition should be one of “Begin Condition” or “End Condition” or
“3D Context”

Example:
This example assigns myState to mySelectedAct as a “Begin
Condition” .

Dim myState As DNB3DState
mySelectedAct =
myState =
myState1.Assign3DState(mySelectedAct, “Begin
Condition”)
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 by
the given 3D state.

Parameters:

iType
The type of children to be obtained which can be “3D State” or “3D
Position” or “All”.

Returns:
oChildrenArray The list of 3D states or 3D positions or both, managed
by the given 3D state.

Example:
This example returns the list of 3D States managed by
myState.

Dim myState As DNB3DState
Dim 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) As
CATBSTR

Returns the condition type on which the 3D State has been assigned to a
specified activity.

Parameters:

iRelatedActivity
The activity to which the 3D state has been assigned based on a
condition.

Returns:
oConditonName The condition type on which the 3D State has been
assigned and can have the value as “Begin Condition” or “End Condition” or “3D
Context”

Example:
This example returns the condition on which the given activity has
been assigned to the state.

Dim myState As DNB3DState
Dim conditionName as String
Dim 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 long

Returns the number of 3D states or 3D positions or both, managed by the
given 3D state.

Parameters:

iType
The type of children to be obtained which can be “3D State” or “3D
Position” or “All”.

Returns:
oNumberOfChild The number of 3D states or 3D positions or both, managed
by the given 3D state.

Example:
This example returns the number of 3D States managed by
myState.

Dim myState As DNB3DState
Dim 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) As
long

Returns the number of activities/processes associated with the 3D State
based on the condition on which the state has been
assigned.

Parameters:

iConditionType
The condition on which the state has been assigned. The condition
type 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 state
based on the specified condition.

Example:
This example returns the number of activities assigned to myState
as a “End Condition”.

Dim myState As DNB3DState
Dim 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 CATBaseDispatch

Returns the parent for the 3D State

Returns:
oParent The parent under which the 3D state has been created which
could be “3D States” or “Mfg Positions”

Example:
This example returns the number of activities assigned to myState
as a “End Condition”.

Dim myState As DNB3DState
myState =
parentObj = myState.GetParent
Return type:

AnyObject

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 based
on the condition on which the state has been assigned.

Parameters:

iConditionType
The condition on which the state has been assigned. The condition
type 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 state
based on the specified condition.

Example:
This example returns the list of activities assigned to myState as
a “End Condition”.

Dim myState As DNB3DState
Dim activitiesArray()
myState =
numOfActivities = myState.GetNumberofRelatedActivities(“End Conditon”)
Redim activitiesArray(numOfActivities - 1)
myState.GetRelatedActivities “End
Conditon”,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 CATBaseDispatch

Returns the product/resource/MA/ASTMA on which the given state is being
defined.

Returns:
oRelatedObj The product/resource/MA/ASTMA on which the given state is
being defined.

Example:
This example returns the product/resource/MA/ASTMA on which the
given state is being defined.

Dim myState As DNB3DState
myState =
Set relObj = myState.GetRelatedObject
Return type:

AnyObject

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 definition
list

Parameters:

iPosition
The 3D position object to be removed.

Example:
This example removes a specified 3D state from a 3D state’s
definition list .

Dim myState1 As DNB3DState
Dim myPostion As DNB3DStatePosition
myPostion =
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 definition
list

Parameters:

iState
The 3D State object to be removed.

Example:
This example removes a specified 3D state from a 3D state’s
definition list .

Dim myState1 As DNB3DState
Dim myState2 As DNB3DState
myState2 =
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 CATBSTR

Returns or sets the Name of the 3D State.

Example:
This example fetches the Name of a 3D State.

Dim stateName As String
stateName = mySelected3DState.StateName

This 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:

iProcess
The activity from which the 3D state is to be
unassigned.

Example:
This example unassigns myState from
mySelectedAct.

Dim myState As DNB3DState
mySelectedAct =
myState =
myState.Assign3DState(mySelectedAct)
Parameters:

i_process (Activity) –

Return type:

None