Interface representing the 3D State Management in the CATDocument.
Role: Provides access the C++ interfaces DNBIState, DNBIStateMgt
to create and manage the 3D States.
Methods
Func Create3DState( iStateName, iObject, iListDefn) As
Creates a 3D State object
Parameters:
iStateName
The name of the 3D State to be created.
dd>
iObject
The object(Resource/MA/Product..)on which the state is to be created
dd>
iListDefn
The definition list(an existing 3D State/3D Position) on which the
new state is to be created
dd>
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)
dd>
Sub Delete3DState( 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)
dd>
Func Get3DState( iObject, iStateName) As
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.
dd>
iStateName
The name of the 3D State.
dd>
Returns:
oState The 3D States object.
Example:
Dim MySelectedProduct
Dim state as DNB3DState
Set state = stateManagement.GetState(MySelectedProduct, “My State1”)
dd>
Func GetNumberOf3DStates() As
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
dd>
Func GetNumberOf3DStatesOnObject( iObj) As
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.
dd>
Returns:
numberOfStates The number of 3D States created on iObjec.
Func GetNumberof3DStatesInActivity( iProcess, iConditionType) As
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.
dd>
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"
dd>
Returns:
oNumStates The number of 3D States that have been assigned to the given activity.
Example:
Dim MySelectedActivity
NumStates = stateManagement.GetNumberof3DStatesInActivity(MySelectedActivity, “Begin Condition”)
dd>
Sub List3DStatesInActivity( iProcess, iConditionType, 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.
dd>
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"
dd>
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
dd>
Func ListAll3DStates() As
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
dd>
Sub ListAll3DStatesOnObject( iObj, 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.
dd>
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)