Library | Package Java Toolkit

Interface WSession

package com.ptc.wfc.wfcSession;

public interface WSession
  extends com.ptc.wfc.wfcSession.WBaseSession,
          com.ptc.pfc.pfcSession.Session



Description

Top interface in Object Toolkit.



Method Summary
voidAddBeforeModelRetrieveListener (BeforeModelRetrieveActionListener listen)
DEPRECATED: since Creo 4
SUCCESSOR(S): ActionSource.AddActionListener

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

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

     
voidAddNavigatorPaneLayout (String PaneName, String ResFileName, /*optional*/ String IconFileName)
     Add new pane tab with specified name on the Navigator pane.
voidAutoPropagate ()
LICENSE: 222
    Automatically propagates annotation elements within the current model to the currently selected feature based on the standard Creo Parametric algorithm.
WWindowCreateAccessorywindowWithTree (String ObjectName, MdlfileType ObjectType, /*optional*/ Boolean EnableTree)
     Retrieves a window and attaches the object to it.
WWindowCreateBarewindow (String ObjectName, MdlfileType ObjectType)
     Retrieves a window and attaches the object to it.
ElementTreeCreateElementTree (Elements Elems)
     Creates an element tree from the elements and returns a handle to ElementTree
ElementTreeCreateElementTreeFromXML (String Filename)
     Creates an element tree from xml file provided.
ExternalObjectClassCreateExternalClass (String Name, int Type)
    Registers a new external object class.
SectionCreateSection2D ()
    Allocates a two-dimensional section.
voidCreateSnapshot (String Name)
     Creates a top assembly level snapshot from the current position on screen. Constraints will be copied from the active snapshot. The newly created snapshot will become the active one.
voidDeleteBrowserMessageListener (String key)
     
voidDeleteSnapshot (String Name, /*optional*/ ComponentPath Path)
     Deletes snapshot.
voidDisplayInformationWindow (String FilePath, /*optional*/ Double XOffset, /*optional*/ Double YOffset, /*optional*/ Integer Rows, /*optional*/ Integer Columns)
     Creates a window and shows the text of the file specified by FilePath.
voidExecuteMacro ()
     
/*optional*/ SectionGetActiveSection ()
    Returns a copy of the current active sketcher section.
StringGetApplicationPath ()
     
StringGetApplicationTextPath ()
     
CreoTypeGetCreoType ()
    Returns the type of Creo which runs this application.
IntfDataSourceTypeGetDataSourceType (IntfType IntfType)
    Provide the IntfDataSourceType for given IntfType.
doubleGetDefaultTolerance (ToleranceType Type, int Decimals)
    Retrieves the current Creo Parametric default tolerance value for the specified number of decimal places.
StringGetDisplayDateCode ()
    Returns the Creo session's customer visible datecode.
/*optional*/ ElementWstringOptionGetElemWstrOption ()
    Get method for attribute "ElemWstrOption"
    Options used to retrieve string values of elements
StringGetGTolSymbolString (GTolSymbol Symbol, SymbolFont Font)
     Get value string of gtol
ImportfeatRedefSourceTypeGetImportFeatRedefSourceType (ImportFeatRedefOperationType Type)
     Provides the wfcFeature::ImportfeatRedefSourceType used to redefine an import feature.
booleanGetIncompleteSurfaceTessellationAllowed ()
     
SnapshotTransformationsGetKinSnapshotTransformations (String Name, /*optional*/ ComponentPath Path)
     This method brings transformation paths and transformation matrices for all components in the snapshot versus top level assembly.
/*optional*/ StringGetKnownDirectory (KnownDirectoryType dir_type)
     
LineStyleDataGetLineStyleData (StdLineStyle LineStyle)
     Provides a description of the specified line style.
MdlfileDescriptorGetMdlfileDescriptor (ModelDescriptor ModelDescr)
     
ModelGetModelFromMdlfileDescriptor (MdlfileDescriptor MdlfileDescr)
     Returns the model based on the model descriptor input.
StringGetNavigatorPaneComponent (String PaneName, String ComponentLocalName)
     Get the changed name of a component in the pane.
StringGetNavigatorPaneDevice (Window WindowObject)
     Get the name of the navigator pane device specific to window object.
StringGetNavigatorPaneLayoutComponent (String PaneName)
     Get the changed name of the top layout in navigator pane.
intGetReleaseNumericVersion ()
     Returns the integer major version number of the Creo executable that the application is connected to.
StringGetResourcePath ()
     Provides the resource path of an application.
SolidGetSolid (String Name, ModelType Type)
     Initializes the ProSolid handle.
/*optional*/ StringGetTextureFilePath (String TextureFileName, boolean CreateTempFile)
     Looks up the full path to the texture, decal, or bump map file indicated.
UDFVariableParametersGetUDFDataDefaultVariableParameters (String Name, /*optional*/ String Instance)
     
ModelImportAsModel (String FileToImport, NewModelImportType NewModelType, ModelType Type, String NewModelName, ImportRepType ModelRepType, /*optional*/ String profile, /*optional*/ LayerImportFilter Filter)
    Creates a new imported model in the solid.
booleanIsOptionOrdered (String OptionName)
     Determines whether the specified option is available.
booleanIsTextureFileEmbedded (String TextureFileName)
     Checks if the texture file was embedded.
ModelLoadModelRepresentation (String AssemblyFileName, ModelType Type, /*optional*/ String SimpRepName, /*optional*/ SimpRepInstructions Instructions)
     Retrieves the specified simplified representation.
voidMoveKinDrag (Selection DragPoint, Point2Ds Moves)
     This method bring to drag this selected object. Displays a hook point around the point. Performs a drag according to the environment set in WSession.SetKinDragEnvironment(KinDragType, /*optional*/ String, /*optional*/ ComponentPath, /*optional*/ Selection) For dragging use constraints from current snapshot, if it set. After end of the movement the hook point is removed.
voidMoveKinDragForModel (Selection DragPoint, Point3Ds Moves, /*optional*/ Matrix3D Matrix)
     This function brings to drag this selected object. Performs a drag according to the environment set in WSession.SetKinDragEnvironment(KinDragType, /*optional*/ String, /*optional*/ ComponentPath, /*optional*/ Selection) For dragging use constraints from the current snapshot, if it is set.
DrawingOpenDrawingAsReadOnly (String Path)
     
WindowOpenSource (MdlfileDescriptor MdlfileDesc)
    Retrieves the specified model and displays it in a window.
ParsedFileNameDataParseFileName (String FileName)
    Parses the specified file name into its components.
voidRegisterExternalSelectionHighlight (ExternalSelectionHighlight RegistrationMethods)
     Registers external application highlighting callbacks in order to let application media (like a tree) react on selections made while calling or while in BaseSession.Select(SelectionOptions, /*optional*/ Selections)
voidReleaseExternalSelectionHighlight (ExternalSelectionHighlight RegistrationMethods)
    Releases the client interface used for external selection.
StatusReleaseVisitor (VisitingClient visitingClient)
     
AssemblyRetrieveAssemblySimpRep (String AssemName, MdlfileType FileType, /*optional*/ SimpRepInstructions Instructions)
    Retrieves the specified simplified representation. Takes the origin file type into account.
AssemblyRetrieveAutomaticSimpRep (String AssemName, MdlfileType FileType, String UDSrepName)
    Retrieve user defined simplified representation as automatic rep.
AssemblyRetrieveDefaultEnvelopeSimprep (String AssemName)
     Retrieves the Default Envelope simplified representation of an assembly
AssemblyRetrieveLightweightGraphicsSimpRep (String AssemName)
    Retrieves the light-weight graphics simplified representation of an assembly.
ModelRetrieveModelByFiletype (MdlfileDescriptor MdlfileDescr, RetrieveModelOptions Opts)
    Retrieves the specified model into the Creo Parametric session from standard directory.
SolidRetrieveSimpRep (String ModelName, MdlfileType FileType, SimpRepType SimpRepType, /*optional*/ String ReprName)
    Retrieves the specified simplified representation Takes the origin file type into account.
voidRunAsCreoType (CreoType type)
    Sets the type of Creo.
voidSetElemWstrOption ( /*optional*/ ElementWstringOption value)
    Set method for attribute "ElemWstrOption"
    Options used to retrieve string values of elements
voidSetIncompleteSurfaceTessellationAllowed (boolean IsAllowed)
     
voidSetKinDragEnvironment (KinDragType Type, /*optional*/ String Name, /*optional*/ ComponentPath Path, /*optional*/ Selection Reference)
     This method setups the environment for subsequenmt dragging and reconnect operations. Environment can be set / reset several times after WSession.StartKinDrag() is called.
voidStartKinDrag ()
     This method starts a drag session it should be called before any other Kinematic drag or Snapshot function is called. All subsequent methods will work with the Snapshots of the window assembly. All component path should start from this assembly. All transforms belong to this assembly. The method can be called for design assemblies in Standard Assembly and Mechanism modes. It cannot be used if assembly is exploded, if sketcher is active, when component placement is active or when drag dialog is on screen.
voidStopKinDrag ()
     This method will stop drag session. Method Window.Refresh() should be performed to see the change of the graphic window scale according to updated outline.
booleanUIEditFile (String FileName)
    Opens an edit window for the specified file using the default text editor.
StringUIOpenFileType (FiletypeOpenOptions Options)
    Prompts the standard file open browser interface of Creo Parametric.
StringUISaveFileType (FiletypeSaveOptions Options)
    Prompts the standard file save browser interface of Creo Parametric.
voidUpdateSnapshot (String Name)
     Update snapshot.

Methods Inherited from Interface com.ptc.pfc.pfcObject.Parent
GetChild

Methods Inherited from Interface com.ptc.pfc.pfcDisplay.Display
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 Interface com.ptc.wfc.wfcDisplay.WDisplay
GetColorByObjectType, SetColorRGBAlternateScheme, GetColorRGBAlternateScheme, SetColorRGBVersion, GetColorRGBVersion, ModifyGraphicsColor, ModifyTextColor, DrawPolylines

Methods Inherited from Interface com.ptc.pfc.pfcBase.ActionSource
AddActionListener, RemoveActionListener, AddActionListenerWithType

Methods Inherited from Interface com.ptc.pfc.pfcSession.BaseSession
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, EndSession, StartJLinkApplication, RegisterTask, UnregisterTask, 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 Interface com.ptc.pfc.pfcSession.Session
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

GetCreoType

CreoTypeGetCreoType ()


    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 Java: Creo Object TOOLKIT Java Support for Creo
Returns:
Creo type.


RunAsCreoType

voidRunAsCreoType (CreoType 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):

XMethodForbidden - Type is other than <reference 6 to unknown entity wfcCreoType::wfcCREO_PARAMETRIC> .


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


GetGTolSymbolString

StringGetGTolSymbolString (GTolSymbol Symbol, SymbolFont Font)


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


CreateElementTreeFromXML

ElementTreeCreateElementTreeFromXML (String 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):

XToolkitOutOfMemory - XML Parser failed to initialize

XToolkitCantAccess - XML Parser failed during parsing

XToolkitCantOpen - XML Parser failed opening DOM Tree

XToolkitNotValid - XML Parser failed due to other errors

XToolkitAmbiguous - Error occurred during creation of output transcoder

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


CreateElementTree

ElementTreeCreateElementTree (Elements Elems)


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


GetElemWstrOption/SetElemWstrOption

/*optional*/ ElementWstringOptionGetElemWstrOption ()
voidSetElemWstrOption ( /*optional*/ ElementWstringOption value)


    Options used to retrieve string values of elements

These options will be considered on call to method Element.GetValueAsString(/*optional*/ String)
Manual References:
Feature Element Tree: Feature Elements, Feature Element Tree: Feature Elements, Feature Element Tree: Feature Elements, Feature Element Tree: Feature Elements



ImportAsModel

ModelImportAsModel (String FileToImport, NewModelImportType NewModelType, ModelType Type, String NewModelName, ImportRepType ModelRepType, /*optional*/ String profile, /*optional*/ LayerImportFilter Filter)


    Creates a new imported model in the solid.

Exceptions thrown (but not limited to):

XToolkitCantOpen - import_file can't be opened.

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

XToolkitNotExist - No profile found.

XToolkitInvalidFile - profile is not readable.

XToolkitInvalidType - This combination of arguments is invalid.

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


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


GetActiveSection

/*optional*/ SectionGetActiveSection ()


    Returns a copy of the current active sketcher section.

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

Exceptions thrown (but not limited to):

XToolkitBadContext - Section not in sketcher mode.


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


CreateSection2D

SectionCreateSection2D ()


    Allocates a two-dimensional section.

Exceptions thrown (but not limited to):

XToolkitOutOfMemory - 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


GetDisplayDateCode

StringGetDisplayDateCode ()


    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 Java: Retrieving Creo Version
Returns:


GetReleaseNumericVersion

intGetReleaseNumericVersion ()


     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 Java: Support for Multi-CAD Models Using Creo Unite
Returns:


AddCollectionToSelectionBuffer

voidAddCollectionToSelectionBuffer (Collection Coll)


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


RegisterExternalSelectionHighlight

voidRegisterExternalSelectionHighlight (ExternalSelectionHighlight RegistrationMethods)


     Registers external application highlighting callbacks in order to let application media (like a tree) react on selections made while calling or while in BaseSession.Select(SelectionOptions, /*optional*/ Selections)

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


ReleaseExternalSelectionHighlight

voidReleaseExternalSelectionHighlight (ExternalSelectionHighlight RegistrationMethods)


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


RetrieveLightweightGraphicsSimpRep

AssemblyRetrieveLightweightGraphicsSimpRep (String AssemName)


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

This method is a shortcut for WSession.RetrieveSimpRep(String, MdlfileType, SimpRepType, /*optional*/ String)

Exceptions thrown (but not limited to):

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


RetrieveDefaultEnvelopeSimprep

AssemblyRetrieveDefaultEnvelopeSimprep (String AssemName)


     Retrieves the Default Envelope simplified representation of an assembly

This method is a shortcut for WSession.RetrieveSimpRep(String, MdlfileType, SimpRepType, /*optional*/ String) Operates on assemblies only, not parts

Exceptions thrown (but not limited to):

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


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


RetrieveAssemblySimpRep

AssemblyRetrieveAssemblySimpRep (String AssemName, MdlfileType FileType, /*optional*/ SimpRepInstructions Instructions)


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

This method supports Multi-CAD models.

Exceptions thrown (but not limited to):

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

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


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


RetrieveSimpRep

SolidRetrieveSimpRep (String ModelName, MdlfileType FileType, SimpRepType SimpRepType, /*optional*/ String 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 Solid.HasRetrievalErrors() to identify the errors.

Exceptions thrown (but not limited to):

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


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


GetDefaultTolerance

doubleGetDefaultTolerance (ToleranceType Type, int Decimals)


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


LoadModelRepresentation

ModelLoadModelRepresentation (String AssemblyFileName, ModelType Type, /*optional*/ String SimpRepName, /*optional*/ SimpRepInstructions Instructions)


     Retrieves the specified simplified representation.

Exceptions thrown (but not limited to):

XToolkitNotFound - The file was not found.

XToolkitCantOpen - The file exists but is not readable.

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

XToolkitInvalidFile - The model is not a Creo Parametric model.

XToolkitLineTooLong - The model name is too long.

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

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


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


GetSolid

SolidGetSolid (String Name, ModelType Type)


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


GetImportFeatRedefSourceType

ImportfeatRedefSourceTypeGetImportFeatRedefSourceType (ImportFeatRedefOperationType Type)


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


GetLineStyleData

LineStyleDataGetLineStyleData (StdLineStyle LineStyle)


     Provides a description of the specified line style.

Exceptions thrown (but not limited to):

XToolkitInvalidPtr - The style_info == NULL.


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


GetDataSourceType

IntfDataSourceTypeGetDataSourceType (IntfType IntfType)


    Provide the IntfDataSourceType for given IntfType.
Manual References:
Interface: Redefining the Import Feature
Parameters:
IntfType
The interface type.
Returns:
The wfcSession::IntfDataSourceType.


CreateAccessorywindowWithTree

WWindowCreateAccessorywindowWithTree (String ObjectName, MdlfileType ObjectType, /*optional*/ Boolean 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 BaseSession.CreateModelWindow(Model) This window doesn't have the toolbar. It doesn't allow any options and has restricted options under Windows menu.

Exceptions thrown (but not limited to):

XToolkitInvalidType - You specified an invalid object type.

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


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


CreateBarewindow

WWindowCreateBarewindow (String ObjectName, MdlfileType ObjectType)


     Retrieves a window and attaches the object to it.

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

Exceptions thrown (but not limited to):

XToolkitInvalidType - You specified an invalid object type.

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


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


IsTextureFileEmbedded

booleanIsTextureFileEmbedded (String TextureFileName)


     Checks if the texture file was embedded.

Exceptions thrown (but not limited to):

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

XToolkitCantWrite - The temporary texture file could not be written.


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


GetTextureFilePath

/*optional*/ StringGetTextureFilePath (String TextureFileName, boolean CreateTempFile)


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

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

Exceptions thrown (but not limited to):

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

XToolkitCantWrite - The temporary texture file could not be written.


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


DisplayInformationWindow

voidDisplayInformationWindow (String FilePath, /*optional*/ Double XOffset, /*optional*/ Double YOffset, /*optional*/ Integer Rows, /*optional*/ Integer Columns)


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


OpenDrawingAsReadOnly

DrawingOpenDrawingAsReadOnly (String Path)


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


UIEditFile

booleanUIEditFile (String FileName)


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

Exceptions thrown (but not limited to):

XToolkitNoChange - The user quit from the editor.


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


ParseFileName

ParsedFileNameDataParseFileName (String FileName)


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


UIOpenFileType

StringUIOpenFileType (FiletypeOpenOptions Options)


    Prompts the standard file open browser interface of Creo Parametric.

Exceptions thrown (but not limited to):

XToolkitUserAbort - The user aborted from the user interface.


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


UISaveFileType

StringUISaveFileType (FiletypeSaveOptions Options)


    Prompts the standard file save browser interface of Creo Parametric.

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

Exceptions thrown (but not limited to):

XToolkitUserAbort - The user aborted from the user interface.


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


IsOptionOrdered

booleanIsOptionOrdered (String OptionName)


     Determines whether the specified option is available.

Exceptions thrown (but not limited to):

XToolkitNotFound - The specified option was not found.


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


GetResourcePath

StringGetResourcePath ()


     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.


GetMdlfileDescriptor

MdlfileDescriptorGetMdlfileDescriptor (ModelDescriptor ModelDescr)


     
Parameters:
ModelDescr
 
Returns:
 


OpenSource

WindowOpenSource (MdlfileDescriptor MdlfileDesc)


    Retrieves the specified model and displays it in a window.

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

Exceptions thrown (but not limited to):

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

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

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

XToolkitInvalidType - You specified an invalid object type.

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


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


RetrieveModelByFiletype

ModelRetrieveModelByFiletype (MdlfileDescriptor MdlfileDescr, RetrieveModelOptions Opts)


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

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

Exceptions thrown (but not limited to):

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

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

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


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


CreateExternalClass

ExternalObjectClassCreateExternalClass (String Name, int Type)


    Registers a new external object class.

Exceptions thrown (but not limited to):

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


AddNavigatorPaneLayout

voidAddNavigatorPaneLayout (String PaneName, String ResFileName, /*optional*/ String IconFileName)


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


GetNavigatorPaneDevice

StringGetNavigatorPaneDevice (Window WindowObject)


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


GetNavigatorPaneComponent

StringGetNavigatorPaneComponent (String PaneName, String ComponentLocalName)


     Get the changed name of a component in the pane.

Exceptions thrown (but not limited to):

XToolkitMsgTooLong - Pane name is too long.


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


GetNavigatorPaneLayoutComponent

StringGetNavigatorPaneLayoutComponent (String PaneName)


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

Exceptions thrown (but not limited to):

XToolkitMsgTooLong - Pane name is too long.


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


GetModelFromMdlfileDescriptor

ModelGetModelFromMdlfileDescriptor (MdlfileDescriptor MdlfileDescr)


     Returns the model based on the model descriptor input.

Exceptions thrown (but not limited to):

XToolkitNotFound - Unable to find the required model.


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


AddModelRetrievePreListener

voidAddModelRetrievePreListener (BeforeModelRetrieveListener listen)

DEPRECATED: since Creo 4
SUCCESSOR(S): ActionSource.AddActionListener


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

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


AddBeforeModelRetrieveListener

voidAddBeforeModelRetrieveListener (BeforeModelRetrieveActionListener listen)

DEPRECATED: since Creo 4
SUCCESSOR(S): ActionSource.AddActionListener


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

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


AddModelSavePreAllListener

voidAddModelSavePreAllListener (BeforeModelSaveAllListener listen)

DEPRECATED: since Creo 4
SUCCESSOR(S): ActionSource.AddActionListener


     
Parameters:
listen
 
Returns:


GetUDFDataDefaultVariableParameters

UDFVariableParametersGetUDFDataDefaultVariableParameters (String Name, /*optional*/ String Instance)


     

Exceptions thrown (but not limited to):

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

XToolkitNoLicense - No license is available for this function.

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

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

XToolkitNotFound - This UDF does not have any variable items.


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


ReleaseVisitor

StatusReleaseVisitor (VisitingClient visitingClient)


     
Parameters:
visitingClient
 
Returns:
 


AutoPropagate

voidAutoPropagate ()

LICENSE: 222

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

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

Exceptions thrown (but not limited to):

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

XToolkitNoLicense - No license is available for this function.


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


GetApplicationPath

StringGetApplicationPath ()


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


GetApplicationTextPath

StringGetApplicationTextPath ()


     
Manual References:
Session Objects: Registry File Data
Returns:


ExecuteMacro

voidExecuteMacro ()


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


GetKnownDirectory

/*optional*/ StringGetKnownDirectory (KnownDirectoryType dir_type)


     
Parameters:
dir_type
Returns:


AddBrowserMessageListener

voidAddBrowserMessageListener (String key, BrowserMessageListener Listener)


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


DeleteBrowserMessageListener

voidDeleteBrowserMessageListener (String key)


     
Parameters:
key
Returns:


GetIncompleteSurfaceTessellationAllowed

booleanGetIncompleteSurfaceTessellationAllowed ()


     
Returns:


SetIncompleteSurfaceTessellationAllowed

voidSetIncompleteSurfaceTessellationAllowed (boolean IsAllowed)


     
Parameters:
IsAllowed
Returns:


RetrieveAutomaticSimpRep

AssemblyRetrieveAutomaticSimpRep (String AssemName, MdlfileType FileType, String UDSrepName)


    Retrieve user defined simplified representation as automatic rep.

Exceptions thrown (but not limited to):

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

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


Parameters:
AssemName
The name of the assembly to retrieve.
FileType
The file type of the assembly to retrieve.
UDSrepName
The name of the user defined simprep to retrieve as automatic.
Returns:
The retrieved representation.


StartKinDrag

voidStartKinDrag ()


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


StopKinDrag

voidStopKinDrag ()


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


MoveKinDrag

voidMoveKinDrag (Selection DragPoint, Point2Ds Moves)


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


GetKinSnapshotTransformations

SnapshotTransformationsGetKinSnapshotTransformations (String Name, /*optional*/ ComponentPath Path)


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


SetKinDragEnvironment

voidSetKinDragEnvironment (KinDragType Type, /*optional*/ String Name, /*optional*/ ComponentPath Path, /*optional*/ Selection Reference)


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


CreateSnapshot

voidCreateSnapshot (String Name)


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


DeleteSnapshot

voidDeleteSnapshot (String Name, /*optional*/ ComponentPath Path)


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


UpdateSnapshot

voidUpdateSnapshot (String Name)


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


MoveKinDragForModel

voidMoveKinDragForModel (Selection DragPoint, Point3Ds Moves, /*optional*/ Matrix3D Matrix)


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