Library | Module

Interface IpfcBaseSession



Description

This class defines the information about a Creo Parametric session.
Direct Parent Classes:
IpfcActionSource, IpfcDisplay, IpfcParent
Direct Known Subclasses:
IpfcSession



Property Summary

PropertyConnectionIdas String
Returns the connection id for the Creo Parametric session that this application is connected to. The identification string can be passed to external asynchronous applications to allow them to connect to this Creo Parametric session.
PropertyCurrentModelas IpfcModel [readonly, optional]
The current Creo Parametric object, or null, if there is no current object
PropertyCurrentWindowas IpfcWindow [optional]
The current Creo Parametric window
PropertyDimensionDisplayModeas IpfcDimDisplayMode
The current dimension display setting.



Method Summary

SubAllowDuplicateModelItems (val as Boolean)
Turns on/off the control of creating duplicate model items.
SubAuthenticateBrowser (Username as String, Password as String)
Preset username and password to allow automatic login into HTTP servers that require authentication.
SubChangeDirectory (Path as String)
Changes Creo Parametric to another working directory.
SubCheckoutToWS (Objects as IpfcModelDescriptors, WSName as String, AsLink as Boolean, RelCriterion as IpfcRelCriterion)
Checks out a model from Pro/INTRALINK into the workspace.
SubCopyFileFromWS (SourceFile as String, TargetDirectory as String)
Copies a file from a Windchill workspace to a disk location.
SubCopyFileToWS (SourceFile as String, TargetWorkspace as String, PrimaryContent as String [optional])
Copies a file from local disk to a Windchill workspace; either as a primary document or as secondary content of an existing document in the workspace.
FunctionCreateAssembly (Name as String) as IpfcAssembly
Creates an empty assembly.
FunctionCreateDrawingFromTemplate (Name as String, Template as String, DrawingModel as IpfcModelDescriptor, Options as IpfcDrawingCreateOptions) as IpfcDrawing
Creates a drawing from a template.
FunctionCreateModelWindow (Mdl as IpfcModel) as IpfcWindow
Creates or retrieves a window for a specified model.
FunctionCreatePart (Name as String) as IpfcPart
Creates a new empty part.
SubEraseUndisplayedModels ()
Erases models which are not used in any Creo Parametric windows.
FunctionExecuteModelCheck (Model as IpfcModel, Instructions as IpfcModelCheckInstructions [optional]) as IpfcModelCheckResults
Execute ModelCheck from an external application.
SubExportCurrentRasterImage (ImageFileName as String, Instructions as IpfcRasterImageExportInstructions)
Outputs a standard Creo Parametric raster output file (for current Window).
SubExportDirectVRML (ExportData as IpfcVRMLDirectExportInstructions)
Exports a Creo Parametric object from disk into VRML format.
FunctionExportFromCurrentWS (FileNames as Istringseq, TargetLocation as String, Dependency as IpfcRelCriterion) as IpfcWSImportExportMessages
Export specified objects from the current workspace to a disk in a linked session of Creo Parametric. Can be called only when there are no objects in session . The specified objects may be exported along with all or required by Creo Parametric dependents (recursively), according to a specified dependency criterion. All problems (warnings, conflicts or errors) of processing individual objects are logged in proimpex.errors file created in the Creo Parametric run directory.
SubExportProfileLoad (ProfileFile as String)
Loads profile for export.
SubFlushCurrentWindow ()
Forces the flush of pending display commands on the current window.
FunctionGetActiveModel () as IpfcModel [optional]
Retrieves the handle to the active model.
FunctionGetActiveServer () as IpfcServer [optional]
Gets the active server handle .
FunctionGetAliasFromAliasedUrl (AliasedUrl as String) as String
Returns server alias from aliased URL.
FunctionGetByRelationId (Id as Long) as IpfcModel [optional]
Returns the model, given its relation identifier.
FunctionGetConfigOption (Name as String) as String [optional]
Retrieves the current value for the specified configuration file option.
FunctionGetConfigOptionValues (Name as String) as Istringseq [optional]
Retrieves the current value(s) for the specified configuration file option.
FunctionGetCurrentDirectory () as String
Gets the absolute path name of the current working directory for Creo Parametric.
FunctionGetCurrentWS () as String [optional]
Returns the name of the Workspace currently registered in Creo Parametric.
FunctionGetEnvironmentVariable (Name as String) as String [optional]
Returns the value a system environment variable.
FunctionGetImportSourceType (FileToImport as String, NewModelType as IpfcNewModelImportType) as IpfcModelType
Returns the type of model that can be created from a 3D format file. Note: does not support all types of 3D formats.
FunctionGetLocalizedMessageContents (MsgFile as String, Format as String, MessageTexts as Istringseq [optional]) as String
Writes a text message to a buffer string.
FunctionGetMessageContents (MsgFile as String, Format as String, MessageTexts as Istringseq [optional]) as String
Writes a text message to a buffer string.
FunctionGetModel (Name as String, Type as IpfcModelType) as IpfcModel [optional]
Finds a model in the Creo Parametric session, given the model name and type.
FunctionGetModelFromDescr (MdlDescr as IpfcModelDescriptor) as IpfcModel [optional]
Finds a model in the Creo Parametric session, given the model descriptor.
FunctionGetModelFromFileName (FileName as String) as IpfcModel [optional]
Locates and returns a model handle given its file name.
FunctionGetModelNameFromAliasedUrl (AliasedUrl as String) as String
Returns model name from aliased URL.
FunctionGetModelWindow (Mdl as IpfcModel) as IpfcWindow [optional]
Returns the window where a Creo Parametric model is displayed.
FunctionGetPrintMdlOptions (model as IpfcModel) as IpfcPrintMdlOption
Get model options for a specified model.
FunctionGetPrintPCFOptions (filename as String, model as IpfcModel) as IpfcPrinterPCFOptions
Get the print options from a specified PCF file.
FunctionGetPrintPlacementOptions () as IpfcPrintPlacementOption
Get the current print placement options.
FunctionGetPrintPrinterOptions (printer_type as String) as IpfcPrintPrinterOption
Get printer options for a specified printer.
FunctionGetProToolkitDll (ApplicationId as String) as IpfcDll [optional]
Finds a Creo Parametric TOOLKIT DLL, given its identifer string.
FunctionGetRGBFromStdColor (StdClr as IpfcStdColor) as IpfcColorRGB
Retrieves the RGB values for the specified color.
FunctionGetServerByAlias (Alias as String) as IpfcServer [optional]
Gets the server handle for a given server alias.
FunctionGetServerByUrl (Url as String, WorkspaceName as String [optional]) as IpfcServer [optional]
Gets the server handle for a given server url and workspace name.
FunctionGetServerLocation (Url as String) as IpfcServerLocation
Gets the server location handle for a given server url.
FunctionGetUrlFromAliasedUrl (AliasedUrl as String) as String
Converts an an aliased url (wtpub://alias/etc/p.prt) suitable for use in functions like ProMdlLoad to an unaliased URL (http://windchillserver.ptc.com/etc).
FunctionGetWindow (Id as Long) as IpfcWindow [optional]
Retrieves the window object by its identifier.
FunctionImport2DModel (NewModelName as String, Type as IpfcModelType, FilePath as String, Instructions as IpfcImport2DInstructions) as IpfcModel
Creates a two-dimensional model from a geometry file.
FunctionImportNewModel (FileToImport as String, NewModelType as IpfcNewModelImportType, Type as IpfcModelType, NewModelName as String, Filter as IpfcLayerImportFilter [optional]) as IpfcModel
Imports a 3D format file as a new model.
FunctionImportToCurrentWS (Filepaths as Istringseq, Dependency as IpfcRelCriterion) as IpfcWSImportExportMessages
Import specified objects from a disk to the current workspace in a linked session of Creo Parametric. Can be called only when there are no objects in session . The specified objects may be imported along with all or required by Creo Parametric dependents (recursively), according to a specified dependency criterion. All problems (warnings, conflicts or errors) of processing individual objects are logged in proimpex.errors file created in the Creo Parametric run directory.
FunctionIsConfigurationSupported (Type as IpfcExportType, Configuration as IpfcAssemblyConfiguration) as Boolean
Identifies if an assembly configuration is supported for a particular export type.
FunctionIsGeometryRepSupported (Type as IpfcExportType, Flags as IpfcGeometryFlags) as Boolean
Identifies if a combination of geometry flags are supported for export to a certain format.
FunctionListFiles (Filter as String, Version as IpfcFileListOpt, Path as String [optional]) as Istringseq
Returns a list of the files in the designated directory.
FunctionListModels () as IpfcModels
Retrieves the list of objects in the Creo Parametric session.
FunctionListModelsByType (Type as IpfcModelType) as IpfcModels
Returns all of the models of a particular type in the Creo Parametric session.
FunctionListServers () as IpfcServers [optional]
Sequence of servers , or null if server was not found
FunctionListSubdirectories (Path as String [optional]) as Istringseq
Lists the subdirectories in a given directory location.
FunctionListWindows () as IpfcWindows
Lists all the Creo Parametric windows.
SubLoadConfigFile (ConfigFileName as String)
Reads a configuration file into Creo Parametric.
FunctionLoadProToolkitDll (ApplicationName as String, DllPath as String, TextPath as String, UserDisplay as Boolean) as IpfcDll
Causes Creo Parametric to load a Creo Parametric TOOLKIT DLL application.
FunctionLoadProToolkitLegacyDll (ApplicationName as String, DllPath as String, TextPath as String, UserDisplay as Boolean) as IpfcDll
Causes Creo Parametric to load a Creo Parametric TOOLKIT DLL non-Unicode application.
FunctionOpenFile (MdlDescr as IpfcModelDescriptor) as IpfcWindow
Retrieves the specified model and displays it in a window.
FunctionPLMSInitialize (request as String) as String
 
FunctionQueryFeatureEdit () as IpfcSelections [optional]
Find the list of features being displayed for modification, as is done in 'Edit' on a feature.
SubRegisterCustomModelCheck (Instructions as IpfcCustomCheckInstructions)
Registers an custom check that can be included in any ModelCheck execution.
SubRegisterRelationFunction (Name as String, Listener as IpfcRelationFunctionListener, Options as IpfcRelationFunctionOptions [optional])
Register an external function which can be included in relations.
FunctionRegisterServer (Alias as String, Location as String, WorkspaceName as String) as IpfcServer
Registers a server in the session given its root location and an alias.
FunctionRetrieveAssemSimpRep (AssemName as String, Instructions as IpfcSimpRepInstructions [optional]) as IpfcAssembly
Retrieves the specified simplified representation.
FunctionRetrieveGeometryPartRep (PartName as String) as IpfcPart
Retrieves the specified part's geometric simplified representation.
FunctionRetrieveGeomSimpRep (AssemName as String) as IpfcAssembly
Retrieves the geometry simplified representation of an assembly.
FunctionRetrieveGraphicsPartRep (PartName as String) as IpfcPart
Retrieves the specified part's graphic simplified representation.
FunctionRetrieveGraphicsSimpRep (AssemName as String) as IpfcAssembly
Retrieves the graphics simplified representation of an assembly.
FunctionRetrieveModel (MdlDescr as IpfcModelDescriptor) as IpfcModel
Retrieves the specified model into the Creo Parametric session from standard directory.
FunctionRetrieveModelWithOpts (MdlDescr as IpfcModelDescriptor, Opts as IpfcRetrieveModelOptions) as IpfcModel
Retrieves the specified model into the Creo Parametric session based on the path specified in the model descriptor.
FunctionRetrievePartSimpRep (PartName as String, RepName as String) as IpfcPart
Retrieves the specified part's user-defined simplified representation.
FunctionRetrieveSymbolicPartRep (PartName as String) as IpfcPart
Retrieves the specified part's symbolic simplified representation.
FunctionRetrieveSymbolicSimpRep (AssemName as String) as IpfcAssembly
Retrieves the symbolic simplified representation of an assembly.
SubRunMacro (Macro as String)
Runs the specified macro.
FunctionSelect (Options as IpfcSelectionOptions, InitialSels as IpfcSelections [optional]) as IpfcSelections [optional]
Allows interactive selection of objects in Creo Parametric.
SubSetConfigOption (Name as String, Value as String)
Sets the value of the specified configuration file option.
SubSetCurrentWS (NewWSName as String)
Registers a Workspace in Creo Parametric. Only one is allowed at a time, so if one is already registered, the new one will substitute the current one, but only if there are no objects in session.
FunctionSetLineStyle (NewStyle as IpfcStdLineStyle) as IpfcStdLineStyle
Sets the line style.
SubSetStdColorFromRGB (StdClr as IpfcStdColor, Color as IpfcColorRGB)
Enables you to set the values of the three color components for a standard color in Creo Parametric.
FunctionSetTextColor (NewColor as IpfcStdColor) as IpfcStdColor
Enables you to change the text color so any subsequent graphics window text is drawn in the specified color.
SubSetWSExportOptions (Options as IpfcWSExportOptions)
Sets the option controlling whether or not to export secondary contents during a call to IpfcBaseSession.ExportFromCurrentWS()
FunctionStartJLinkApplication (ApplicationName as String, ClassName as String, StartMethod as String, StopMethod as String, AdditionalClassPath as String [optional], TextPath as String [optional], UserDisplay as Boolean) as IpfcJLinkApplication
Register and start a synchronous J-Link application.
SubUIRegisterFileOpen (Options as IpfcFileOpenRegisterOptions, Listener as IpfcFileOpenRegisterListener)
Register a file type in File Open Dialog.
SubUIRegisterFileSave (Options as IpfcFileSaveRegisterOptions, Listener as IpfcFileSaveRegisterListener)
Register a file type in File 'Save a Copy' Dialog.
SubWLBInitialize (val as Boolean)
 



Property Detail


PropertyConnectionIdas String

Returns the connection id for the Creo Parametric session that this application is connected to. The identification string can be passed to external asynchronous applications to allow them to connect to this Creo Parametric session.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - Communications are not correctly established for this session of Creo Parametric, and asynchronous connection is not possible.






PropertyCurrentModelas IpfcModel [readonly, optional]

The current Creo Parametric object, or null, if there is no current object

Exceptions thrown (but not limited to):

IpfcXToolkitBadContext - The current Creo Parametric object is not set.


Manual References:
Models: Getting a Model Object




PropertyCurrentWindowas IpfcWindow [optional]

The current Creo Parametric window




PropertyDimensionDisplayModeas IpfcDimDisplayMode

The current dimension display setting.





Method Detail


SubAllowDuplicateModelItems (val as Boolean)

Turns on/off the control of creating duplicate model items.

Applications have an option to prevent creating ModelItems more than twice for the same Creo Parametric item. Howerever, this may cause memory corruption if not handled properly on the application side. Therefore, this behavior is turned off by default. Calling IpfcBaseSession.AllowDuplicateModelItems() for Boolean.FALSE turns it on. Although there is no restriction of turning this control off/on at any time and multiple times, it is recommended doing it not more than once and right after the session is obtained.
Parameters:
val



SubAuthenticateBrowser (Username as String, Password as String)

Preset username and password to allow automatic login into HTTP servers that require authentication.
Parameters:
Username
The name of user to be used.
Password
The password of the user to be used.



SubChangeDirectory (Path as String)

Changes Creo Parametric to another working directory.

Exceptions thrown (but not limited to):

IpfcXToolkitCantAccess - You are unable to access the specified directory.

IpfcXToolkitInvalidName - You specified an invalid name.


Parameters:
Path
The path to the new directory (relative or absolute).



SubCheckoutToWS (Objects as IpfcModelDescriptors, WSName as String, AsLink as Boolean, RelCriterion as IpfcRelCriterion)

Checks out a model from Pro/INTRALINK into the workspace.

NOTE: This method is deprecated. Pro/INTRALINK 3.4 is not supported. Please use Pro/INTRALINK 10.0 method IpfcServer.CheckoutObjects() or IpfcServer.CheckoutMultipleObjects() instead.

This method has limited options; PTC recommends using Pro/INTRALINK Toolkit for more complex checkout operartions.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The specified objects were not found in the Commonspace; or the Pro/INTRALINK Client is not in the latest frame when attempting the checkout.

IpfcXToolkitCommError - A Pro/INTRALINK Client is not available, and the Creo Parametric user has not registered Pro/INTRALINK as a server. (This function will work if the Pro/INTRALINK client has been authenticated previously through the Creo Parametric dialog.)

IpfcXToolkitNotImplemented - Initially, some of the options above might not be implemented.


Parameters:
Objects
Files to check out (name and type are required fields).
WSName
The workspace name.
AsLink
true to check out as a link, false to check out as a copy.
RelCriterion
Instructions about how to checkout dependencies.



SubCopyFileFromWS (SourceFile as String, TargetDirectory as String)

Copies a file from a Windchill workspace to a disk location.

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidFile - The input file was not found or improper.

IpfcXToolkitInvalidDir - The output location was not found.

IpfcXToolkitCantAccess - No permission to read the input file, or to write to the target directory.


Parameters:
SourceFile
The path to the file.This must begin with wtws://.
TargetDirectory
The location on the local disk indicating where to copy the file.



SubCopyFileToWS (SourceFile as String, TargetWorkspace as String, PrimaryContent as String [optional])

Copies a file from local disk to a Windchill workspace; either as a primary document or as secondary content of an existing document in the workspace.

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidFile - An input file was not found or improper.

IpfcXToolkitBadContext - There was a problem setting primary_content.

IpfcXToolkitCantWrite - The workspace file is not writable.


Parameters:
SourceFile
The path to the file
TargetWorkspace
The destination workspace.
PrimaryContent
The document which the copy will be attached to,"box7.prt" for example.Pass null to simply copy the file to the workspace.



FunctionCreateAssembly (Name as String) as IpfcAssembly

Creates an empty assembly.

Exceptions thrown (but not limited to):

IpfcXToolkitFound - An object of the specified name and type already exists.

IpfcXToolkitLineTooLong - Name length of the new object is more than 31 chars.


Parameters:
Name
The name of the assembly to create
Returns:
The new assembly



FunctionCreateDrawingFromTemplate (Name as String, Template as String, DrawingModel as IpfcModelDescriptor, Options as IpfcDrawingCreateOptions) as IpfcDrawing

Creates a drawing from a template.
See Also:
IpfcXToolkitDrawingCreateErrors, IpfcDrawingCreateOption
Parameters:
Name
The new drawing name.
Template
The template drawing name. This should be located in the search path or the system template directory.
DrawingModel
The name and type of the solid model to use while populating template views.
Options
Sequence of options to use while creating the drawing.
Returns:
The created drawing.



FunctionCreateModelWindow (Mdl as IpfcModel) as IpfcWindow

Creates or retrieves a window for a specified model.

If the window is already open with the model attached, the function returns the window object. If there is an empty window open, the function attaches the object to it. Otherwise, the function creates a new window and attaches the model to it.

Note that if the function creates a new window for an object, it does not automatically display the object in the window. To display the model, you must explicitly call the function IpfcModel.Display().

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidType - You specified an invalid object type.

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

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


Parameters:
Mdl
The model that will be displayed in (or associated with) the window.
Returns:
The new or retrieved window



FunctionCreatePart (Name as String) as IpfcPart

Creates a new empty part.

Exceptions thrown (but not limited to):

IpfcXToolkitFound - An object of the specified name and type already exists.

IpfcXToolkitLineTooLong - Name length of the new object is more than 31 chars.


Parameters:
Name
The name of the part
Returns:
The new part



SubEraseUndisplayedModels ()

Erases models which are not used in any Creo Parametric windows.

Exceptions thrown (but not limited to):

IpfcXToolkitBusy - Creo Parametric is in a state where erase isn't allowed.


See Also:
IpfcModel.Erase(), IpfcModel.EraseWithDependencies()



FunctionExecuteModelCheck (Model as IpfcModel, Instructions as IpfcModelCheckInstructions [optional]) as IpfcModelCheckResults

Execute ModelCheck from an external application.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The function failed to find config directoy specified.

IpfcXToolkitNoLicense - Creo Parametric is missing the license to execute ModelCheck.


Parameters:
Model
The model.
Instructions
The ModelCheck instructions.
Returns:
A summary of the results of the ModelCheck run.



SubExportCurrentRasterImage (ImageFileName as String, Instructions as IpfcRasterImageExportInstructions)

Outputs a standard Creo Parametric raster output file (for current Window).

Exceptions thrown (but not limited to):

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

IpfcXToolkitBadContext - The function is not available in Design Test Mode.


Parameters:
ImageFileName
An output filename, including the extension
Instructions
An Raster-Export-Instructions object that controls the Raster-Image export operation. All of these objects inherit from IpfcRasterImageExportInstructions .



SubExportDirectVRML (ExportData as IpfcVRMLDirectExportInstructions)

Exports a Creo Parametric object from disk into VRML format.

This function does not retrieve the model. See IpfcVRMLExportInstructions for a description of the files produced by the export.

Exceptions thrown (but not limited to):

IpfcXToolkitBadContext - The function is not available in Design Test Mode.


Parameters:
ExportData
pfcVRMLDirectExportInstructions



FunctionExportFromCurrentWS (FileNames as Istringseq, TargetLocation as String, Dependency as IpfcRelCriterion) as IpfcWSImportExportMessages

Export specified objects from the current workspace to a disk in a linked session of Creo Parametric. Can be called only when there are no objects in session . The specified objects may be exported along with all or required by Creo Parametric dependents (recursively), according to a specified dependency criterion. All problems (warnings, conflicts or errors) of processing individual objects are logged in proimpex.errors file created in the Creo Parametric run directory.

Exceptions thrown (but not limited to):

IpfcXToolkitBusy - cannot export because there are objects in Creo Parametric session

IpfcXToolkitNotFound - no workspace registered as current (or non linked session)

IpfcXToolkitInvalidDir - bad or inaccessible target_path


Parameters:
FileNames
A sequence of strings (file names ) to export.
TargetLocation
The export target directory.
Dependency
Instructions about how to export dependencies
Returns:
Import/export messages.



SubExportProfileLoad (ProfileFile as String)

Loads profile for export.

Exceptions thrown (but not limited to):

<reference to unknown entity pfcExceptions::pfcXEmptyString> - This means NULL or empty profile file path.


Parameters:
ProfileFile
Profile full path along with profile name and extension.



SubFlushCurrentWindow ()

Forces the flush of pending display commands on the current window.

IMPORTANT: Excessive use of this method will cause major slow down on systems running Vista or Windows 7. It is recommended to call this method only after completing all display operations.



FunctionGetActiveModel () as IpfcModel [optional]

Retrieves the handle to the active model.

Exceptions thrown (but not limited to):

IpfcXToolkitBadContext - The active Creo Parametric object is not set.


Returns:
The active model



FunctionGetActiveServer () as IpfcServer [optional]

Gets the active server handle .

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - There is no active aliased server (Local Dir is active).


Returns:
The server handle, or null if active server was not found



FunctionGetAliasFromAliasedUrl (AliasedUrl as String) as String

Returns server alias from aliased URL.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The object was not found.


Parameters:
AliasedUrl
The aliased URL.
Returns:
The server alias.



FunctionGetByRelationId (Id as Long) as IpfcModel [optional]

Returns the model, given its relation identifier.
Parameters:
Id
The identifier
Returns:
The model



FunctionGetConfigOption (Name as String) as String [optional]

Retrieves the current value for the specified configuration file option.

The maximum length of a configuration option value returned by this function is 80 characters. For access to larger values, use IpfcBaseSession.GetConfigOptionValues().

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The specified option was not found.

IpfcXToolkitLineTooLong - The function returned the option value, but the option is longer than the maximum string length 81.


See Also:
IpfcBaseSession.GetConfigOptionValues(), IpfcBaseSession.SetConfigOption()
Parameters:
Name
The name of the configuration file option whose value you want. Thisstring can contain uppercase and lowercase letters.
Returns:
The value



FunctionGetConfigOptionValues (Name as String) as Istringseq [optional]

Retrieves the current value(s) for the specified configuration file option.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The specified option was not found.

IpfcXToolkitLineTooLong - The function returned the option value, but the option is longer than the maximum string length 260.


See Also:
IpfcBaseSession.GetConfigOption(), IpfcBaseSession.SetConfigOption()
Parameters:
Name
The name of the configuration file option whose value you want. Thisstring can contain uppercase and lowercase letters.
Returns:
The sequence of values. This may contain one value, if the option is not a multi-valued option.



FunctionGetCurrentDirectory () as String

Gets the absolute path name of the current working directory for Creo Parametric.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The function was unable to find current working directory.


Returns:
The absolute path



FunctionGetCurrentWS () as String [optional]

Returns the name of the Workspace currently registered in Creo Parametric.

NOTE: This method is deprecated. Pro/INTRALINK 3.4 is not supported. Please use Pro/INTRALINK 10.0 method IpfcServer.ActiveWorkspace instead.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - There was no Workspace registered.


Returns:
 



FunctionGetEnvironmentVariable (Name as String) as String [optional]

Returns the value a system environment variable.
Parameters:
Name
The name of the variable.
Returns:
The value, or null if the variable is not set.



FunctionGetImportSourceType (FileToImport as String, NewModelType as IpfcNewModelImportType) as IpfcModelType

Returns the type of model that can be created from a 3D format file. Note: does not support all types of 3D formats.

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidType - This function is not supported for this import type.


Parameters:
FileToImport
The name of the file.
NewModelType
The type of information contained in the file.
Returns:
The type of file that can be created from the geometry file.



FunctionGetLocalizedMessageContents (MsgFile as String, Format as String, MessageTexts as Istringseq [optional]) as String

Writes a text message to a buffer string.

This method supports non-ASCII character strings as messages.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The specified message file was not found.

IpfcXToolkitCantOpen - The system could not read the message file.

IpfcXToolkitMsgNotFound - The specified message was not found in the message file.

IpfcXToolkitMsgNoTrans - The message text (in the current language of the user interface) was not found.

IpfcXToolkitMsgFmtError - There was a format error in the message text.

IpfcXToolkitMsgTooLong - The message was longer than 259 characters and has been truncated to fit.

IpfcXToolkitFound - The specified message was not found in memory and the message file was read previously. This may indicate that there are two different message files with the same name; avoid this problem by including the application name in the file name.


Parameters:
MsgFile
The name of the message file containing the format.
Format
The format of the message: the first line of the section of the message file that uniquely identifies the message.
MessageTexts
A sequence of strings which will replace any occurrences of %#w in the message file, where '#' is the numerical identifier of the replacement. This method does not support formats using %#s.
Returns:
The buffer string.



FunctionGetMessageContents (MsgFile as String, Format as String, MessageTexts as Istringseq [optional]) as String

Writes a text message to a buffer string.

This method supports only ASCII character strings as texts.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The specified message file was not found.

IpfcXToolkitCantOpen - The system could not read the message file.

IpfcXToolkitMsgNotFound - The specified message was not found in the message file.

IpfcXToolkitMsgNoTrans - The message text (in the current language of the user interface) was not found.

IpfcXToolkitMsgFmtError - There was a format error in the message text.

IpfcXToolkitMsgTooLong - The message was longer than 80 characters and has been truncated to fit.

IpfcXToolkitFound - The specified message was not found in memory and the message file was read previously. This may indicate that there are two different message files with the same name; avoid this problem by including the application name in the file name.


Parameters:
MsgFile
The name of the message file containing the format
Format
The format of the message: the first line of the section of the message file that uniquely identifies the message
MessageTexts
A sequence of strings which will replace any occurrences of %#s in the message format, where '#' is the numerical identifier of the replacement. This method does not support formats using %#w.
Returns:
The buffer string.



FunctionGetModel (Name as String, Type as IpfcModelType) as IpfcModel [optional]

Finds a model in the Creo Parametric session, given the model name and type.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - Unable to find the required model.


See Also:
IpfcBaseSession.RetrieveModel(), IpfcBaseSession.GetModelFromDescr()
Parameters:
Name
The name of the model
Type
The model type
Returns:
The requested model or null, if no model with the specified parameters has been found in session



FunctionGetModelFromDescr (MdlDescr as IpfcModelDescriptor) as IpfcModel [optional]

Finds a model in the Creo Parametric session, given the model descriptor.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - Unable to find the required model.


See Also:
IpfcBaseSession.RetrieveModel(), IpfcBaseSession.GetModel()
Parameters:
MdlDescr
The model descriptor
Returns:
The requested model or null, if no model with the specified parameters has been found in session



FunctionGetModelFromFileName (FileName as String) as IpfcModel [optional]

Locates and returns a model handle given its file name.

File name format should be of the form <model name>.<extension>, without a path.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - Unable to find the required model.

IpfcXInvalidFileName - Invalid file name.


Parameters:
FileName
The Creo Parametric model file name.
Returns:
The model handle, or null, if the model was not found.



FunctionGetModelNameFromAliasedUrl (AliasedUrl as String) as String

Returns model name from aliased URL.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The object was not found.


Parameters:
AliasedUrl
The aliased URL.
Returns:
The model name.



FunctionGetModelWindow (Mdl as IpfcModel) as IpfcWindow [optional]

Returns the window where a Creo Parametric model is displayed.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The function was not able to find the window.


Parameters:
Mdl
The model.
Returns:
The window, or null, if the model is not displayed.



FunctionGetPrintMdlOptions (model as IpfcModel) as IpfcPrintMdlOption

Get model options for a specified model.
Parameters:
model
The model.
Returns:



FunctionGetPrintPCFOptions (filename as String, model as IpfcModel) as IpfcPrinterPCFOptions

Get the print options from a specified PCF file.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The PCF file does not exist.


Parameters:
filename
The name of the PCF file.
model
Model to be printed.
Returns:



FunctionGetPrintPlacementOptions () as IpfcPrintPlacementOption

Get the current print placement options.
Returns:



FunctionGetPrintPrinterOptions (printer_type as String) as IpfcPrintPrinterOption

Get printer options for a specified printer.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The printer type was not recognized.


Parameters:
printer_type
Name of the printer type.
Returns:



FunctionGetProToolkitDll (ApplicationId as String) as IpfcDll [optional]

Finds a Creo Parametric TOOLKIT DLL, given its identifer string.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - Application could not be found.

IpfcXToolkitBadContext - Application was not active


Parameters:
ApplicationId
The DLL's identifier string, acquired from either:
  • A call to ProToolkitDllIdGet within the DLL application
  • The Id attribute in the IpfcDll interface.
Returns:
The DLL object, or null if the DLL was not found in session.



FunctionGetRGBFromStdColor (StdClr as IpfcStdColor) as IpfcColorRGB

Retrieves the RGB values for the specified color.
Parameters:
StdClr
The color type
Returns:
The RGB values



FunctionGetServerByAlias (Alias as String) as IpfcServer [optional]

Gets the server handle for a given server alias.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The server was not registered.


Parameters:
Alias
The name used by Creo Parametric to refer to this server.
Returns:
The server handle , or null if server with input alias was not found



FunctionGetServerByUrl (Url as String, WorkspaceName as String [optional]) as IpfcServer [optional]

Gets the server handle for a given server url and workspace name.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The server was not registered.


Parameters:
Url
The url of server.
WorkspaceName
The workspace name on the server.Can be null. If null, and more then one server with the url is registered, then function returns one of the registered servers.
Returns:
The server handle , or null if server with input url was not found



FunctionGetServerLocation (Url as String) as IpfcServerLocation

Gets the server location handle for a given server url.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The server was not registered.


Parameters:
Url
The url of server.
Returns:
The server location handle.



FunctionGetUrlFromAliasedUrl (AliasedUrl as String) as String

Converts an an aliased url (wtpub://alias/etc/p.prt) suitable for use in functions like ProMdlLoad to an unaliased URL (http://windchillserver.ptc.com/etc).

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The server listed in the given aliased URL is not registered in session.

IpfcXToolkitCantAccess - If the server is in offline mode.


Parameters:
AliasedUrl
The aliased URL.
Returns:
The unaliased URL.



FunctionGetWindow (Id as Long) as IpfcWindow [optional]

Retrieves the window object by its identifier.
Parameters:
Id
The identifier of the window
Returns:
The window that corresponds to the given identifier



FunctionImport2DModel (NewModelName as String, Type as IpfcModelType, FilePath as String, Instructions as IpfcImport2DInstructions) as IpfcModel

Creates a two-dimensional model from a geometry file.

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidFile - The input file could not be found, or contained unrecoverable errors.

IpfcXToolkitNoLicense - There is no license for this import option.

IpfcXToolkitCantOpen - Failed to create drawing.

IpfcXToolkitObsoleteFunc - The file format selected is no longer supported on this platform.


See Also:
IpfcSTEPImport2DInstructions, IpfcIGESImport2DInstructions, IpfcDXFImport2DInstructions, IpfcDWGImport2DInstructions
Parameters:
NewModelName
The new model name.
Type
The new model type.
FilePath
The full path to the file to import.
Instructions
Instructions for importing the file.
Returns:
The newly created two dimensional model.



FunctionImportNewModel (FileToImport as String, NewModelType as IpfcNewModelImportType, Type as IpfcModelType, NewModelName as String, Filter as IpfcLayerImportFilter [optional]) as IpfcModel

Imports a 3D format file as a new model.

Exceptions thrown (but not limited to):

IpfcXToolkitCantOpen - import_file can't be opened.

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

IpfcXToolkitNotExist - No profile found.

IpfcXToolkitInvalidFile - profile is not readable.

IpfcXToolkitInvalidType - This combination of arguments is invalid.

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

IpfcXToolkitFound - Already a model with same name exists in the Creo session.


Parameters:
FileToImport
Full path to the file to be imported.
NewModelType
The type of model to be imported. Use the method IpfcBaseSession.GetImportSourceType() to automatically determine the model type for some format types.
Type
The type of file being imported.
NewModelName
New name for the created model.
Filter
Returns:
The newly imported part or assembly, drawing.



FunctionImportToCurrentWS (Filepaths as Istringseq, Dependency as IpfcRelCriterion) as IpfcWSImportExportMessages

Import specified objects from a disk to the current workspace in a linked session of Creo Parametric. Can be called only when there are no objects in session . The specified objects may be imported along with all or required by Creo Parametric dependents (recursively), according to a specified dependency criterion. All problems (warnings, conflicts or errors) of processing individual objects are logged in proimpex.errors file created in the Creo Parametric run directory.

Exceptions thrown (but not limited to):

IpfcXToolkitBusy - cannot import because there are objects in Creo Parametric session

IpfcXToolkitNotFound - no workspace registered as current (or non linked session)


Parameters:
Filepaths
A sequence of strings - file paths (absolute or relative to current working directory) to objects to import.
Dependency
Instructions about how to import dependencies
Returns:
Import/export messages.



FunctionIsConfigurationSupported (Type as IpfcExportType, Configuration as IpfcAssemblyConfiguration) as Boolean

Identifies if an assembly configuration is supported for a particular export type.

Exceptions thrown (but not limited to):

IpfcXToolkitNotImplemented - file_type interface is currently not supported.

IpfcXToolkitInvalidType - invalid file_type.


See Also:
IpfcModel.Export(), IpfcBaseSession.IsGeometryRepSupported()
Parameters:
Type
The format of the export.
Configuration
The configuration type.
Returns:
true if this type is supported, false if not.



FunctionIsGeometryRepSupported (Type as IpfcExportType, Flags as IpfcGeometryFlags) as Boolean

Identifies if a combination of geometry flags are supported for export to a certain format.

Exceptions thrown (but not limited to):

IpfcXToolkitNotImplemented - file_type interface is currently not supported.

IpfcXToolkitInvalidType - invalid file_type.


See Also:
IpfcModel.Export(), IpfcBaseSession.IsConfigurationSupported(), IpfcGeometryFlags.Create()
Parameters:
Type
The format of the export.
Flags
The geometry flags.
Returns:
true if the format supports these flags, false if the flags cannot be used with this format.



FunctionListFiles (Filter as String, Version as IpfcFileListOpt, Path as String [optional]) as Istringseq

Returns a list of the files in the designated directory.

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidDir - Invalid directory.


See Also:
IpfcBaseSession.ListSubdirectories()
Parameters:
Filter
A filename filter, such as "*.prt"
Version
Flag indicating if all versions, or the latest versions should be found. Also allows alphatical sorting of the returned list.
Path
The directory
Returns:
Sequence of files found, including the full path name.



FunctionListModels () as IpfcModels

Retrieves the list of objects in the Creo Parametric session.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - No objects were found in the workspace.


Manual References:
Models: Getting a Model Object
Returns:
The list of models



FunctionListModelsByType (Type as IpfcModelType) as IpfcModels

Returns all of the models of a particular type in the Creo Parametric session.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - No objects were found in the workspace.


Parameters:
Type
The type of model to locate.
Returns:
Sequence of model objects.



FunctionListServers () as IpfcServers [optional]

Sequence of servers , or null if server was not found

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - No servers are currently registered.


Returns:



FunctionListSubdirectories (Path as String [optional]) as Istringseq

Lists the subdirectories in a given directory location.

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidDir - Invalid directory.


Parameters:
Path
The directory.
Returns:
Sequence of subdirectories.



FunctionListWindows () as IpfcWindows

Lists all the Creo Parametric windows.
Returns:
The list of windows



SubLoadConfigFile (ConfigFileName as String)

Reads a configuration file into Creo Parametric.

Exceptions thrown (but not limited to):

IpfcXToolkitLineTooLong - The input filename length is too long for this import file type.

IpfcXToolkitObsoleteFunc - The file format selected is no longer supported on this platform.


Parameters:
ConfigFileName
The output file name, including the extension.



FunctionLoadProToolkitDll (ApplicationName as String, DllPath as String, TextPath as String, UserDisplay as Boolean) as IpfcDll

Causes Creo Parametric to load a Creo Parametric TOOLKIT DLL application.

The application's user_initialize() function will be called as the application starts.

Exceptions thrown (but not limited to):

IpfcXToolkitUserAbort - The DLL's user_initialize function returned an error and the DLL was not initialized. Check the values of GetUserInitializeReturn and GetUserInitializeMessage for more details.

IpfcXToolkitCantAccess - The file specified could not be read.

IpfcXToolkitInvalidFile - The file specified is not a proper DLL.

IpfcXToolkitInUse - The specified DLL is already loaded and may not be loaded again.

IpfcXToolkitNotFound - exec_file did not exist or was not readable

IpfcXToolkitCantWrite - Creo Parametric will not accept any more external applications registered at this time.

IpfcXToolkitBadContext - The DLL was already registered and failed to start or stop cleanly the last time it was loaded/unloaded.

IpfcXToolkitNeedsUnlock - The DLL requires the Creo Parametric TOOLKIT Development License, but it is not available in the Creo Parametric session.

IpfcXToolkitDllInitializeFailed - The DLL was not initialized


Parameters:
ApplicationName
The name of the application. Application names must be unique within the Creo Parametric session.
DllPath
The full path to the DLL binary file.
TextPath
The full path to the directory containing the DLL text, menu and resource files.
UserDisplay
If true, the application will be visible from the Auxiliary Applications dialog box, and the user will be allowed to stop it. If errors occur on startup, those errors will be presented to the user. If false, the application will be invisible to the user.
Returns:
The Creo Parametric TOOLKIT DLL handle.



FunctionLoadProToolkitLegacyDll (ApplicationName as String, DllPath as String, TextPath as String, UserDisplay as Boolean) as IpfcDll

Causes Creo Parametric to load a Creo Parametric TOOLKIT DLL non-Unicode application.

This API is similar to IpfcBaseSession.LoadProToolkitDll(). Its purpose is to communicate to Creo Parametric that the loaded dll should be treated as a non-Unicode (pre-Wildfire 4.0) application. WARNING: this API should be used only by a pre-Wildfire 4.0 application to load a pre-Wildfire 4.0 dll.

Exceptions thrown (but not limited to):

IpfcXToolkitUserAbort - The DLL's user_initialize function returned an error and the DLL was not initialized. Check the values of user_error_ret and user_string_ret for more details.

IpfcXToolkitCantAccess - The file specified could not be read.

IpfcXToolkitInvalidFile - The file specified is not a proper DLL.

IpfcXToolkitInUse - The specified DLL is already loaded and may not be loaded again.

IpfcXToolkitNotFound - exec_file did not exist or was not readable

IpfcXToolkitCantWrite - Creo Parametric will not accept any more external applications registered at this time.

IpfcXToolkitBadContext - The DLL was already registered and failed to start or stop cleanly the last time it was loaded/unloaded.

IpfcXToolkitNeedsUnlock - The DLL requires the Creo Parametric TOOLKIT Development License, but it is not available in the Creo Parametric session.


Parameters:
ApplicationName
The name of the application. Application names must be unique within the Creo Parametric session.
DllPath
The full path to the DLL binary file.
TextPath
The full path to the directory containing the DLL text, menu and resource files.
UserDisplay
If true, the application will be visible from the Auxiliary Applications dialog box, and the user will be allowed to stop it. If errors occur on startup, those errors will be presented to the user. If false, the application will be invisible to the user.
Returns:
The Creo Parametric TOOLKIT DLL handle.



FunctionOpenFile (MdlDescr as IpfcModelDescriptor) as IpfcWindow

Retrieves the specified model and displays it in a window.

This method is equivalent to calling IpfcBaseSession.RetrieveModel() , IpfcBaseSession.CreateModelWindow() , and IpfcModel.Display() .

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - This means either:

  • The model was not found in the current directory, OR
  • The function 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.

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

IpfcXToolkitInvalidType - You specified an invalid object type.

IpfcXToolkitDeadLock - 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:
MdlDescr
The model to retrieve
Returns:
The new window



FunctionPLMSInitialize (request as String) as String

 
Parameters:
request
 
Returns:
 



FunctionQueryFeatureEdit () as IpfcSelections [optional]

Find the list of features being displayed for modification, as is done in 'Edit' on a feature.
Returns:
A list of features being displayed for modification.



SubRegisterCustomModelCheck (Instructions as IpfcCustomCheckInstructions)

Registers an custom check that can be included in any ModelCheck execution.

Exceptions thrown (but not limited to):

IpfcXToolkitFound - Check with this name already exists.

IpfcXToolkitBadContext - ModelCheck is not enabled in session.


Parameters:
Instructions
The custom check instructions.



SubRegisterRelationFunction (Name as String, Listener as IpfcRelationFunctionListener, Options as IpfcRelationFunctionOptions [optional])

Register an external function which can be included in relations.

Exceptions thrown (but not limited to):

IpfcXToolkitFound - Function with the given name was already found.


Parameters:
Name
The name of the external function.
Listener
The listener for the external relation function methods.
Options
The relation function options indicating enabled/disabled attributes.



FunctionRegisterServer (Alias as String, Location as String, WorkspaceName as String) as IpfcServer

Registers a server in the session given its root location and an alias.

To automate registration of servers in interactive mode, use the standard config.fld setup to preregister the servers. To ensure that the servers are not preregistered when running Creo Parametric in batch non-graphics mode, set the environment variable PTC_WF_ROOT to an empty directory before starting Creo Parametric.

Exceptions thrown (but not limited to):

IpfcXToolkitFound - A server with this alias or location/workspace is already registered.

IpfcXToolkitNotFound - The server couldn't be found at the given location.

IpfcXToolkitInvalidName - Authentication failed.

IpfcXToolkitInvalidDir - The workspace couldn't be found or created.

IpfcXToolkitNoLicense - There is no license to work with the server.

IpfcXToolkitInvalidType - The server version is not supported.


Parameters:
Alias
The name used by Creo Parametric to refer to this server.
Location
The root location for the server.
WorkspaceName
The name of the workspace to use.
Returns:
The registered server handle.



FunctionRetrieveAssemSimpRep (AssemName as String, Instructions as IpfcSimpRepInstructions [optional]) as IpfcAssembly

Retrieves the specified simplified representation.

This method does not support Multi-CAD models. Object Toolkit users can use RetrieveAssemblySimpRep under wfcSession module as a superseding method.

Exceptions thrown (but not limited to):

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

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


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



FunctionRetrieveGeometryPartRep (PartName as String) as IpfcPart

Retrieves the specified part's geometric simplified representation.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The Part was not found.

IpfcXToolkitInvalidName - The specified user defined rep was not found.

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


Parameters:
PartName
The name of the part to retrieve.
Returns:
The handle to the part.



FunctionRetrieveGeomSimpRep (AssemName as String) as IpfcAssembly

Retrieves the geometry simplified representation of an assembly.

This method supports Multi-CAD approach only for Object Toolkit (OTK) users. Outside of OTK (for instance in J-Link), this method will throw the XToolkitUnsupported exception if called on models originated through Multi-CAD.

For OTK users this method is a shortcut for wfcSession::WSession::RetrieveSimpRep.

Exceptions thrown (but not limited to):

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



FunctionRetrieveGraphicsPartRep (PartName as String) as IpfcPart

Retrieves the specified part's graphic simplified representation.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The Part was not found.

IpfcXToolkitInvalidName - The specified user defined rep was not found.

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


Parameters:
PartName
The name of the part to retrieve.
Returns:
The handle to the part.



FunctionRetrieveGraphicsSimpRep (AssemName as String) as IpfcAssembly

Retrieves the graphics simplified representation of an assembly.

This method supports Multi-CAD approach only for Object Toolkit (OTK) users. Outside of OTK (for instance in J-Link), this method will throw the XToolkitUnsupported exception if called on models originated through Multi-CAD.

For OTK users this method is a shortcut for wfcSession::WSession::RetrieveSimpRep.

Exceptions thrown (but not limited to):

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



FunctionRetrieveModel (MdlDescr as IpfcModelDescriptor) as IpfcModel

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.

Exceptions thrown (but not limited to):

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

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


See Also:
IpfcBaseSession.GetModel(), IpfcBaseSession.GetModelFromDescr()
Parameters:
MdlDescr
The information about the model to retrieve
Returns:
The retrieved model



FunctionRetrieveModelWithOpts (MdlDescr as IpfcModelDescriptor, Opts as IpfcRetrieveModelOptions) as IpfcModel

Retrieves the specified model into the Creo Parametric session based on the path specified in the model descriptor.

The method does not create a window for the model or display it anywhere.

Exceptions thrown (but not limited to):

IpfcXToolkitCantOpen - The model exists but is not readable.

IpfcXToolkitNotFound - The model does not exist, or was not found

IpfcXToolkitInvalidFile - The model is not a Creo Parametric model.

IpfcXToolkitInvalidName - The model name is too long.

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


Parameters:
MdlDescr
The information about the model to retrieve
Opts
Options for retrieval
Returns:
The retrieved model



FunctionRetrievePartSimpRep (PartName as String, RepName as String) as IpfcPart

Retrieves the specified part's user-defined simplified representation.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The Part was not found.

IpfcXToolkitInvalidName - The specified user defined rep was not found.

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


Parameters:
PartName
The name of the part to retrieve.
RepName
The name of the user-defined simplified representation.
Returns:
The handle to the part.



FunctionRetrieveSymbolicPartRep (PartName as String) as IpfcPart

Retrieves the specified part's symbolic simplified representation.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The Part was not found.

IpfcXToolkitInvalidName - The specified user defined rep was not found.

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


Parameters:
PartName
The name of the part to retrieve.
Returns:
The handle to the part.



FunctionRetrieveSymbolicSimpRep (AssemName as String) as IpfcAssembly

Retrieves the symbolic simplified representation of an assembly.

This method supports Multi-CAD approach only for Object Toolkit (OTK) users. Outside of OTK (for instance in J-Link), this method will throw the XToolkitUnsupported exception if called on models originated through Multi-CAD.

For OTK users this method is a shortcut for wfcSession::WSession::RetrieveSimpRep.

Exceptions thrown (but not limited to):

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



SubRunMacro (Macro as String)

Runs the specified macro.

Macros may only run when control is returned to Creo Parametric. If control is maintained by a J-Link program, the macro will be stored for later running.
Parameters:
Macro
The macro to run



FunctionSelect (Options as IpfcSelectionOptions, InitialSels as IpfcSelections [optional]) as IpfcSelections [optional]

Allows interactive selection of objects in Creo Parametric.

Exceptions thrown (but not limited to):

IpfcXToolkitUserAbort - The user chose Quit.

IpfcXToolkitPickAbove - Selection was interrupted by a user's pick on any button from above menus.

IpfcXToolkitDeadLock - 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:
Options
The selection options, including the option keywords and maximum number ofselections allowed
InitialSels
A list of initial selections, which will be included in the return.
Returns:
A list of selected objects



SubSetConfigOption (Name as String, Value as String)

Sets the value of the specified configuration file option.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The specified option was not found.


See Also:
IpfcBaseSession.GetConfigOptionValues(), IpfcBaseSession.GetConfigOption()
Parameters:
Name
The name of the configuration file option. This string can include uppercase and lowercase letters.
Value
The value of the option, as it must appear in the configuration file. If the option is a multivalued option,such as a path, this will add a new value to the array of values that already exist.



SubSetCurrentWS (NewWSName as String)

Registers a Workspace in Creo Parametric. Only one is allowed at a time, so if one is already registered, the new one will substitute the current one, but only if there are no objects in session.

NOTE: This method is deprecated. Pro/INTRALINK 3.4 is not supported. Use Pro/INTRALINK 10.0 method IpfcServer.ActiveWorkspace instead.

Exceptions thrown (but not limited to):

IpfcXToolkitBusy - When another workspace is already registered, cannot de-register because there are objects in Creo Parametric session.


Parameters:
NewWSName
The name of the Workspace.



FunctionSetLineStyle (NewStyle as IpfcStdLineStyle) as IpfcStdLineStyle

Sets the line style.

Exceptions thrown (but not limited to):

IpfcXToolkitNoChange - The new line style is the same as the old line style.


Parameters:
NewStyle
The new line style
Returns:
The previous line style



SubSetStdColorFromRGB (StdClr as IpfcStdColor, Color as IpfcColorRGB)

Enables you to set the values of the three color components for a standard color in Creo Parametric.
Parameters:
StdClr
The RGB values
Color
The color type



FunctionSetTextColor (NewColor as IpfcStdColor) as IpfcStdColor

Enables you to change the text color so any subsequent graphics window text is drawn in the specified color.

Exceptions thrown (but not limited to):

IpfcXToolkitNoChange - The current color is the same as the new color.


Parameters:
NewColor
The new color to be used for text
Returns:
The previous text color



SubSetWSExportOptions (Options as IpfcWSExportOptions)

Sets the option controlling whether or not to export secondary contents during a call to IpfcBaseSession.ExportFromCurrentWS()
Parameters:
Options
Export options object of type IpfcWSExportOptions.



FunctionStartJLinkApplication (ApplicationName as String, ClassName as String, StartMethod as String, StopMethod as String, AdditionalClassPath as String [optional], TextPath as String [optional], UserDisplay as Boolean) as IpfcJLinkApplication

Register and start a synchronous J-Link application.

Exceptions thrown (but not limited to):

IpfcXToolkitUserAbort - The application failed to start properly. See the startup exception for more details.

IpfcXToolkitAmbiguous - The application class is already registered as another application, with different start and/or stop methods.

IpfcXToolkitInUse - The application with this configuration is already loaded, and may not be loaded again.

IpfcXToolkitCantWrite - Creo Parametric will not accept any more auxiliary applications at this time.


See Also:
IpfcJLinkApplication.ExecuteTask(), IpfcJLinkApplication.Stop()
Parameters:
ApplicationName
The application name.
ClassName
The application Java class.
StartMethod
Static method used to intialize the application.
StopMethod
Static method used to terminate the application.
AdditionalClassPath
Additional elements to be added to the front of the system CLASSPATH. Can be null. If more than one path is being added, they must be separated using the appropriate path separator (';' on Windows and ':' on UNIX).
TextPath
The application text path for menus and messaging. If null, the function uses the current directory.
UserDisplay
true to show application startup failure messages to the user, and to show the application in the Auxiliary Applications dialog.
Returns:
The J-Link application handle.



SubUIRegisterFileOpen (Options as IpfcFileOpenRegisterOptions, Listener as IpfcFileOpenRegisterListener)

Register a file type in File Open Dialog.

Exceptions thrown (but not limited to):

IpfcXToolkitOutOfMemory - Couldn't allocate memory for new type.

IpfcXToolkitInUse - Already registered by this app.


Parameters:
Options
The options for file type and description for open operation.
Listener
The listener for the file open operation.



SubUIRegisterFileSave (Options as IpfcFileSaveRegisterOptions, Listener as IpfcFileSaveRegisterListener)

Register a file type in File 'Save a Copy' Dialog.

Exceptions thrown (but not limited to):

IpfcXToolkitOutOfMemory - Couldn't allocate memory for new type.

IpfcXToolkitInUse - Already registered by this app.

IpfcXToolkitBadContext - The function is not available in Design Test Mode.


Parameters:
Options
The options for file type and description for save operation.
Listener
The listener for the file save operation.



SubWLBInitialize (val as Boolean)

 
Parameters:
val