Library | File

Class wfcWSession

# include <wfcSession.h>

class wfcWSession
 : public virtual wfcWBaseSession,
 : public virtual pfcSession
{
    xaideclare(wfcWSession)
    ...
};



Description

Top interface in Object Toolkit.
Manual References:
Overview of Creo Object TOOLKIT C++: Casting of Creo Object TOOLKIT C++ pfc Classes to wfc Classes



Method Summary

voidAddBeforeModelRetrieveListener (wfcBeforeModelRetrieveActionListener_ptr listen)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcActionSource::AddActionListener

Adds an action listener to notify you of activating file open dialog using File -> Open.
This listener can pass instructions for retrieving model to Creo Parametric.
voidAddBrowserMessageListener (xrstring key, wfcBrowserMessageListener_ptr Listener)
Add listener callback for browser events.
voidAddCollectionToSelectionBuffer (wfcCollection_ptr Coll)
Adds collection to selection buffer
voidAddModelRetrievePreListener (wfcBeforeModelRetrieveListener_ptr listen)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcActionSource::AddActionListener

Adds an action listener to notify you of activating file open dialog using File -> Open.
voidAddModelSavePreAllListener (wfcBeforeModelSaveAllListener_ptr listen)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcActionSource::AddActionListener

 
voidAddNavigatorPaneLayout (xrstring PaneName, xrstring ResFileName, optional xrstring IconFileName)
Add new pane tab with specified name on the Navigator pane.
voidAutoPropagate ()
LICENSE: 222
Automatically propagates annotation elements within the current model to the currently selected feature based on the standard Creo Parametric algorithm.
wfcWWindow_ptrCreateAccessorywindowWithTree (xrstring ObjectName, wfcMdlfileType ObjectType, optional xbool EnableTree)
Retrieves a window and attaches the object to it.
wfcWWindow_ptrCreateBarewindow (xrstring ObjectName, wfcMdlfileType ObjectType)
Retrieves a window and attaches the object to it.
wfcElementTree_ptrCreateElementTree (wfcElements_ptr Elems)
Creates an element tree from the elements and returns a handle to wfcElementTree
wfcElementTree_ptrCreateElementTreeFromXML (xrstring Filename)
Creates an element tree from xml file provided.
wfcExternalObjectClass_ptrCreateExternalClass (xrstring Name, xint Type)
Registers a new external object class.
wfcSection_ptrCreateSection2D ()
Allocates a two-dimensional section.
voidCreateSnapshot (xrstring Name)
Creates a top assembly level snapshot from the current position on screen. Constraints will be copied from the active snapshot. The newly created snapshot will become the active one.
voidDeleteBrowserMessageListener (xrstring key)
 
voidDeleteSnapshot (xrstring Name, optional pfcComponentPath_ptr Path)
Deletes snapshot.
voidDisplayInformationWindow (xrstring FilePath, optional xreal XOffset, optional xreal YOffset, optional xint Rows, optional xint Columns)
Creates a window and shows the text of the file specified by FilePath.
voidExecuteMacro ()
 
optional wfcSection_ptrGetActiveSection ()
Returns a copy of the current active sketcher section.
xstringGetApplicationPath ()
 
xstringGetApplicationTextPath ()
 
wfcCreoTypeGetCreoType ()
Returns the type of Creo which runs this application.
wfcIntfDataSourceTypeGetDataSourceType (pfcIntfType IntfType)
Provide the wfcIntfDataSourceType for given pfcIntfType.
xrealGetDefaultTolerance (wfcToleranceType Type, xint Decimals)
Retrieves the current Creo Parametric default tolerance value for the specified number of decimal places.
xstringGetDisplayDateCode ()
Returns the Creo session's customer visible datecode.
optional wfcElementWstringOption_ptrGetElemWstrOption ()
voidSetElemWstrOption (optional wfcElementWstringOption_ptr value)
Options used to retrieve string values of elements
xstringGetGTolSymbolString (wfcGTolSymbol Symbol, wfcSymbolFont Font)
Get value string of gtol
wfcImportfeatRedefSourceTypeGetImportFeatRedefSourceType (wfcImportFeatRedefOperationType Type)
Provides the wfcFeature::ImportfeatRedefSourceType used to redefine an import feature.
xboolGetIncompleteSurfaceTessellationAllowed ()
 
wfcSnapshotTransformations_ptrGetKinSnapshotTransformations (xrstring Name, optional pfcComponentPath_ptr Path)
This method brings transformation paths and transformation matrices for all components in the snapshot versus top level assembly.
optional xstringGetKnownDirectory (wfcKnownDirectoryType dir_type)
 
wfcLineStyleData_ptrGetLineStyleData (pfcStdLineStyle LineStyle)
Provides a description of the specified line style.
wfcMdlfileDescriptor_ptrGetMdlfileDescriptor (pfcModelDescriptor_ptr ModelDescr)
 
pfcModel_ptrGetModelFromMdlfileDescriptor (wfcMdlfileDescriptor_ptr MdlfileDescr)
Returns the model based on the model descriptor input.
xstringGetNavigatorPaneComponent (xrstring PaneName, xrstring ComponentLocalName)
Get the changed name of a component in the pane.
xstringGetNavigatorPaneDevice (pfcWindow_ptr WindowObject)
Get the name of the navigator pane device specific to window object.
xstringGetNavigatorPaneLayoutComponent (xrstring PaneName)
Get the changed name of the top layout in navigator pane.
xintGetReleaseNumericVersion ()
Returns the integer major version number of the Creo executable that the application is connected to.
xstringGetResourcePath ()
Provides the resource path of an application.
pfcSolid_ptrGetSolid (xrstring Name, pfcModelType Type)
Initializes the ProSolid handle.
optional xstringGetTextureFilePath (xrstring TextureFileName, xbool CreateTempFile)
Looks up the full path to the texture, decal, or bump map file indicated.
wfcUDFVariableParameters_ptrGetUDFDataDefaultVariableParameters (xrstring Name, optional xrstring Instance)
 
pfcModel_ptrImportAsModel (xrstring FileToImport, pfcNewModelImportType NewModelType, pfcModelType Type, xrstring NewModelName, wfcImportRepType ModelRepType, optional xrstring profile, optional pfcLayerImportFilter_ptr Filter)
Creates a new imported model in the solid.
xboolIsOptionOrdered (xrstring OptionName)
Determines whether the specified option is available.
xboolIsTextureFileEmbedded (xrstring TextureFileName)
Checks if the texture file was embedded.
pfcModel_ptrLoadModelRepresentation (xrstring AssemblyFileName, pfcModelType Type, optional xrstring SimpRepName, optional pfcSimpRepInstructions_ptr Instructions)
Retrieves the specified simplified representation.
voidMoveKinDrag (pfcSelection_ptr DragPoint, pfcPoint2Ds_ptr Moves)
This method bring to drag this selected object. Displays a hook point around the point. Performs a drag according to the environment set in wfcWSession::SetKinDragEnvironment(wfcKinDragType, optional xrstring, optional pfcComponentPath_ptr, optional pfcSelection_ptr) For dragging use constraints from current snapshot, if it set. After end of the movement the hook point is removed.
voidMoveKinDragForModel (pfcSelection_ptr DragPoint, pfcPoint3Ds_ptr Moves, optional pfcMatrix3D_ptr Matrix)
This function brings to drag this selected object. Performs a drag according to the environment set in wfcWSession::SetKinDragEnvironment(wfcKinDragType, optional xrstring, optional pfcComponentPath_ptr, optional pfcSelection_ptr) For dragging use constraints from the current snapshot, if it is set.
pfcDrawing_ptrOpenDrawingAsReadOnly (xrstring Path)
 
pfcWindow_ptrOpenSource (wfcMdlfileDescriptor_ptr MdlfileDesc)
Retrieves the specified model and displays it in a window.
wfcParsedFileNameData_ptrParseFileName (xrstring FileName)
Parses the specified file name into its components.
voidRegisterExternalSelectionHighlight (wfcExternalSelectionHighlight_ptr RegistrationMethods)
Registers external application highlighting callbacks in order to let application media (like a tree) react on selections made while calling or while in pfcBaseSession::Select(pfcSelectionOptions_ptr, optional pfcSelections_ptr)
voidReleaseExternalSelectionHighlight (wfcExternalSelectionHighlight_ptr RegistrationMethods)
Releases the client interface used for external selection.
wfcStatusReleaseVisitor (wfcVisitingClient_ptr visitingClient)
 
pfcAssembly_ptrRetrieveAssemblySimpRep (xrstring AssemName, wfcMdlfileType FileType, optional pfcSimpRepInstructions_ptr Instructions)
Retrieves the specified simplified representation. Takes the origin file type into account.
pfcAssembly_ptrRetrieveAutomaticSimpRep (xrstring AssemName, wfcMdlfileType FileType, xrstring UDSrepName)
Retrieve user defined simplified representation as automatic rep.
pfcAssembly_ptrRetrieveDefaultEnvelopeSimprep (xrstring AssemName)
Retrieves the Default Envelope simplified representation of an assembly
pfcAssembly_ptrRetrieveLightweightGraphicsSimpRep (xrstring AssemName)
Retrieves the light-weight graphics simplified representation of an assembly.
pfcModel_ptrRetrieveModelByFiletype (wfcMdlfileDescriptor_ptr MdlfileDescr, pfcRetrieveModelOptions_ptr Opts)
Retrieves the specified model into the Creo Parametric session from standard directory.
pfcSolid_ptrRetrieveSimpRep (xrstring ModelName, wfcMdlfileType FileType, pfcSimpRepType SimpRepType, optional xrstring ReprName)
Retrieves the specified simplified representation Takes the origin file type into account.
voidRunAsCreoType (wfcCreoType type)
Sets the type of Creo.
voidSetIncompleteSurfaceTessellationAllowed (xbool IsAllowed)
 
voidSetKinDragEnvironment (wfcKinDragType Type, optional xrstring Name, optional pfcComponentPath_ptr Path, optional pfcSelection_ptr Reference)
This method setups the environment for subsequenmt dragging and reconnect operations. Environment can be set / reset several times after wfcWSession::StartKinDrag() is called.
voidStartKinDrag ()
This method starts a drag session it should be called before any other Kinematic drag or Snapshot function is called. All subsequent methods will work with the Snapshots of the window assembly. All component path should start from this assembly. All transforms belong to this assembly. The method can be called for design assemblies in Standard Assembly and Mechanism modes. It cannot be used if assembly is exploded, if sketcher is active, when component placement is active or when drag dialog is on screen.
voidStopKinDrag ()
This method will stop drag session. Method pfcWindow::Refresh() should be performed to see the change of the graphic window scale according to updated outline.
xboolUIEditFile (xrstring FileName)
Opens an edit window for the specified file using the default text editor.
xstringUIOpenFileType (wfcFiletypeOpenOptions_ptr Options)
Prompts the standard file open browser interface of Creo Parametric.
xstringUISaveFileType (wfcFiletypeSaveOptions_ptr Options)
Prompts the standard file save browser interface of Creo Parametric.
voidUpdateSnapshot (xrstring Name)
Update snapshot.


Methods Inherited from Class pfcParent:

GetChild


Methods Inherited from Class pfcDisplay:

CreateDisplayList2D, Invalidate, DrawArc2D, DrawPolygon2D, DrawText2D, CreateDisplayList3D, DrawCircle, DrawLine, SetPenPosition, DrawPolyline, GetDefaultFont, GetCurrentFont, SetCurrentFont, GetFontById, GetFontByName, GetTextHeight, SetTextHeight, GetRotationAngle, SetRotationAngle, GetSlantAngle, SetSlantAngle, GetWidthFactor, SetWidthFactor, ResetTextAttributes, GetCurrentGraphicsMode, SetCurrentGraphicsMode, GetCurrentGraphicsColor, SetCurrentGraphicsColor


Methods Inherited from Class wfcWDisplay:

GetColorByObjectType, SetColorRGBAlternateScheme, GetColorRGBAlternateScheme, SetColorRGBVersion, GetColorRGBVersion, ModifyGraphicsColor, ModifyTextColor, DrawPolylines


Methods Inherited from Class pfcActionSource:

AddActionListener, RemoveActionListener, AddActionListenerWithType


Methods Inherited from Class pfcBaseSession:

CopyFileFromWS, CopyFileToWS, GetCurrentWindow, SetCurrentWindow, CreateModelWindow, GetModelWindow, OpenFile, ListWindows, GetWindow, FlushCurrentWindow, ListModels, ListModelsByType, GetCurrentModel, GetActiveModel, CreatePart, CreateAssembly, CreateDrawingFromTemplate, Import2DModel, GetByRelationId, RetrieveModel, RetrieveModelWithOpts, GetModel, GetModelFromDescr, GetModelFromFileName, EraseUndisplayedModels, Select, QueryFeatureEdit, SetConfigOption, GetConfigOption, GetConfigOptionValues, RunMacro, SetTextColor, GetRGBFromStdColor, SetStdColorFromRGB, SetLineStyle, ExportDirectVRML, LoadConfigFile, GetCurrentDirectory, ChangeDirectory, ListFiles, ListSubdirectories, GetEnvironmentVariable, CheckoutToWS, ExportFromCurrentWS, ImportToCurrentWS, SetWSExportOptions, ExportCurrentRasterImage, RetrieveAssemSimpRep, RetrieveGraphicsSimpRep, RetrieveSymbolicSimpRep, RetrieveGeomSimpRep, RetrievePartSimpRep, RetrieveGraphicsPartRep, RetrieveGeometryPartRep, RetrieveSymbolicPartRep, GetCurrentWS, SetCurrentWS, GetImportSourceType, ImportNewModel, LoadProToolkitDll, LoadProToolkitLegacyDll, GetProToolkitDll, StartJLinkApplication, IsConfigurationSupported, IsGeometryRepSupported, GetDimensionDisplayMode, SetDimensionDisplayMode, AuthenticateBrowser, RegisterServer, ListServers, GetServerByAlias, GetServerByUrl, GetServerLocation, GetActiveServer, GetUrlFromAliasedUrl, GetAliasFromAliasedUrl, GetModelNameFromAliasedUrl, GetConnectionId, ExecuteModelCheck, RegisterCustomModelCheck, RegisterRelationFunction, GetMessageContents, GetLocalizedMessageContents, UIRegisterFileSave, UIRegisterFileOpen, GetPrintPlacementOptions, GetPrintPrinterOptions, GetPrintMdlOptions, GetPrintPCFOptions, PLMSInitialize, AllowDuplicateModelItems, WLBInitialize, ExportProfileLoad


Methods Inherited from Class pfcSession:

UIAddMenu, UICreateCommand, UICreateMaxPriorityCommand, UIAddButton, UIDisplayMessage, UIDisplayLocalizedMessage, UIClearMessage, UIReadIntMessage, UIReadRealMessage, UIReadStringMessage, UIDisplayFeatureParams, UIPickMouseBox, UIGetCurrentMouseStatus, UIGetNextMousePick, UIShowMessageDialog, UIOpenFile, UISelectDirectory, UISaveFile, UIGetCommand, GetCurrentSelectionBuffer, NavigatorPaneBrowserAdd, NavigatorPaneBrowserIconSet, NavigatorPaneBrowserURLSet, RibbonDefinitionfileLoad, ModelDescrContainsOrigin, SetAppInfo, GetAppInfo



Method Detail

wfcCreoTypeGetCreoType ()

Returns the type of Creo which runs this application.

This method allows the developer to write an application which can be used with different types of Creo (Parametric, Direct etc.) - for instance, avoid calling methods allowed for Creo Parametric in case if the application is run with Creo Direct.
Manual References:
Overview of Creo Object TOOLKIT C++: Creo Object TOOLKIT C++ Support for Creo
Returns:
Creo type.



voidRunAsCreoType (wfcCreoType type)

Sets the type of Creo.

This method allows to emulate other Creo types while running the application with Creo Parametric - for instance to check that used methods are enabled for a specific Creo type. It must be used only during the development cycle and removed in the final version of the application. If used with Creo applications other than Creo Parametric, this method will throw an exception.

Exceptions thrown (but not limited to):

pfcXMethodForbidden - Type is other than <reference 4 to unknown entity wfcCreoType::wfcCREO_PARAMETRIC> .


Manual References:
Overview of Creo Object TOOLKIT C++: Creo Object TOOLKIT C++ Support for Creo, Overview of Creo Object TOOLKIT C++: Creo Object TOOLKIT C++ Support for Creo
Parameters:
type
Type of Creo Application.
Returns:



xstringGetGTolSymbolString (wfcGTolSymbol Symbol, wfcSymbolFont Font)

Get value string of gtol
Parameters:
Symbol
arg description
Font
arg description
Returns:
return description



wfcElementTree_ptrCreateElementTreeFromXML (xrstring Filename)

Creates an element tree from xml file provided.

Reads in the xml file and converts into an element tree

Exceptions thrown (but not limited to):

pfcXToolkitOutOfMemory - XML Parser failed to initialize

pfcXToolkitCantAccess - XML Parser failed during parsing

pfcXToolkitCantOpen - XML Parser failed opening DOM Tree

pfcXToolkitNotValid - XML Parser failed due to other errors

pfcXToolkitAmbiguous - Error occurred during creation of output transcoder

pfcXToolkitBadContext - Function failed to create the element tree due to an error in the ProElemId, ProType, or Enum Value in the XML file The function populates the ProArray p_errors to hold the errors ( refer to fields:

  • error_type = PRO_XML_OTHERERROR
  • line_number = sr. no. of Element in file
  • message = name of Element
  • column_number = elem_id of Element
)


Manual References:
Feature Element Tree: Feature Element Tree, Feature Element Tree: Feature Element Tree
Parameters:
Filename
Returns:



wfcElementTree_ptrCreateElementTree (wfcElements_ptr Elems)

Creates an element tree from the elements and returns a handle to wfcElementTree
Manual References:
Feature Element Tree: Feature Element Tree, Feature Element Tree: Feature Element Tree
Parameters:
Elems
Returns:



optional wfcElementWstringOption_ptrGetElemWstrOption ()
voidSetElemWstrOption (optional wfcElementWstringOption_ptr value)

Options used to retrieve string values of elements

These options will be considered on call to method wfcElement::GetValueAsString(optional xrstring)
Manual References:
Feature Element Tree: Feature Elements, Feature Element Tree: Feature Elements, Feature Element Tree: Feature Elements, Feature Element Tree: Feature Elements




pfcModel_ptrImportAsModel (xrstring FileToImport, pfcNewModelImportType NewModelType, pfcModelType Type, xrstring NewModelName, wfcImportRepType ModelRepType, optional xrstring profile, optional pfcLayerImportFilter_ptr Filter)

Creates a new imported model in the solid.

Exceptions thrown (but not limited to):

pfcXToolkitCantOpen - import_file can't be opened.

pfcXToolkitUnsupported - Creo Parametric does not support import of the indicated file.

pfcXToolkitNotExist - No profile found.

pfcXToolkitInvalidFile - profile is not readable.

pfcXToolkitInvalidType - This combination of arguments is invalid.

pfcXToolkitLineTooLong - Name length of new model is more than 31 chars.


Manual References:
Interface: Solid Operations
Parameters:
FileToImport
The file to be imported.
NewModelType
The type of the file to be imported.
Type
The type of the model to create.
NewModelName
The name of the new imported model.
ModelRepType
The representation type.
profile
The profile path. Can be NULL.
Filter
The callback function that determines how to display and map layers of imported model. Can be NULL.
Returns:
The handle to the new import model.The imported model.



optional wfcSection_ptrGetActiveSection ()

Returns a copy of the current active sketcher section.

If Intent Manager mode is supposed to be used for this section,the call wfcSection::SetIntentManagerMode(xbool) to true must follow this method You must be in active sketcher mode to get section.

Exceptions thrown (but not limited to):

pfcXToolkitBadContext - Section not in sketcher mode.


Manual References:
Element Trees: Sections: Copying the Current Section, Element Trees: Sections: Copying the Current Section
Returns:
Copy of active section object handle



wfcSection_ptrCreateSection2D ()

Allocates a two-dimensional section.

Exceptions thrown (but not limited to):

pfcXToolkitOutOfMemory - There was a memory error.


Manual References:
Element Trees: Sections: Allocating a Two-Dimensional Section, Element Trees: Sections: Allocating a Two-Dimensional Section, Element Trees: Sketched Features: Creating Features Containing Sections
Returns:
Section object handle



xstringGetDisplayDateCode ()

Returns the Creo session's customer visible datecode.

The datecode is returned in the same format as shown in Creo Parametric Help information.

Note for the users of C++ Object Toolkit: If it is necessary to show an identifier for the Creo version to the user from an application, this value should be used, rather than the value passed in to the application's user_initialize().


Manual References:
Overview of Creo Object TOOLKIT C++: Retrieving Creo Version
Returns:



xintGetReleaseNumericVersion ()

Returns the integer major version number of the Creo executable that the application is connected to.

The returned value is an absolute number counting from the first shipment of PTC's MCAD software; for Creo Parametric 2.0 it is 31.
Manual References:
Overview of Creo Object TOOLKIT C++: Exception Handling
Returns:



voidAddCollectionToSelectionBuffer (wfcCollection_ptr Coll)

Adds collection to selection buffer
Manual References:
Selection: Adding Items to the Selection Buffer, Selection: Adding Items to the Selection Buffer
Parameters:
Coll
Collection to be added to selection buffer.
Returns:



voidRegisterExternalSelectionHighlight (wfcExternalSelectionHighlight_ptr RegistrationMethods)

Registers external application highlighting callbacks in order to let application media (like a tree) react on selections made while calling or while in pfcBaseSession::Select(pfcSelectionOptions_ptr, optional pfcSelections_ptr)

The client instance, passed is an input to the method, should be released after the application is done with using it.
See Also:
wfcWSelection::RecordExternalSelection(wfcSelectionRecordAction)
Manual References:
External Data: Selecting the Node from the External Application Tree, External Data: Selecting the Node from the External Application Tree
Parameters:
RegistrationMethods
wfcExternalSelectionHighlight object.
Returns:



voidReleaseExternalSelectionHighlight (wfcExternalSelectionHighlight_ptr RegistrationMethods)

Releases the client interface used for external selection.
Manual References:
External Data: Selecting the Node from the External Application Tree
Parameters:
RegistrationMethods
wfcExternalSelectionHighlight object.
Returns:



pfcAssembly_ptrRetrieveLightweightGraphicsSimpRep (xrstring AssemName)

Retrieves the light-weight graphics simplified representation of an assembly.

This method is a shortcut for wfcWSession::RetrieveSimpRep(xrstring, wfcMdlfileType, pfcSimpRepType, optional xrstring)

Exceptions thrown (but not limited to):

pfcXToolkitNoPermission - The function does not have permission to operate on this assembly.


Parameters:
AssemName
The name of the assembly to retrieve.
Returns:
The handle to the assembly.



pfcAssembly_ptrRetrieveDefaultEnvelopeSimprep (xrstring AssemName)

Retrieves the Default Envelope simplified representation of an assembly

This method is a shortcut for wfcWSession::RetrieveSimpRep(xrstring, wfcMdlfileType, pfcSimpRepType, optional xrstring) Operates on assemblies only, not parts

Exceptions thrown (but not limited to):

pfcXToolkitNoPermission - The function does not have permission to operate on this assembly.


Manual References:
Simplified Representations: Retrieving Simplified Representations, Simplified Representations: Retrieving Simplified Representations
Parameters:
AssemName
The name of the assembly to retrieve
Returns:
The handle to the assembly.



pfcAssembly_ptrRetrieveAssemblySimpRep (xrstring AssemName, wfcMdlfileType FileType, optional pfcSimpRepInstructions_ptr Instructions)

Retrieves the specified simplified representation. Takes the origin file type into account.

This method supports Multi-CAD models.

Exceptions thrown (but not limited to):

pfcXToolkitNoPermission - The function does not have permission to operate on this assembly.

pfcXToolkitNotFound - The function did not find the simplified representation in the solid.


Parameters:
AssemName
The name of the assembly to retrieve.
FileType
The file type of the assembly to retrieve.
Instructions
The simplified representation Instructions - the internal data required to define a simplified representation.
Returns:
The retrieved representation.



pfcSolid_ptrRetrieveSimpRep (xrstring ModelName, wfcMdlfileType FileType, pfcSimpRepType SimpRepType, optional xrstring ReprName)

Retrieves the specified simplified representation Takes the origin file type into account.

This method supports Multi-CAD models.

If errors occur in regeneration, the model will include suppressed features. Use pfcSolid::HasRetrievalErrors() to identify the errors.

Exceptions thrown (but not limited to):

pfcXToolkitNoPermission - The function does not have permission to operate on this model.


Parameters:
ModelName
The name of the model to retrieve.
FileType
The file type of the model to retrieve.
SimpRepType
The representation type. SIMPREP_MASTER_REP and SIMPREP_USER_DEFINED can be used only if FileType is MDLFILE_PART.
ReprName
The name of the simplified representation, if SimpRepType is SIMPREP_USER_DEFINED, otherwise is ignored.
Returns:
The retrieved representation.



xrealGetDefaultTolerance (wfcToleranceType Type, xint Decimals)

Retrieves the current Creo Parametric default tolerance value for the specified number of decimal places.
Manual References:
Dimensions and Parameters: Dimension Tolerances, Dimensions and Parameters: Dimension Tolerances
Parameters:
Type
The tolerance type.
Decimals
The number of decimal places used to identify the tolerance.
Returns:
 



pfcModel_ptrLoadModelRepresentation (xrstring AssemblyFileName, pfcModelType Type, optional xrstring SimpRepName, optional pfcSimpRepInstructions_ptr Instructions)

Retrieves the specified simplified representation.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The file was not found.

pfcXToolkitCantOpen - The file exists but is not readable.

pfcXToolkitEmpty - The specified representation was not stored in the file (for non user-defined representations).

pfcXToolkitInvalidFile - The model is not a Creo Parametric model.

pfcXToolkitLineTooLong - The model name is too long.

pfcXToolkitInvalidName - The specified user defined representation was not found (in which case it may be created on the fly following instructions in p_simp_rep_data - check p_result for being not NULL)

pfcXToolkitNoPermission - The function does not have permission to operate on this model.


Manual References:
Simplified Representations: Retrieving Simplified Representations
Parameters:
AssemblyFileName
The assembly file location.
Type
Model type.
SimpRepName
The name of the simplified representation.
Instructions
The simplified representation data.
Returns:
pfcModelobject



pfcSolid_ptrGetSolid (xrstring Name, pfcModelType Type)

Initializes the ProSolid handle.
Manual References:
Solid: Getting a Solid Object
Parameters:
Name
The solid name.
Type
The solid type.
Returns:
 



wfcImportfeatRedefSourceTypeGetImportFeatRedefSourceType (wfcImportFeatRedefOperationType Type)

Provides the wfcFeature::ImportfeatRedefSourceType used to redefine an import feature.
Manual References:
Interface: Redefining the Import Feature
Parameters:
Type
wfcFeature::ImportFeatRedefOperationType
Returns:
 



wfcLineStyleData_ptrGetLineStyleData (pfcStdLineStyle LineStyle)

Provides a description of the specified line style.

Exceptions thrown (but not limited to):

pfcXToolkitInvalidPtr - The style_info == NULL.


Manual References:
Graphics: Line Styles for Graphics, Graphics: Line Styles for Graphics
Parameters:
LineStyle
The style type.
Returns:
 



wfcIntfDataSourceTypeGetDataSourceType (pfcIntfType IntfType)

Provide the wfcIntfDataSourceType for given pfcIntfType.
Manual References:
Interface: Extracting Geometry as Interface Data
Parameters:
IntfType
The interface type.
Returns:
The wfcSession::IntfDataSourceType.



wfcWWindow_ptrCreateAccessorywindowWithTree (xrstring ObjectName, wfcMdlfileType ObjectType, optional xbool EnableTree)

Retrieves a window and attaches the object to it.

If the window is already open with the object attached, the function returns the window.If there is an empty window up, the function attaches the object to it.Otherwise, the function creates a new window and attaches the object to it.
The window created is smaller than the one created by pfcBaseSession::CreateModelWindow(pfcModel_ptr) This window doesn't have the toolbar. It doesn't allow any options and has restricted options under Windows menu.

Exceptions thrown (but not limited to):

pfcXToolkitInvalidType - You specified an invalid object type.

pfcXToolkitNotFound - The application is trying to open an embedded model (that is, a model representing a single body of a multi-body foreign object) in a separate window. This operation is not supported.


Manual References:
Windows and Views: Creating Windows, Windows and Views: Creating Windows
Parameters:
ObjectName
The name of the object to be retrieved. It should not contain extension.
ObjectType
The type of the object.
EnableTree
If true enables model tree or disables otherwise.
Returns:
A window object



wfcWWindow_ptrCreateBarewindow (xrstring ObjectName, wfcMdlfileType ObjectType)

Retrieves a window and attaches the object to it.

If the window is already open with the object attached, the function returns the window. If there is an empty window up, the function attaches the object to it. Otherwise, the function creates a new window and attaches the object to it.
The window created doesn't have any toolbars or menus. It can be minimized or closed and it has all the regular mouse-driven view capabilites like zoom, rotation and panning.

Exceptions thrown (but not limited to):

pfcXToolkitInvalidType - You specified an invalid object type.

pfcXToolkitNotFound - The application is trying to open an embedded model (that is, a model representing a single body of a multi-body foreign object) in a separate window. This operation is not supported.


Manual References:
Windows and Views: Creating Windows
Parameters:
ObjectName
The name of the object to be retrieved.It should not contain extension
ObjectType
The type of the object.
Returns:
A window object



xboolIsTextureFileEmbedded (xrstring TextureFileName)

Checks if the texture file was embedded.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The texture file could not be found on disk or in memory.

pfcXToolkitCantWrite - The temporary texture file could not be written.


Manual References:
Graphics: Surface Properties, Graphics: Surface Properties
Parameters:
TextureFileName
Returns:
true if texture file was embedded.



optional xstringGetTextureFilePath (xrstring TextureFileName, xbool CreateTempFile)

Looks up the full path to the texture, decal, or bump map file indicated.

If the texture is embedded inside a Creo Parametric model, instead of being loaded from the texture path, this function will write a temporary copy of the file if CreateTempFile is set to true.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The texture file could not be found on disk or in memory.

pfcXToolkitCantWrite - The temporary texture file could not be written.


Manual References:
Graphics: Surface Properties
Parameters:
TextureFileName
The texture file name.
CreateTempFile
Pass true to have Creo Parametric write a temporary copy of the texture file if its is embedded in a model. and false to skip writing the file..
Returns:
Full path to the texture file



voidDisplayInformationWindow (xrstring FilePath, optional xreal XOffset, optional xreal YOffset, optional xint Rows, optional xint Columns)

Creates a window and shows the text of the file specified by FilePath.
Manual References:
Session Objects: File Handling
Parameters:
FilePath
The file name.
XOffset
Location of the window in terms of X offset.The valid values are between 0.00 and 1.00
YOffset
Location of the window in terms of Y offset.The valid values are between 0.00 and 1.00
Rows
Size of the window in terms of rows. The valid values are between 6 and 33
Columns
Size of the window in terms of columns. The valid values are between 8 and 80
Returns:



pfcDrawing_ptrOpenDrawingAsReadOnly (xrstring Path)

 
Manual References:
Drawings: Listing Drawing Views
Parameters:
Path
 
Returns:
 



xboolUIEditFile (xrstring FileName)

Opens an edit window for the specified file using the default text editor.

Exceptions thrown (but not limited to):

pfcXToolkitNoChange - The user quit from the editor.


Manual References:
Session Objects: File Handling, Session Objects: File Handling
Parameters:
FileName
Name of the file or File name with full path
Returns:
The boolean status that file is edited or not.



wfcParsedFileNameData_ptrParseFileName (xrstring FileName)

Parses the specified file name into its components.
Manual References:
Session Objects: File Handling, Session Objects: File Handling
Parameters:
FileName
Name of the file or File name with full path
Returns:
The wfcParsedFileNameData object.



xstringUIOpenFileType (wfcFiletypeOpenOptions_ptr Options)

Prompts the standard file open browser interface of Creo Parametric.

Exceptions thrown (but not limited to):

pfcXToolkitUserAbort - The user aborted from the user interface.


Manual References:
Session Objects: File Dialogs, Session Objects: File Dialogs
Parameters:
Options
The various options for file open dialog.
Returns:
The selected file.



xstringUISaveFileType (wfcFiletypeSaveOptions_ptr Options)

Prompts the standard file save browser interface of Creo Parametric.

For Multi-CAD objects, this method does not support local disk saving location in a Windchill connected session.

Exceptions thrown (but not limited to):

pfcXToolkitUserAbort - The user aborted from the user interface.


Manual References:
Session Objects: File Dialogs, Session Objects: File Dialogs
Parameters:
Options
The various options for file save dialog.
Returns:
The selected file.



xboolIsOptionOrdered (xrstring OptionName)

Determines whether the specified option is available.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The specified option was not found.


Manual References:
Session Objects: Creo License Data
Parameters:
OptionName
The option name.
Returns:
 



xstringGetResourcePath ()

Provides the resource path of an application.

This function can be used only to obtain the resource path. The path and its contents must not be altered in any way; an attempt to do so will make the application behavior unpredictable.
Returns:
Path to a local folder.



wfcMdlfileDescriptor_ptrGetMdlfileDescriptor (pfcModelDescriptor_ptr ModelDescr)

 
Parameters:
ModelDescr
 
Returns:
 



pfcWindow_ptrOpenSource (wfcMdlfileDescriptor_ptr MdlfileDesc)

Retrieves the specified model and displays it in a window.

This method opens the file and displays it in a new window. It accepts filetypes supported by Multi-CAD approach.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - This means either:

  • The model was not found in the current directory, OR
  • The method was not able to find the window, OR
  • The application is trying to open an embedded model (that is, a model representing a single body of a multi-body foreign object) in a separate window. This operation is not supported.

pfcXToolkitNoPermission - The function does not have permission to operate on this model.

pfcXToolkitBadContext - The Multi-CAD model is not being retrieved from an active Windchill server.

pfcXToolkitInvalidType - You specified an invalid object type.

pfcXToolkitDeadLock - The Creo Parametric user interface is not prepared to handle this request (because it is blocked by another process such as an OLE container activation).


Parameters:
MdlfileDesc
The descriptor of a model to retrieve.
Returns:
The new window



pfcModel_ptrRetrieveModelByFiletype (wfcMdlfileDescriptor_ptr MdlfileDescr, pfcRetrieveModelOptions_ptr Opts)

Retrieves the specified model into the Creo Parametric session from standard directory.

The method does not create a window for the model or display it anywhere. The model can be retrieved only from standard directory. Path argument in model descriptor is ignored by this api. It accepts filetypes supported by Multi-CAD approach.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The model was not found in the current directory.

pfcXToolkitNoPermission - The function does not have permission to operate on this model.

pfcXToolkitBadContext - The Multi-CAD model is not being retrieved from an active Windchill server.


See Also:
wfcWSession::OpenSource(wfcMdlfileDescriptor_ptr)
Parameters:
MdlfileDescr
The information about the model to retrieve.
Opts
Options for retrieval.
Returns:
The retrieved model



wfcExternalObjectClass_ptrCreateExternalClass (xrstring Name, xint Type)

Registers a new external object class.

Exceptions thrown (but not limited to):

pfcXToolkitFound - The external object class already exists.


Parameters:
Name
The name of external object class.
Type
The type of external object class.
Returns:
The external object class.



voidAddNavigatorPaneLayout (xrstring PaneName, xrstring ResFileName, optional xrstring IconFileName)

Add new pane tab with specified name on the Navigator pane.
Parameters:
PaneName
Name of the navigator pane
ResFileName
Name of the resource file whose top component must be a layout.
IconFileName
Name of the icon file to be displayed on pane. Pass NULL to use default icon.
Returns:
void



xstringGetNavigatorPaneDevice (pfcWindow_ptr WindowObject)

Get the name of the navigator pane device specific to window object.
Parameters:
WindowObject
Window object whose device name is required.
Returns:
Device Name



xstringGetNavigatorPaneComponent (xrstring PaneName, xrstring ComponentLocalName)

Get the changed name of a component in the pane.

Exceptions thrown (but not limited to):

pfcXToolkitMsgTooLong - Pane name is too long.


Parameters:
PaneName
Name of the navigator pane
ComponentLocalName
Local name of the component (as specified in resource before addition)
Returns:
Component Name



xstringGetNavigatorPaneLayoutComponent (xrstring PaneName)

Get the changed name of the top layout in navigator pane.

Exceptions thrown (but not limited to):

pfcXToolkitMsgTooLong - Pane name is too long.


Parameters:
PaneName
Name of the navigator pane
Returns:
Top Layout Name



pfcModel_ptrGetModelFromMdlfileDescriptor (wfcMdlfileDescriptor_ptr MdlfileDescr)

Returns the model based on the model descriptor input.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - Unable to find the required model.


Parameters:
MdlfileDescr
The model descriptor.
Returns:
The model.



voidAddModelRetrievePreListener (wfcBeforeModelRetrieveListener_ptr listen)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcActionSource::AddActionListener


Adds an action listener to notify you of activating file open dialog using File -> Open.

Warning: This notification blocks Creo Parametric or Direct's standard file open dialog. It is developer's responsibility to substitute it with his own dialog through this function.
Manual References:
Action Listeners: Model Level Action listeners
Parameters:
listen
A reference of client class which overrides method wfcBeforeModelRetrieveListener::OnBeforeModelRetrieve()
Returns:
void



voidAddBeforeModelRetrieveListener (wfcBeforeModelRetrieveActionListener_ptr listen)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcActionSource::AddActionListener


Adds an action listener to notify you of activating file open dialog using File -> Open.
This listener can pass instructions for retrieving model to Creo Parametric.

Warning: This notification blocks Creo Parametric or Direct's standard file open dialog. It is developer's responsibility to substitute it with his own dialog through this function.
Manual References:
Action Listeners: Model Level Action listeners, Action Listeners: Model Level Action listeners
Parameters:
listen
A reference of client class which overrides method wfcBeforeModelRetrieveActionListener::OnBeforeModelRetrieve()
Returns:
void



voidAddModelSavePreAllListener (wfcBeforeModelSaveAllListener_ptr listen)
DEPRECATED: since Creo 4
SUCCESSOR(S): pfcActionSource::AddActionListener


 
Parameters:
listen
 
Returns:



wfcUDFVariableParameters_ptrGetUDFDataDefaultVariableParameters (xrstring Name, optional xrstring Instance)

 

Exceptions thrown (but not limited to):

pfcXToolkitNotValid - If the variant item type is not parameter or annotation.

pfcXToolkitNoLicense - No license is available for this function.

pfcXToolkitBadContext - Cannot access the UDF data because the name and path have not been set.

pfcXToolkitCantOpen - Cannot access the UDF .gph file at the path specified.

pfcXToolkitNotFound - This UDF does not have any variable items.


Manual References:
Features: Creating a Custom UDF, Features: Creating a Custom UDF
Parameters:
Name
 
Instance
 
Returns:
 



wfcStatusReleaseVisitor (wfcVisitingClient_ptr visitingClient)

 
Parameters:
visitingClient
 
Returns:
 



voidAutoPropagate ()
LICENSE: 222

Automatically propagates annotation elements within the current model to the currently selected feature based on the standard Creo Parametric algorithm.

The behavior is based on the current contents of the selection buffer.

Exceptions thrown (but not limited to):

pfcXToolkitBadContext - The current selections do not allow propagation of annotation elements.

pfcXToolkitNoLicense - No license is available for this function.


Manual References:
Annotations: Annotation Features and Annotations: Accessing and Modifying Annotation Elements, Annotations: Annotation Features and Annotations: Automatic Propagation of Annotation Elements
Returns:



xstringGetApplicationPath ()

 
Manual References:
Session Objects: Registry File Data, Session Objects: Registry File Data
Returns:



xstringGetApplicationTextPath ()

 
Manual References:
Session Objects: Registry File Data
Returns:



voidExecuteMacro ()

 
Manual References:
Session Objects: Macros, Session Objects: Macros
Returns:



optional xstringGetKnownDirectory (wfcKnownDirectoryType dir_type)

 
Parameters:
dir_type
Returns:



voidAddBrowserMessageListener (xrstring key, wfcBrowserMessageListener_ptr Listener)

Add listener callback for browser events.
Manual References:
Action Listeners: Session Level Action Listeners
Parameters:
key
Unique key that should be specified in Java Script message with syntax as window.external.ptc ('ToolkitJSBridge=' + key + '?' + message)
Listener
Listener object
Returns:



voidDeleteBrowserMessageListener (xrstring key)

 
Parameters:
key
Returns:



xboolGetIncompleteSurfaceTessellationAllowed ()

 
Returns:



voidSetIncompleteSurfaceTessellationAllowed (xbool IsAllowed)

 
Parameters:
IsAllowed
Returns:



pfcAssembly_ptrRetrieveAutomaticSimpRep (xrstring AssemName, wfcMdlfileType FileType, xrstring UDSrepName)

Retrieve user defined simplified representation as automatic rep.

Exceptions thrown (but not limited to):

pfcXToolkitNoPermission - The function does not have permission to operate on this assembly.

pfcXToolkitNotFound - The function did not find the simplified representation in the solid.


Manual References:
Simplified Representations: Simplified Representation Utilities
Parameters:
AssemName
The name of the assembly to retrieve.
FileType
The file type of the assembly to retrieve.
UDSrepName
The name of the user defined simprep to retrieve as automatic.
Returns:
The retrieved representation.



voidStartKinDrag ()

This method starts a drag session it should be called before any other Kinematic drag or Snapshot function is called. All subsequent methods will work with the Snapshots of the window assembly. All component path should start from this assembly. All transforms belong to this assembly. The method can be called for design assemblies in Standard Assembly and Mechanism modes. It cannot be used if assembly is exploded, if sketcher is active, when component placement is active or when drag dialog is on screen.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Connecting to a Kinematic Drag Session, Assembly: Kinematic Dragging and Creating Snapshots: Connecting to a Kinematic Drag Session
Returns:



voidStopKinDrag ()

This method will stop drag session. Method pfcWindow::Refresh() should be performed to see the change of the graphic window scale according to updated outline.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Connecting to a Kinematic Drag Session, Assembly: Kinematic Dragging and Creating Snapshots: Connecting to a Kinematic Drag Session
Returns:



voidMoveKinDrag (pfcSelection_ptr DragPoint, pfcPoint2Ds_ptr Moves)

This method bring to drag this selected object. Displays a hook point around the point. Performs a drag according to the environment set in wfcWSession::SetKinDragEnvironment(wfcKinDragType, optional xrstring, optional pfcComponentPath_ptr, optional pfcSelection_ptr) For dragging use constraints from current snapshot, if it set. After end of the movement the hook point is removed.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Performing Kinematic Drag, Assembly: Kinematic Dragging and Creating Snapshots: Performing Kinematic Drag
Parameters:
DragPoint
A geometrical object point,surface,axis or component to be dragged. Set the selected-point using pfcSelection::GetPoint(pfcPoint3D_ptr), otherwise the hook point will be wrong and movement result will be wrong as well.
Moves
Sequence of 2d points on screen.
Returns:



wfcSnapshotTransformations_ptrGetKinSnapshotTransformations (xrstring Name, optional pfcComponentPath_ptr Path)

This method brings transformation paths and transformation matrices for all components in the snapshot versus top level assembly.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Snapshot Transforms
Parameters:
Name
Name of the snapshot
Path
from top assembly
Returns:
Sequence of transformations and paths



voidSetKinDragEnvironment (wfcKinDragType Type, optional xrstring Name, optional pfcComponentPath_ptr Path, optional pfcSelection_ptr Reference)

This method setups the environment for subsequenmt dragging and reconnect operations. Environment can be set / reset several times after wfcWSession::StartKinDrag() is called.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Connecting to a Kinematic Drag Session, Assembly: Kinematic Dragging and Creating Snapshots: Performing Kinematic Drag
Parameters:
Type
type of the drag to be performed.
Name
Name of the existing snapshot which constraints will be active during drag. NULL can be passed instead. The snapshot will be checked for status (good / outdated /incomplete);
Path
Path of snapshot. NULL can be passed for top levsnapshots.
Reference
a selection represented coordinate system,part or body for advanced drag. It is relevant for advanced drag types only. For all other dragtypes it is ignored, NULL should be passed instead. In part selection case takes coordinates of corresponded body.
Returns:



voidCreateSnapshot (xrstring Name)

Creates a top assembly level snapshot from the current position on screen. Constraints will be copied from the active snapshot. The newly created snapshot will become the active one.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Creating and Modifying Snapshots, Assembly: Kinematic Dragging and Creating Snapshots: Creating and Modifying Snapshots
Parameters:
Name
Name of the Snapshot.
Returns:



voidDeleteSnapshot (xrstring Name, optional pfcComponentPath_ptr Path)

Deletes snapshot.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Creating and Modifying Snapshots
Parameters:
Name
Name of the Snapshot.Path of the component of the Snapshot.
Path
Returns:



voidUpdateSnapshot (xrstring Name)

Update snapshot.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Creating and Modifying Snapshots, Assembly: Kinematic Dragging and Creating Snapshots: Creating and Modifying Snapshots
Parameters:
Name
Name of the Snapshot.
Returns:



voidMoveKinDragForModel (pfcSelection_ptr DragPoint, pfcPoint3Ds_ptr Moves, optional pfcMatrix3D_ptr Matrix)

This function brings to drag this selected object. Performs a drag according to the environment set in wfcWSession::SetKinDragEnvironment(wfcKinDragType, optional xrstring, optional pfcComponentPath_ptr, optional pfcSelection_ptr) For dragging use constraints from the current snapshot, if it is set.
Manual References:
Technical Summary of Changes for Creo 11.0.0.0: Kinematic Dragging, Assembly: Kinematic Dragging and Creating Snapshots: Performing Kinematic Drag
Parameters:
DragPoint
A geometrical object point,surface,axis or component to be dragged. Set the selected-point using pfcSelection::GetPoint(pfcPoint3D_ptr), otherwise the hook point will be wrong and movement result will be wrong as well.
Moves
Sequence of 3d points in model coordinates.
Matrix
The view transformation matrix for the drag operation. See <reference 2 to unknown entity pfcView ::View::Transform> . The system would extract a ray direction from this matrix. The ray would be oriented orthogonal to the view plane directed inwards. Pass NULL to use current view and current object.
Returns: