Library | File

Class wfcWModel

# include <wfcModel.h>

class wfcWModel
 : public virtual wfcWParameterOwner,
 : public virtual wfcWRelationOwner,
 : public virtual pfcModel
{
    xaideclare(wfcWModel)
    ...
};



Description

Adds more functionality to pfcModel.
Manual References:
Family Tables: Operations on Family Table Instances, Overview of Creo Object TOOLKIT C++: Casting of Creo Object TOOLKIT C++ pfc Classes to wfc Classes
Direct Known Subclasses:
wfcWDiagram, wfcWMFG, wfcWMarkup, wfcWModel2D, wfcSection, wfcWSolid, wfcWDrawingFormat



Method Summary

xboolCanCreateSectionFeature ()
Determines if Cross Section can be created as feature in specified model
wfcParamTablesets_ptrCollectParamTablesets ()
Obtains all table sets that are available for use in the given model. This includes all sets that are loaded from files setup in this session, and any sets that were previously stored in the model.
pfcSelections_ptrComputeRayIntersections (xreal ApertureRadius, wfcRay_ptr Ray)

This method is enabled for Creo Direct.

Returns a list of ray intersections with a model. The function computes the intersection points of both the original ray and its "negative" with the geometry of the model. The output array is sorted in order of increasing signed distance.
voidConvertOldXSectionsToNew ()
Convert all legacy cross sections to features
voidCopyLayerRules (xrstring LayerName, pfcModel_ptr RefModel)
Copy the rules of a layer LayerName in ReferenceModel into a layer LayerName in CurrentModel, overwriting any rules <p><b>Note: </b>This function copies both the rules definitions and the rules options set interactively (including option "Associative")
wfcSurfaceFinish_ptrCreateSurfaceFinish (pfcDetailSymbolInstInstructions_ptr SymbolInstructions, wfcAnnotationPlane_ptr AnnotPlane)
LICENSE: 222
Create a surface finish in the specified model. wfcSurfaceFinish::Show() should be called after creating the surface finish in order for the surface finish to be displayed.
pfcUnit_ptrCreateUnitByExpression (xrstring UnitName, xrstring UnitExpression)
Creates a derived unit.
voidDesignateSymbol (xrstring SymbolName)
 
voidExecuteLayerRules ()
Execute the layer rules on the CurrentModel if rules are enabled.
optional pfcSelections_ptrGenerateSelectionsFromCollection (wfcCollection_ptr Collection)

This method is enabled for Creo Direct.

Generates selections based on instructions and rules insided the specified collection object
xstringGetDefaultName ()

This method is enabled for Creo Direct.

Returns the next available default name for given object type.
wfcLayerItem_ptrGetLayerItem (wfcLayerType LayerType, xint LayerId)
Initializes the layer item structure.
wfcMdlfileDescriptor_ptrGetMdlfileDescriptor ()

This method is enabled for Creo Direct.

Creates a filetype descriptor from the model and returns it.
wfcModelSubTypeGetSubType ()

This method is enabled for Creo Direct.

Returns the subtype of a model.
wfcTIMInfo_ptrGetTIMInfo ()
Gets the TIM related information of the model
xboolIsDesignatedSymbol (xrstring SymbolName)
 
xboolIsStandardLocation ()

This method is enabled for Creo Direct.

Returns true if the model was loaded from a local folder.
xboolIsVariantFeatModel ()
Identifies if a model pointer is from an inheritance feature or flexible component.
pfcLayers_ptrListLayers ()
Collects an array containing the layers in the model.
voidMarkATBModelAsOutOfDate (optional xintsequence_ptr FeatIds)
Mark the ATB model/feature as out of date.
voidMarkForSaving (xrstring marker)

This method is enabled for Creo Direct.

 
xboolMatchLayerRules (xrstring LayerName, pfcModel_ptr RefModel)
Compare the rules of a layer LayerName in ReferenceModel to the rules in layer LayerName in CurrentModel.
voidRefreshMdlTree ()
Refreshes the display of the model tree.
voidRelinkATB (xrstring MasterModelPath, optional xint FeatId)
Relink the model/feature that have lost the link to the master model. Relinking a model here will represent searching for the master model (using the master model name) in the location specified in the 'MasterModelPath' argument. If the master model with the same name is found, the Creo Parametric TIM model is linked to that master model.
voidSaveLayerDisplayStatus ()
Permanently saves all the changes to the display status of all layers in the owner, and all its submodels (and views, for drawings).
voidUndesignateSymbol (xrstring SymbolName)
 
voidUpdateATB (optional xintsequence_ptr FeatIds, optional xstringsequence_ptr SearchPaths)
Update the ATB model(s)/feature(s).
wfcATBVerificationResults_ptrVerifyATB (optional xintsequence_ptr FeatIds, optional xstringsequence_ptr SearchPaths)
To Verify if the ATB models are out of date. This function will first check to see if the model specified is a TIM (of some master model). If model is not a TIM, it will check to see if the model contains one or more features which are TIM representations.
wfcStatusVisitDetailItems (wfcVisitingClient_ptr visitingClient, pfcDetailType detailType, xint Sheet)
 
wfcStatusVisitItems (wfcVisitingClient_ptr visitingClient, pfcModelItemType itemType)

This method is enabled for Creo Direct.

 


Methods Inherited from Class pfcActionSource:

AddActionListener, RemoveActionListener


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 pfcModelItemOwner:

GetItemByName, GetItemById, ListItems


Methods Inherited from Class pfcViewOwner:

RetrieveView, GetView, SaveView, GetCurrentViewTransform, SetCurrentViewTransform, CurrentViewRotate, ListViews, GetCurrentView


Methods Inherited from Class pfcChild:

GetDBParent, GetOId


Methods Inherited from Class pfcModel:

GetDescr, GetRelationId, GetIsModified, GetVersionStamp, GetRevision, GetVersion, GetBranch, GetReleaseLevel, GetCommonName, SetCommonName, IsCommonNameModifiable, GetFullName, GetInstanceName, GetGenericName, GetType, GetFileName, Backup, Copy, CopyAndRetrieve, Rename, Save, Erase, EraseWithDependencies, Delete, Display, ListDependencies, ListDeclaredModels, CreateLayer, Export, Import, AccessExternalData, TerminateExternalData, CheckIsSaveAllowed, CheckIsModifiable, GetOrigin, GetPostRegenerationRelations, SetPostRegenerationRelations, RegeneratePostRegenerationRelations, DeletePostRegenerationRelations, CleanupDependencies, IsNativeModel, ExportIntf3D



Method Detail

wfcATBVerificationResults_ptrVerifyATB (optional xintsequence_ptr FeatIds, optional xstringsequence_ptr SearchPaths)

To Verify if the ATB models are out of date. This function will first check to see if the model specified is a TIM (of some master model). If model is not a TIM, it will check to see if the model contains one or more features which are TIM representations.

Exceptions thrown (but not limited to):

pfcXToolkitNoChange - The function successfully verified the model and didn't find any ATB models out of date nor any models of old version nor any models with broken link.

pfcXToolkitNotValid - The function successfully verified the model, found ONE or more models of older version and found no ATB models out of date.

pfcXToolkitBadContext - The function successfully verified the model, found ONE or more models with broken link and found no ATB models out of date and no ATB models of older version

pfcXToolkitUnsupported - The input model is Multi-CAD model.


Manual References:
Interface: Associative Topology Bus Enabled Models and Features, Interface: Associative Topology Bus Enabled Models and Features
Parameters:
FeatIds
SearchPaths
Returns:
ATB verification results object



voidMarkATBModelAsOutOfDate (optional xintsequence_ptr FeatIds)

Mark the ATB model/feature as out of date.

Exceptions thrown (but not limited to):

pfcXToolkitUnsupported - The input model is Multi-CAD model.


Manual References:
Interface: Associative Topology Bus Enabled Models and Features, Interface: Associative Topology Bus Enabled Models and Features
Parameters:
FeatIds
Returns:



voidUpdateATB (optional xintsequence_ptr FeatIds, optional xstringsequence_ptr SearchPaths)

Update the ATB model(s)/feature(s).

Exceptions thrown (but not limited to):

pfcXToolkitNoChange - The function runs successfully and found no ATB models out of date.

pfcXToolkitCantModify - During ATB update the regeneration failed.

pfcXToolkitBadContext - There are non-displayed models in the session.

pfcXToolkitNotDisplayed - The input model is not displayed.

pfcXToolkitAmbiguous - Both: there are non-displayed models in the session AND the input model is not displayed.

pfcXToolkitUnsupported - The input model is Multi-CAD model.


Manual References:
Interface: Associative Topology Bus Enabled Models and Features, Interface: Associative Topology Bus Enabled Models and Features
Parameters:
FeatIds
SearchPaths
Returns:



voidRelinkATB (xrstring MasterModelPath, optional xint FeatId)

Relink the model/feature that have lost the link to the master model. Relinking a model here will represent searching for the master model (using the master model name) in the location specified in the 'MasterModelPath' argument. If the master model with the same name is found, the Creo Parametric TIM model is linked to that master model.

Exceptions thrown (but not limited to):

pfcXToolkitUnsupported - The input model is Multi-CAD model.


Manual References:
Interface: Associative Topology Bus Enabled Models and Features
Parameters:
MasterModelPath
FeatId
Returns:



wfcTIMInfo_ptrGetTIMInfo ()

Gets the TIM related information of the model
Manual References:
Interface: Associative Topology Bus Enabled Models and Features, Interface: Associative Topology Bus Enabled Models and Features
Returns:
The TIM information object



voidConvertOldXSectionsToNew ()

Convert all legacy cross sections to features
Manual References:
Cross Sections: Creating and Modifying Cross Sections, Cross Sections: Creating and Modifying Cross Sections, Technical Summary of Changes for Creo 4.0 F000: Cross Sections
Returns:



xboolCanCreateSectionFeature ()

Determines if Cross Section can be created as feature in specified model
Manual References:
Cross Sections: Creating and Modifying Cross Sections, Cross Sections: Creating and Modifying Cross Sections
Returns:
true if Cross Section can be created as feature in specified model



pfcLayers_ptrListLayers ()

Collects an array containing the layers in the model.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No layers were found and collected.


Manual References:
ModelItem: Layer State, ModelItem: Layer State, Technical Summary of Changes for Creo 4.0 F000: Layers
Returns:
 



voidSaveLayerDisplayStatus ()

Permanently saves all the changes to the display status of all layers in the owner, and all its submodels (and views, for drawings).

Exceptions thrown (but not limited to):

pfcXToolkitNoChange - No layers have been changed since the last save.


Manual References:
ModelItem: Layer State, ModelItem: Layer State, Technical Summary of Changes for Creo 4.0 F000: Layers
Returns:



wfcLayerItem_ptrGetLayerItem (wfcLayerType LayerType, xint LayerId)

Initializes the layer item structure.

Exceptions thrown (but not limited to):

pfcXToolkitNotExist - Item with such identifier and type does not exist.


Manual References:
ModelItem: Layer State, ModelItem: Layer State, Technical Summary of Changes for Creo 4.0 F000: Layers
Parameters:
LayerType
 
LayerId
 
Returns:
 



wfcModelSubTypeGetSubType ()

This method is enabled for Creo Direct.


Returns the subtype of a model.

Exceptions thrown (but not limited to):

pfcXToolkitBadContext - The model has no subtype.


Manual References:
Models: Model Information, Technical Summary of Changes for Creo 4.0 F000: Models
Returns:
subtype of the model



xstringGetDefaultName ()

This method is enabled for Creo Direct.


Returns the next available default name for given object type.

Exceptions thrown (but not limited to):

pfcXToolkitUnsupported - the type is not supported.


Manual References:
Models: Model Information, Models: Model Information, Technical Summary of Changes for Creo 4.0 F000: Models
Returns:
The default Name.



xboolIsVariantFeatModel ()

Identifies if a model pointer is from an inheritance feature or flexible component.
Manual References:
Assemblies and Components: Variant Feature Model, Technical Summary of Changes for Creo 4.0 F000: Models
Returns:
xtrue if model pointer is inheritance feature otherwise false.



pfcUnit_ptrCreateUnitByExpression (xrstring UnitName, xrstring UnitExpression)

Creates a derived unit.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The reference unit was not found in the model.


Manual References:
Solid: Accessing Individual Units, Solid: Accessing Individual Units, Technical Summary of Changes for Creo 4.0 F000: Units
Parameters:
UnitName
The unit name.
UnitExpression
The unit expression.
Returns:
 



pfcSelections_ptrComputeRayIntersections (xreal ApertureRadius, wfcRay_ptr Ray)

This method is enabled for Creo Direct.


Returns a list of ray intersections with a model. The function computes the intersection points of both the original ray and its "negative" with the geometry of the model. The output array is sorted in order of increasing signed distance.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No objects were found in the workspace.


Manual References:
Geometry Evaluation: Tracing a Ray, Geometry Evaluation: Tracing a Ray, Technical Summary of Changes for Creo 4.0 F000: Ray
Parameters:
ApertureRadius
The value of aperture_radius.
Ray
The starting point of the ray.
Returns:
 



wfcParamTablesets_ptrCollectParamTablesets ()

Obtains all table sets that are available for use in the given model. This includes all sets that are loaded from files setup in this session, and any sets that were previously stored in the model.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - No parameter table sets are available for this model.


Returns:
The wfcModelItem::ParamTablesets object



optional pfcSelections_ptrGenerateSelectionsFromCollection (wfcCollection_ptr Collection)

This method is enabled for Creo Direct.


Generates selections based on instructions and rules insided the specified collection object

Exceptions thrown (but not limited to):

pfcXToolkitOutOfMemory - There was a memory error.

pfcXToolkitAmbiguous - The curve collection chain cannot be regenerated because there is an ambiguity which could not be resolved.

pfcXToolkitNotFound - The curve collection chain cannot be regenerated because a reference could not be found while collecting edges/curves/points.

pfcXToolkitNotValid - The checking of the curve collection failed.


Manual References:
Curve and Surface Collection: The wfcCollection Interface
Parameters:
Collection
Returns:
A sequence of selection objects



voidMarkForSaving (xrstring marker)

This method is enabled for Creo Direct.


 
Parameters:
marker
 
Returns:



voidRefreshMdlTree ()

Refreshes the display of the model tree.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The model tree is not present.


Returns:



wfcMdlfileDescriptor_ptrGetMdlfileDescriptor ()

This method is enabled for Creo Direct.


Creates a filetype descriptor from the model and returns it.

The created descriptor has no information about the initial descriptor used to create this model. It contains the model name stripped of its extension, version and location.

Exceptions thrown (but not limited to):

pfcXToolkitInvalidPtr - the model argument does not represent a correct model.


Returns:



xboolIsStandardLocation ()

This method is enabled for Creo Direct.


Returns true if the model was loaded from a local folder.

Exceptions thrown (but not limited to):

pfcXBadArgument - the model is null.


Manual References:
Models: Model Operations, Technical Summary of Changes for Creo 4.0 F000: Models
Returns:



voidDesignateSymbol (xrstring SymbolName)

 
Manual References:
Annotations: Annotation Features and Annotations: Designating Dimensions and Symbols, Annotations: Annotation Features and Annotations: Designating Dimensions and Symbols, Technical Summary of Changes for Creo 4.0 F000: Annotations
Parameters:
SymbolName
 
Returns:



voidUndesignateSymbol (xrstring SymbolName)

 
Manual References:
Annotations: Annotation Features and Annotations: Designating Dimensions and Symbols, Technical Summary of Changes for Creo 4.0 F000: Annotations
Parameters:
SymbolName
 
Returns:



xboolIsDesignatedSymbol (xrstring SymbolName)

 
Manual References:
Annotations: Annotation Features and Annotations: Designating Dimensions and Symbols, Annotations: Annotation Features and Annotations: Designating Dimensions and Symbols, Technical Summary of Changes for Creo 4.0 F000: Annotations
Parameters:
SymbolName
 
Returns:
 



wfcStatusVisitItems (wfcVisitingClient_ptr visitingClient, pfcModelItemType itemType)

This method is enabled for Creo Direct.


 
Manual References:
Overview of Creo Object TOOLKIT C++: Visit Methods, Overview of Creo Object TOOLKIT C++: Visit Methods, Technical Summary of Changes for Creo 4.0 F000: Drawings
Parameters:
visitingClient
 
itemType
 
Returns:
 



wfcStatusVisitDetailItems (wfcVisitingClient_ptr visitingClient, pfcDetailType detailType, xint Sheet)

 
Manual References:
Overview of Creo Object TOOLKIT C++: Visit Methods, Technical Summary of Changes for Creo 4.0 F000: Visit Methods
Parameters:
visitingClient
 
detailType
 
Sheet
 
Returns:
 



wfcSurfaceFinish_ptrCreateSurfaceFinish (pfcDetailSymbolInstInstructions_ptr SymbolInstructions, wfcAnnotationPlane_ptr AnnotPlane)
LICENSE: 222

Create a surface finish in the specified model. wfcSurfaceFinish::Show() should be called after creating the surface finish in order for the surface finish to be displayed.
Manual References:
Annotations: Annotation Features and Annotations: Surface Finish Annotations, Technical Summary of Changes for Creo 4.0 F000: Annotations
Parameters:
SymbolInstructions
The symbol instance instructions. This data must contain:

Zero or more leaders pointing to model surfaces, or, a model surface used for the attachment point.

An annotation plane (for solid owned surface finishes).

Optionally, variant texts for the surface finish.

Consult the Creo Parametric TOOLKIT user's guide for information about how to find the standard surface finish symbols in order to use them during creation.

AnnotPlane
Returns:
The created surface finish.



xboolMatchLayerRules (xrstring LayerName, pfcModel_ptr RefModel)

Compare the rules of a layer LayerName in ReferenceModel to the rules in layer LayerName in CurrentModel.
Manual References:
ModelItem: Layer Operations, ModelItem: Layer Operations, Technical Summary of Changes for Creo 4.0 M030: Layer Operations
Parameters:
LayerName
Layer Name
RefModel
Reference Model with which rule will be matched
Returns:
return description



voidCopyLayerRules (xrstring LayerName, pfcModel_ptr RefModel)

Copy the rules of a layer LayerName in ReferenceModel into a layer LayerName in CurrentModel, overwriting any rules <p><b>Note: </b>This function copies both the rules definitions and the rules options set interactively (including option "Associative")
Manual References:
ModelItem: Layer Operations, ModelItem: Layer Operations, Technical Summary of Changes for Creo 4.0 M030: Layer Operations
Parameters:
LayerName
Layer Name
RefModel
Reference Model from which rule will be copied
Returns:



voidExecuteLayerRules ()

Execute the layer rules on the CurrentModel if rules are enabled.
Manual References:
ModelItem: Layer Operations, ModelItem: Layer Operations, Technical Summary of Changes for Creo 4.0 M030: Layer Operations
Returns: