pycatia.dnb_state_interfaces.dnb_3d_state_management

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_management.DNB3DStateManagement(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
DNB3DStateManagement

Interface representing the 3D State Management in the
CATDocument.

Role: Provides access the C++ interfaces DNBIState, DNBIStateMgt to create and
manage the 3D States.
create_3d_state(i_state_name: str, i_object: AnyObject, i_list_defn: tuple) DNB3DState

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func Create3DState(CATBSTR iStateName,
CATBaseDispatch iObject,
CATSafeArrayVariant iListDefn) As DNB3DState

Creates a 3D State object

Parameters:

iStateName
The name of the 3D State to be created.
iObject
The object(Resource/MA/Product..)on which the state is to be
created
iListDefn
The definition list(an existing 3D State/3D Position) on which the
new state is to be created

Returns:
oState The 3D State object created.

Example:
For example, Creating a 3D State with the name “My NewState” on the
already existing 3D State “My State”.

Dim MySelectedProduct
Dim MySelectedState as DNB3DState
Dim MyNewState1 as DNB3DState
defnArray[0] = MySelectedState
Set MyNewState1 = stateManagement.Create3DState(“My NewState”,MySelectedProduct,defnArray)
Parameters:
  • i_state_name (str) –

  • i_object (AnyObject) –

  • i_list_defn (tuple) –

Return type:

DNB3DState

delete_3d_state(i_state: DNB3DState) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub Delete3DState(DNB3DState iState)

Deletes the specified state object

Parameters:

iState
The 3D State object to be deleted.

Example:

Dim MySelectedProduct
Dim MySelectedState as DNB3DState

stateManagement.Delete3DState(MySelectedState)
Parameters:

i_state (DNB3DState) –

Return type:

None

get_3d_state(i_object: AnyObject, i_state_name: str) DNB3DState

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func Get3DState(CATBaseDispatch iObject,
CATBSTR iStateName) As DNB3DState

Returns the 3D State object given its name and the
object(Resource/MA/Product..) on which the state is
created.

Parameters:

iObject
The object(Resource/MA/Product..), on which the state is created.

iStateName
The name of the 3D State.

Returns:
oState The 3D States object.

Example:

Dim MySelectedProduct
Dim state as DNB3DState
Set state = stateManagement.GetState(MySelectedProduct, “My State1”)
Parameters:
  • i_object (AnyObject) –

  • i_state_name (str) –

Return type:

DNB3DState

get_number_of_3d_states() int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetNumberOf3DStates() As long

Returns the number of 3D State objects in the process
document

Returns:
numberOfStates The number of 3D States in the current
document.

Example:

stateCount = stateManagement.GetNumberOf3DStates
Return type:

int

get_number_of_3d_states_in_activity(i_process: Activity, i_condition_type: str) int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetNumberof3DStatesInActivity(Activity iProcess,
CATBSTR iConditionType) As long

Returns the number of 3D states assigned to the given activity, based on
the condition on which the activity has been assigned to the 3D
state.

Parameters:

iProcess
The activity whose states are to be listed.
iConditionType
The type of assignment that has been made i.e., the condition on
which the state(s) have been assigned to the given activity. iConditionType
could be one of “Begin Condition”, “End Condition”, “3D Context” or “All”

Returns:
oNumStates The number of 3D States that have been assigned to the given
activity.

Example:

Dim MySelectedActivity
NumStates = stateManagement.GetNumberof3DStatesInActivity(MySelectedActivity, “Begin Condition”)
Parameters:
  • i_process (Activity) –

  • i_condition_type (str) –

Return type:

int

get_number_of_3d_states_on_object(i_obj: AnyObject) int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetNumberOf3DStatesOnObject(CATBaseDispatch iObj) As
long

Returns the number of 3D State objects on a given
object(Resource/MA/Product..)

Parameters:

iObject
The object(Resource/MA/Product..), whose states are to be listed.

Returns:
numberOfStates The number of 3D States created on
iObjec.

Example:

stateCount = stateManagement.GetNumberOf3DStatesOnObject(MySelectedProduct)
Parameters:

i_obj (AnyObject) –

Return type:

int

list_3d_states_in_activity(i_process: Activity, i_condition_type: str, o_states: tuple) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub List3DStatesInActivity(Activity iProcess,
CATBSTR iConditionType,
CATSafeArrayVariant oStates)

Returns the list of 3D states assigned to the given activity, based on the
condition on which the activity has been assigned to the 3D
state.

Parameters:

iProcess
The activity whose states are to be listed.
iConditionType
The type of assignment that has been made i.e., the condition on
which the state(s) have been assigned to the given activity. iConditionType
could be one of “Begin Condition”, “End Condition”, “3D Context” or “All”

Returns:
oStates The list of 3D States that have been assigned to the given
activity.

Example:

Dim activitiesArray() as AnyObject
Dim numActs
numActs = stateManagement.GetNumberof3DStatesInActivity(MySelectedActivity)
ReDim activitiesArray(numActs)
stateManagement.List3DStatesInActivity MySelectedActivity, “Begin
Condition”,activitiesArray
Parameters:
  • i_process (Activity) –

  • i_condition_type (str) –

  • o_states (tuple) –

Return type:

None

list_all3_d_states() DNB3DStates

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func ListAll3DStates() As DNB3DStates

Returns the list of all 3D State objects in the process
document

Returns:
oListStates The list of all 3D States in the current
document.

Example:

Dim My3DStates as DNB3DStates
set My3DStates = stateManagement.ListAll3DStates
statesCount = My3DStates.Count
Return type:

DNB3DStates

list_all_3d_states_on_object(i_obj: AnyObject, o_list_states: tuple) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub ListAll3DStatesOnObject(CATBaseDispatch iObj,
CATSafeArrayVariant oListStates)

Returns the list of all 3D State objects on a given
object(Resource/MA/Product..)

Parameters:

iObject
The object(Resource/MA/Product..), whose states are to be listed.


Returns:
oListStates The list of all 3D States created on
iObject.

Example:

Dim statesArray() as AnyObject
Dim statesCount
statesCount = stateManagement.GetNumberOf3DStatesOnObject(MySelectedProduct)
Redim statesArray(statesCount)
stateManagement.ListAll3DStatesOnObject(MySelectedProduct,statesArray)
Parameters:
  • i_obj (AnyObject) –

  • o_list_states (tuple) –

Return type:

None