Role: Represents a 3D State object and provides APIs to
update an existing 3D state object.
Properties
Property StateName() As
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"
Methods
Sub Add3DPosition( 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)
dd>
Sub Add3DState( 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)
dd>
Sub Assign3DState( iProcess, 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.
dd>
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")
dd>
Sub GetChildren( iType, 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".
dd>
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
dd>
Func GetConditionName( iRelatedActivity) As
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.
dd>
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)
dd>
Func GetNumberOfChildren( iType) As
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".
dd>
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")
dd>
Func GetNumberofRelatedActivities( iConditionType) As
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".
dd>
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")
dd>
Func GetParent() As
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
dd>
Sub GetRelatedActivities( iConditionType, 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".
dd>
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
dd>
Func GetRelatedObject() As
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
dd>
Sub Remove3DPosition( 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)
dd>
Sub Remove3DState( 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)
dd>
Sub Unassign3DState( 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)