With a combined state, you can combine and apply multiple display states to a Creo model. Combined states are composed of the following two or more display states:
|
• |
Simplified representation |
Methods Introduced:
The method wfcWSolid::ListCombStates returns a list of combined states in the specified solid.
The method wfcCombState::GetCombStateData returns information for a specified combined state as a wfcCombStateData object.
The method wfcCombStateData::Create creates a the wfcCombStateData data object that contains information about the specified combined state.
The method wfcCombStateData::GetCombStateName returns the name of the combined state.
Use the methods wfcCombStateData::GetReferences and wfcCombStateData::SetReferences get and set an array of reference states of the type pfcModelItem.
The methods
wfcCombStateData::GetClipOption and
wfcCombStateData::SetClipOption get and set the cross section clip. This is applicable only in case of a valid reference of the type
pfcITEM_XSEC. The
pfcITEM_XSEC item represents a
wfcXSection object or a zone feature. The values for the cross section clip are specified by the enumerated type
wfcCrossSectionClipOption. The valid values are as follows:
|
• |
wfcVIS_OPT_NONE—Specifies that the cross section or zone feature is not clipped. |
|
• |
wfcVIS_OPT_FRONT—Specifies that the cross section or zone feature is clipped by removing the material on the front side. The front side is
where the positive normals of the planes of the cross section or zone feature are directed. |
|
• |
wfcVIS_OPT_BACK—Specifies that the cross section or zone feature is clipped by removing the material on the back side. |
The method wfcCombStateData::GetIsExploded returns a boolean value that specifies if the combined state is exploded. This value is available only if when a valid pfcITEM_EXPLODED_STATE reference state is retrieved. It is not available for Creo parts since an exploded state does not exist in the part mode.
The method
wfcWSolid::CreateCombState creates a new combined state based on specified references. The input arguments of this method are as follows:
|
• |
CombStateName—Specifies the name of the new combined state. |
|
• |
CombStateData —Specifies the combined state data as wfcCombStateData object. |
Use the function wfcCombState::RedefineCombState to redefine a created combined state. Pass the wfcCombStateData object as the input argument.
In case, you do not want to redefine a reference state, pass the reference state with the same value. While redefining, you
must specify reference states. If you do not pass reference states, the combined state is redefined to a NO_STATE state. NO_STATE state means the display of the reference state is not changed on activation of combined state.
The method wfcWSolid::GetActiveCombState retrieves the active combined state in a specified solid model. The active combined state is the default state when the model
is opened.
Use the method wfcWSolid::ActivateCombState to activate a specified combined state.
Use the method wfcWSolid::DeleteCombState to delete a specified combined state. The method fails if the specified combined state is the default or active combined
state.
The method wfcCombState::GetAnnotations retrieves annotations and their status flags from a specified combined state item as a wfcCombStateAnnotations object. The wfcCombStateAnnotations object uses the methods of the wfcCombStateAnnotation object to add and get annotations.
The method
wfcCombStateAnnotation::Create creates a data object that contains information about annotations from a combined state. The input arguments are:
|
• |
Annotation—Specifies the annotation as a wfcAnnotation object. |
|
• |
Flag—Specifies if the annotation must be displayed in the combined state in terms of the enumerated data type wfcCombStateAnnotationOption. The valid values are:
|
○
|
wfcCOMBSTATE_ANNOTATION_SHOW—Specifies that the annotation must be shown in the combined state. |
|
○
|
wfcCOMBSTATE_ANNOTATION_ERASE—Specifies that the annotation must not be shown in the combined state. |
|
The methods wfcCombStateAnnotation::GetAnnotation and wfcCombStateAnnotation::SetAnnotation retrieve and set the annotations for the combined state as a wfcAnnotation object.
Use the methods wfcCombStateAnnotation::GetOption and wfcCombStateAnnotation::SetOption to retrieve and specify if the displayed annotation is in the combined state in terms of the enumerated data type wfcCombStateAnnotationOption.
The method wfcCombState::AddAnnotations adds annotations to a specified combined state item.
Use the method wfcCombState::RemoveAnnotations to remove the annotations from a specified combined state item.
The method wfcCombState::EraseAnnotation removes an annotation from the display for the specified combined state.
The method wfcCombState::GetStateOfAnnotations checks if the display of annotations is controlled by the specified combined state or layers. The method returns TRUE when the display is controlled by combined state.
The method wfcCombState::IsDefault checks if the specified combined state is set as the default combined state for the model.
The method wfcCombState::IsPublished checks if the specified combined state has been published to Creo View.
The method
wfcCombStateItem::Create creates a data object that contains information about items from a combined state. The input arguments are:
|
• |
Item—Specifies the items as a pfcModelItem object. |
|
• |
Flag—Specifies if the annotation or supplementary geometry must be displayed in the combined state in terms of the enumerated
data type wfcCombStateAnnotationOption. The valid values are:
|
○
|
wfcCOMBSTATE_ANNOTATION_SHOW—Specifies that the annotation or supplementary geometry must be shown in the combined state. |
|
○
|
wfcCOMBSTATE_ANNOTATION_ERASE—Specifies that the annotation or supplementary geometry must not be shown in the combined state. |
|
The methods wfcCombStateItem::GetItem and wfcCombStateItem::SetItem retrieve and set the combined state items as a pfcModelItem object.
Use the methods wfcCombStateItem::GetOption and wfcCombStateItem::SetOption to retrieve and specify if the annotation or supplementary geometry must be displayed in the combined state or not. The method
wfcCombStateItem::SetOption is defined by the enumerated data type wfcCombStateAnnotationOption.
The method wfcCombState::AddItems adds an array of annotations or supplementary geometry to a specified combined state item.
The method wfcCombState::GetItems retrieves an array of annotations or supplementary geometry and their status flags from a specified combined state item.
Use the method wfcCombState::RemoveItems to remove the annotations or supplementary geometry from a specified combined state item.