All Frameworks  Object Hierarchy  This Framework  Indexes   

DNB3DState (Object)

Interface representing the 3D State object.

Role: Represents a 3D State object and provides APIs to update an existing 3D state object.


Property Index

StateName
Returns or sets the Name of the 3D State.

Method Index

Add3DPosition
Adds the specified 3D Position to the given 3D state as a child.
Add3DState
Adds the specified 3D state to the given 3D state as a child.
Assign3DState
Assigns the 3D state to a specified process, based on the given condition.
GetChildren
Returns the list of all the 3D states or 3D positions or both, managed by the given 3D state.
GetConditionName
Returns the condition type on which the 3D State has been assigned to a specified activity.
GetNumberOfChildren
Returns the number of 3D states or 3D positions or both, managed by the given 3D state.
GetNumberofRelatedActivities
Returns the number of activities/processes associated with the 3D State based on the condition on which the state has been assigned.
GetParent
Returns the parent for the 3D State
GetRelatedActivities
Returns the list of activities/processes associated with the 3D State based on the condition on which the state has been assigned.
GetRelatedObject
Returns the product/resource/MA/ASTMA on which the given state is being defined.
Remove3DPosition
Removes the specified 3D position from the given 3D state’s definition list
Remove3DState
Removes the specified 3D state from the given 3D state’s definition list
Unassign3DState
Unassigns the 3D state from a specified process.

Properties


o 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


o 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)
 
o 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)
 
o 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.
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")
 
o 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".
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
 
o 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.
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)
 
o 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".
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")
 
o 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".
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")
 
o 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
 
o 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".
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
 
o 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
 
o 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)
 
o 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)
 
o 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)
 

Copyright © 2003, Dassault Systèmes. All rights reserved.