Library | File

Class wfcWFeature

# include <wfcFeature.h>

class wfcWFeature
 : public virtual wfcWModelItem,
 : public virtual wfcLayerItem,
 : public virtual pfcFeature
{
    xaideclare(wfcWFeature)
    ...
};



Description

Adds more functionality to pfcFeature.
Manual References:
Features, Overview of Creo Object TOOLKIT C++: Casting of Creo Object TOOLKIT C++ pfc Classes to wfc Classes
Direct Known Subclasses:
wfcWHoleFeature, wfcWCoordSysFeat, wfcWCurveFeat, wfcWDatumAxisFeat, wfcWDatumPlaneFeat, wfcWDatumPointFeat, wfcWRoundFeat, wfcAnnotationFeature, wfcWComponentFeat



Method Summary

wfcWFeature_ptrCreatePattern (wfcElementTree_ptr Tree, wfcPatternType Type)
Creates a pattern of the feature with the element tree provided.
xintGetDimensionId (wfcElementPath_ptr Path)
Retrieves the Dimension identifier for the specified element.
wfcElementTree_ptrGetElementTree (optional pfcComponentPath_ptr Path, wfcFeatureElemTreeExtractOptions Option)
Creates a copy of the feature element tree.
optional wfcExternalReferenceInfos_ptrGetExternalParents (wfcExternalReferenceType type)
Retrieves data on external (and local) parents according to the specified reference type.
wfcImportFeatureIdMaps_ptrGetIdMap ()
Gets an array of maps between the item_id and user_id.
wfcImportFeatureData_ptrGetImportFeatureData ()
Retrieves the current parameters of the specified import feature.
xintsequence_ptrGetItemIds (xint UserId, pfcModelItemType ItemType)
Converts a user_id to item_id.
wfcSections_ptrGetSections ()
Returns sections present in the feature
pfcSolid_ptrGetSolid ()
Retrieves the solid in which the feature is placed.
wfcFeatureStatusFlag_ptrGetStatusFlag ()
Retrieves the status flag object of the feature.
xintsequence_ptrGetUserIds (xint ItemId, pfcModelItemType ItemType)
Converts a item_id to user_id.
pfcTransform3Ds_ptrGetZoneFeaturePlaneData ()
Returns information about zone reference planes used to create a zone feature
wfcZoneFeatureReferences_ptrGetZoneFeatureReferences ()
Returns references used to create a zone feature
wfcZoneXSectionGeometries_ptrGetZoneXSectionGeometry ()
Returns cross section geometry used to create a zone feature
xboolIsCableCosmetic ()
check if the feature is a cabling cosmetic feature.
xboolIsElementIncomplete (wfcElementPath_ptr Path)
Determines whether the specified element is incomplete.
xboolIsElementVisible (wfcElementPath_ptr Path)
Determines whether the specified element is visible.
xboolIsInFooter ()
 
optional pfcModelItems_ptrListVariedItems ()
Lists the variant items (dimensions, features, annotations) owned by an inheritance feature or flexible component.
optional pfcParameters_ptrListVariedParameters ()
Lists only the variant parameters owned by an inheritance feature or flexible component.
optional xintMoveFromFooter ()
 
optional xintMoveToFooter ()
 
wfcWFeature_ptrRedefineFeature (optional pfcComponentPath_ptr Path, wfcElementTree_ptr Tree, wfcFeatCreateOptions_ptr Options, optional wfcWRegenInstructions_ptr Instrs)
Redefines the feature from the element tree
wfcWFeature_ptrRedefineImportFeature (wfcImportFeatureRedefSource_ptr Source)
Redefines an existing import feature from the data source.
wfcStatusVisitItems (wfcVisitingClient_ptr visitingClient, optional pfcModelItemType itemType)
Visits all items of a given type.


Methods Inherited from Class pfcActionSource:

AddActionListener, RemoveActionListener, AddActionListenerWithType


Methods Inherited from Class pfcParent:

GetChild


Methods Inherited from Class pfcParameterOwner:

GetParam, CreateParam, ListParams, SelectParam, CreateParamWithUnits, SelectParameters


Methods Inherited from Class wfcWParameterOwner:

ExportParameterTable, ApplyParameterTableset


Methods Inherited from Class pfcRelationOwner:

DeleteRelations, GetRelations, SetRelations, RegenerateRelations, EvaluateExpression


Methods Inherited from Class wfcWRelationOwner:

GetRelationConstraints, UnitsUsed, UseUnits, EvaluateExpressionWithUnits


Methods Inherited from Class pfcChild:

GetDBParent, GetOId


Methods Inherited from Class pfcModelItem:

GetName, SetName, GetId, GetType


Methods Inherited from Class wfcWModelItem:

DeleteUserDefinedName, Unhide, Hide, IsHidden, IsNameReadOnly, IsZoneFeature, GetDefaultName


Methods Inherited from Class wfcLayerItem:

IsLayerItemVisible, RemoveNoUpdate, GetLayers, AddNoUpdate


Methods Inherited from Class pfcFeature:

GetFeatType, GetFeatTypeName, GetFeatSubType, GetStatus, GetGroup, GetPattern, GetGroupPattern, GetPatternByType, GetPatternStatus, GetGroupStatus, GetGroupPatternStatus, GetIsVisible, GetIsReadonly, GetNumber, GetVersionStamp, GetIsGroupMember, GetIsEmbedded, CreateSuppressOp, CreateResumeOp, CreateDeleteOp, CreateReorderBeforeOp, CreateReorderAfterOp, ListChildren, ListParents, ListSubItems, GetGroupDirectHeader



Method Detail

wfcElementTree_ptrGetElementTree (optional pfcComponentPath_ptr Path, wfcFeatureElemTreeExtractOptions Option)

Creates a copy of the feature element tree.

The feature can be a regular feature or a pattern.

Exceptions thrown (but not limited to):

pfcXToolkitInvalidType - Extraction of the element tree is not supported for this feature type.


Manual References:
Feature Element Tree: Feature Element Tree, Element Trees: Sketched Features: To Create Sketched Features Element Trees
Parameters:
Path
Option
Returns:



xboolIsElementVisible (wfcElementPath_ptr Path)

Determines whether the specified element is visible.

Invisible elements are those which are added to the tree by Creo Parametric for internal reasons only, and are neither defined as needed for creation of that type of feature, nor otherwise documented.
Manual References:
Features: Feature Information, Features: Feature Information
Parameters:
Path
Returns:



xboolIsElementIncomplete (wfcElementPath_ptr Path)

Determines whether the specified element is incomplete.

If a feature is incomplete, this method can be used to find out which element in its tree is at fault. An incomplete feature can arise by using the option PRO_FEAT_CR_INCOMPLETE_FEAT from wfcFeatCreateOption when calling wfcWSolid::WCreateFeature(wfcElementTree_ptr, wfcFeatCreateOptions_ptr, optional wfcWRegenInstructions_ptr), and does not give rise to geometry until completed.
Manual References:
Features: Feature Information, Features: Feature Information
Parameters:
Path
Returns:



wfcFeatureStatusFlag_ptrGetStatusFlag ()

Retrieves the status flag object of the feature.
Manual References:
Features: Feature Information, Features: Feature Information
Returns:



wfcWFeature_ptrRedefineFeature (optional pfcComponentPath_ptr Path, wfcElementTree_ptr Tree, wfcFeatCreateOptions_ptr Options, optional wfcWRegenInstructions_ptr Instrs)

Redefines the feature from the element tree
Manual References:
Feature Element Tree: Redefining Features, Element Trees: Sketched Features: Creating Features Containing Sections, Element Trees: Sketched Features: To Create Sketched Features Element Trees
Parameters:
Path
Tree
Options
Instrs
Returns:



wfcWFeature_ptrCreatePattern (wfcElementTree_ptr Tree, wfcPatternType Type)

Creates a pattern of the feature with the element tree provided.

The pattern can be of type wfcPatternType

Exceptions thrown (but not limited to):

pfcXToolkitUnsupported - Unsupported model. For instance, models which come from Multi-CAD assemblies are not supported in this release.


Manual References:
Feature Element Tree: Creating Patterns
Parameters:
Tree
Type
Returns:



xintGetDimensionId (wfcElementPath_ptr Path)

Retrieves the Dimension identifier for the specified element.

The element cannot be a compound element.
Manual References:
Feature Element Tree: Feature Elements, Feature Element Tree: Feature Elements
Parameters:
Path
Returns:



wfcSections_ptrGetSections ()

Returns sections present in the feature

Method do not return sections which are unavailable for use. For example, Selected trajectory for Sweep feature will not be returned

Exceptions thrown (but not limited to):

pfcXToolkitUnavailableSection - The section is not available for use.


Manual References:
Element Trees: Sections: Retrieving a Section, Element Trees: Sections: Retrieving a Section
Returns:



wfcImportFeatureData_ptrGetImportFeatureData ()

Retrieves the current parameters of the specified import feature.
Manual References:
Interface: Import Feature Properties, Interface: Import Feature Properties
Returns:
The import feature data object.



wfcImportFeatureIdMaps_ptrGetIdMap ()

Gets an array of maps between the item_id and user_id.

Exceptions thrown (but not limited to):

pfcXToolkitOutOfMemory - Insufficient memory.


Manual References:
Interface: Import Feature Properties, Interface: Import Feature Properties
Returns:
 



xintsequence_ptrGetItemIds (xint UserId, pfcModelItemType ItemType)

Converts a user_id to item_id.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The identifiers of the geometry items were not found.

pfcXToolkitInvalidType - You specified an invalid type of geometry item.


Manual References:
Interface: Import Feature Properties, Interface: Import Feature Properties
Parameters:
UserId
The user identifier.
ItemType
The type of geometry item (pfcITEM_SURFACE, pfcITEM_EDGE or pfcITEM_QUILT).
Returns:
 



xintsequence_ptrGetUserIds (xint ItemId, pfcModelItemType ItemType)

Converts a item_id to user_id.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The user identifiers was not found.

pfcXToolkitInvalidType - You specified an invalid type of geometry item.


Manual References:
Interface: Import Feature Properties, Interface: Import Feature Properties
Parameters:
ItemId
The item identifier.
ItemType
The type of geometry item (pfcITEM_SURFACE, pfcITEM_EDGE or pfcITEM_QUILT).
Returns:
 



wfcWFeature_ptrRedefineImportFeature (wfcImportFeatureRedefSource_ptr Source)

Redefines an existing import feature from the data source.

Exceptions thrown (but not limited to):

pfcXToolkitNotImplemented - Not implemented.

pfcXToolkitBadContext - no redefine could be done for ATB feature.


Manual References:
Interface: Redefining the Import Feature, Interface: Redefining the Import Feature
Parameters:
Source
The data source to be used for the redefinition.
Returns:
 



wfcZoneFeatureReferences_ptrGetZoneFeatureReferences ()

Returns references used to create a zone feature
Manual References:
Features: Feature Information, Features: Feature Information
Returns:
A zone reference object



wfcZoneXSectionGeometries_ptrGetZoneXSectionGeometry ()

Returns cross section geometry used to create a zone feature
Manual References:
Features: Feature Information, Features: Feature Information
Returns:
A Sequence of zone cross section geometry



pfcTransform3Ds_ptrGetZoneFeaturePlaneData ()

Returns information about zone reference planes used to create a zone feature
Manual References:
Features: Feature Information, Features: Feature Information
Returns:



pfcSolid_ptrGetSolid ()

Retrieves the solid in which the feature is placed.
Returns:
The solid model.



xboolIsCableCosmetic ()

check if the feature is a cabling cosmetic feature.
Returns:
true if feature is a cabling cosmetic feature, false if not.



optional wfcExternalReferenceInfos_ptrGetExternalParents (wfcExternalReferenceType type)

Retrieves data on external (and local) parents according to the specified reference type.

Exceptions thrown (but not limited to):

pfcXToolkitNotValid - Required license not found.

pfcXToolkitNotFound - No parents of parent_type are found.

pfcXToolkitOutOfMemory - There are too many references in model. Some references will be excluded.

pfcXToolkitInUse - The external parents is not NULL.


Parameters:
type
Type of external reference for which to retrieve parents
Returns:
The external parents.



wfcStatusVisitItems (wfcVisitingClient_ptr visitingClient, optional pfcModelItemType itemType)

Visits all items of a given type.

The following types are supported for all users: SURFACE, QUILT, EDGE, AXIS, CURVE, POINT, CSYS, DIMENSION.

The following type is supported of licenced users: ANNOTATION_ELEM.

If ApplyAction of the visiting client returns a value other than TK_NO_ERROR, this method returns.

If ApplyFilter returns TK_CONTINUE, the item is skipped (not passed to ApplyAction).

In C++ Object Toolkit, use wfcStatusToPro and wfcStatusFromPro to convert the returned status to ProError and back.

To facilitate the implementation of the visiting client, a default visiting client class is provided. The application can subclass it and override only those methods which it needs.

In ApplyAction & ApplyFilter of the visiting client, pfcObject pointer must be cast to the correct visiting type as follows:

SURFACE - pfcSurface

QUILT - pfcQuilt

EDGE - pfcEdge

AXIS - pfcAxis

CURVE - pfcCurve

POINT - pfcPoint

CSYS - pfcCsys

DIMENSION - pfcDimension

ANNOTATION_ELEM - wfcAnnotationElement

Casting as other types may lead to unexpected behaviour.

Warning: After this method returns, the visiting client stays alive (that is, will not be subject to memory release), to make its data and its methods available for the application. After the applicatoin finishes using the client, it should call wfcWSession::ReleaseVisitor(wfcVisitingClient_ptr) on it.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No annotation elements were found in the feature.


Manual References:
Overview of Creo Object TOOLKIT C++: Visit Methods, Overview of Creo Object TOOLKIT C++: Visit Methods
Parameters:
visitingClient
The visiting client.
itemType
Returns:
 



xboolIsInFooter ()

 
Manual References:
Features: Feature Information, Features: Feature Information
Returns:
 



optional xintMoveToFooter ()

 

Exceptions thrown (but not limited to):

pfcXToolkitInvalidType - The specified feature is not permitted to be moved to footer.

pfcXToolkitFound - The specified feature is already in the footer.


Manual References:
Features: Feature Information, Features: Feature Information
Returns:
 



optional xintMoveFromFooter ()

 

Exceptions thrown (but not limited to):

pfcXToolkitFound - The specified feature is already outside the footer.

pfcXToolkitInvalidType - The specified feature is not permitted to be moved from footer.


Manual References:
Features: Feature Information
Returns:
 



optional pfcModelItems_ptrListVariedItems ()

Lists the variant items (dimensions, features, annotations) owned by an inheritance feature or flexible component.
Manual References:
Assemblies and Components: Variant Items for Flexible Components, Assemblies and Components: Variant Items for Flexible Components
Returns:
Array of the varied items.



optional pfcParameters_ptrListVariedParameters ()

Lists only the variant parameters owned by an inheritance feature or flexible component.
Manual References:
Assemblies and Components: Variant Items for Flexible Components
Returns:
Array of the varied parameters.