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

This method is enabled for Creo Direct.

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)

This method is enabled for Creo Direct.

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

This method is enabled for Creo Direct.

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

This method is enabled for Creo Direct.

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.
voidDeleteBrowserMessageListener (xrstring key)

This method is enabled for Creo Direct.

 
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
wfcImportfeatRedefSourceTypeGetImportFeatRedefSourceType (wfcImportFeatRedefOperationType Type)
Provides the wfcFeature::ImportfeatRedefSourceType used to redefine an import feature.
xboolGetIncompleteSurfaceTessellationAllowed ()
 
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)

This method is enabled for Creo Direct.

Get the changed name of a component in the pane.
xstringGetNavigatorPaneDevice (pfcWindow_ptr WindowObject)

This method is enabled for Creo Direct.

Get the name of the navigator pane device specific to window object.
xstringGetNavigatorPaneLayoutComponent (xrstring PaneName)

This method is enabled for Creo Direct.

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)

This method is enabled for Creo Direct.

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.
pfcDrawing_ptrOpenDrawingAsReadOnly (xrstring Path)
 
pfcWindow_ptrOpenSource (wfcMdlfileDescriptor_ptr MdlfileDesc)

This method is enabled for Creo Direct.

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)

This method is enabled for Creo Direct.

 
pfcAssembly_ptrRetrieveAssemblySimpRep (xrstring AssemName, wfcMdlfileType FileType, optional pfcSimpRepInstructions_ptr Instructions)
Retrieves the specified simplified representation. Takes the origin file type into account.
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)

This method is enabled for Creo Direct.

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)
 
xboolUIEditFile (xrstring FileName)
Opens an edit window for the specified file using the default text editor.
xstringUIOpenFileType (wfcFiletypeOpenOptions_ptr Options)

This method is enabled for Creo Direct.

Prompts the standard file open browser interface of Creo Parametric.
xstringUISaveFileType (wfcFiletypeSaveOptions_ptr Options)

This method is enabled for Creo Direct.

Prompts the standard file save browser interface of Creo Parametric.


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


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:



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)

This method is enabled for Creo Direct.


Creates a new imported model in the solid.

For DMA, the following types are supported:

IGES

VDA

NEUTRAL

STEP

CATIA_SESSION

CATIA_MODEL

ACIS

PARASOLID

CATIA_PART

CATIA_PRODUCT

UG

PRODUCTVIEW

SW_PART

SW_ASSEM

INVENTOR_PART

INVENTOR_ASSEM

CC

The handle to the new import model. The file to be imported. The type of the file to be imported. The type of the model to create. The name of the new imported model. The representation type. The profile path. Can be NULL. The callback function that determines how to display and map layers of imported model. Can be NULL. The imported model.

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
NewModelType
Type
NewModelName
ModelRepType
profile
Filter
Returns:



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. Copy of active section object handle

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:



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 Datecode
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++: Version Compatibility: Creo Parametric and Creo Object TOOLKIT C++
Returns:



voidAddCollectionToSelectionBuffer (wfcCollection_ptr Coll)

Adds collection to selection buffer
Manual References:
Technical Summary of Changes for Creo 4.0 F000: Selection, 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:
Technical Summary of Changes for Creo 4.0 F000: External Objects, 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:
Technical Summary of Changes for Creo 4.0 F000: External Objects, 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) The handle to the assembly. The name of the assembly to retrieve.

Exceptions thrown (but not limited to):

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


Parameters:
AssemName
Returns:



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 The handle to the assembly. The name of the assembly to retrieve

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, Technical Summary of Changes for Creo 4.0 F000: Simplified Representation
Parameters:
AssemName
Returns:



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. The retrieved representation. The name of the assembly to retrieve. The file type of the assembly to retrieve. The simplified representation Instructions - the internal data required to define a simplified representation.

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
FileType
Instructions
Returns:



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.

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

Exceptions thrown (but not limited to):

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


Parameters:
ModelName
FileType
SimpRepType
ReprName
Returns:



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, Technical Summary of Changes for Creo 4.0 F000: 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, Technical Summary of Changes for Creo 4.0 F000: Simplified Representation
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:
Technical Summary of Changes for Creo 4.0 F000: Import Feature, 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:
Technical Summary of Changes for Creo 4.0 F000: Graphics, 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:
Technical Summary of Changes for Creo 4.0 F000: Interface Data, Interface: Extracting Creo Parametric 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. The name of the object to be retrieved. It should not contain extension. The type of the object. If true enables model tree or disables otherwise. A window object

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, Technical Summary of Changes for Creo 4.0 F000: Windows
Parameters:
ObjectName
ObjectType
EnableTree
Returns:



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. The name of the object to be retrieved.It should not contain extension The type of the object. A window object

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, Technical Summary of Changes for Creo 4.0 F000: Windows
Parameters:
ObjectName
ObjectType
Returns:



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:
Technical Summary of Changes for Creo 4.0 F000: Surface, 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. Full path to the texture file The texture file name. 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..

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:
Technical Summary of Changes for Creo 4.0 F000: Surface, Graphics: Surface Properties
Parameters:
TextureFileName
CreateTempFile
Returns:



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, Technical Summary of Changes for Creo 4.0 F000: 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, Technical Summary of Changes for Creo 4.0 F000: Drawings
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, Technical Summary of Changes for Creo 4.0 F000: 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, Technical Summary of Changes for Creo 4.0 F000: File Handling
Parameters:
FileName
Name of the file or File name with full path
Returns:
The wfcParsedFileNameData object.



xstringUIOpenFileType (wfcFiletypeOpenOptions_ptr Options)

This method is enabled for Creo Direct.


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, Technical Summary of Changes for Creo 4.0 F000: File Handling
Parameters:
Options
The various options for file open dialog.
Returns:
The selected file.



xstringUISaveFileType (wfcFiletypeSaveOptions_ptr Options)

This method is enabled for Creo Direct.


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. The selected file. The various options for file save dialog.

Exceptions thrown (but not limited to):

pfcXToolkitUserAbort - The user aborted from the user interface.


Manual References:
Session Objects: File Dialogs, Session Objects: File Dialogs, Technical Summary of Changes for Creo 4.0 F000: File Handling
Parameters:
Options
Returns:



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, Technical Summary of Changes for Creo 4.0 F000: License Data, Technical Summary of Changes for Creo 4.0 F000: Line Styles for Graphics
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)

This method is enabled for Creo Direct.


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.

For DMA, the following types are supported: PART & ASSEMBLY.

The new window The descriptor of a model to retrieve.

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

pfcXToolkitUnsupported - Type not supported in DMA.


Parameters:
MdlfileDesc
Returns:



pfcModel_ptrRetrieveModelByFiletype (wfcMdlfileDescriptor_ptr MdlfileDescr, pfcRetrieveModelOptions_ptr Opts)

This method is enabled for Creo Direct.


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.

For DMA, the following types are supported: PART & ASSEMBLY.

wfcSession::WSession::OpenSource The retrieved model The information about the model to retrieve. Options for retrieval.

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.

pfcXToolkitUnsupported - Type not supported in DMA.


Parameters:
MdlfileDescr
Opts
Returns:



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)

This method is enabled for Creo Direct.


Add new pane tab with specified name on the Navigator pane.
Parameters:
PaneName
ResFileName
IconFileName
Returns:
void



xstringGetNavigatorPaneDevice (pfcWindow_ptr WindowObject)

This method is enabled for Creo Direct.


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



xstringGetNavigatorPaneComponent (xrstring PaneName, xrstring ComponentLocalName)

This method is enabled for Creo Direct.


Get the changed name of a component in the pane.

Exceptions thrown (but not limited to):

pfcXToolkitMsgTooLong - Pane name is too long.


Parameters:
PaneName
ComponentLocalName
Returns:
Component Name



xstringGetNavigatorPaneLayoutComponent (xrstring PaneName)

This method is enabled for Creo Direct.


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
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
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, Technical Summary of Changes for Creo 4.0 F000: Action listeners
Parameters:
listen
Returns:
void



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

This method is enabled for Creo Direct.


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, Technical Summary of Changes for Creo 4.0 F000: Action listeners
Parameters:
listen
Returns:
void



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

This method is enabled for Creo Direct.


 
Parameters:
listen
 
Returns:



wfcUDFVariableParameters_ptrGetUDFDataDefaultVariableParameters (xrstring Name, optional xrstring Instance)

 
Manual References:
Features: Creating a Custom UDF, Features: Creating a Custom UDF, Technical Summary of Changes for Creo 4.0 F000: Features
Parameters:
Name
 
Instance
 
Returns:
 



wfcStatusReleaseVisitor (wfcVisitingClient_ptr visitingClient)

This method is enabled for Creo Direct.


 
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.
Manual References:
Annotations: Annotation Features and Annotations: Automatic Propagation of Annotation Elements, Technical Summary of Changes for Creo 4.0 F000: Annotations
Returns:



xstringGetApplicationPath ()

 
Manual References:
Technical Summary of Changes for Creo 4.0 M030: Registry File Data, Session Objects: Registry File Data, Session Objects: Registry File Data
Returns:



xstringGetApplicationTextPath ()

 
Manual References:
Technical Summary of Changes for Creo 4.0 M030: Registry File Data, Session Objects: Registry File Data
Returns:



voidExecuteMacro ()

 
Manual References:
Technical Summary of Changes for Creo 4.0 M030: Macros, Session Objects: Macros, Session Objects: Macros
Returns:



optional xstringGetKnownDirectory (wfcKnownDirectoryType dir_type)

 
Parameters:
dir_type
Returns:



voidAddBrowserMessageListener (xrstring key, wfcBrowserMessageListener_ptr Listener)

This method is enabled for Creo Direct.


Add listener callback for browser events.
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)

This method is enabled for Creo Direct.


 
Parameters:
key
Returns:



xboolGetIncompleteSurfaceTessellationAllowed ()

 
Returns:



voidSetIncompleteSurfaceTessellationAllowed (xbool IsAllowed)

 
Parameters:
IsAllowed
Returns: