API Documentation > Classes > Class pfcAsyncConnection
Class pfcAsyncConnection

package com.ptc.pfc.pfcAsyncConnection;

public class
pfcAsyncConnection


Description
Contains global CIP definitions for module "pfcAsyncConnection"
User Guide References:
Method Summary
AsyncConnection_Connect ( /*optional*/ String Display, /*optional*/ String UserID, /*optional*/ String TextPath, /*optional*/ Integer TimeoutSec)
Causes the application to connect to an existing Creo Parametric process running on a host using a specified display. It is intended for use in simple and full asynchronous modes.
AsyncConnection_ConnectById (ConnectionId Id, /*optional*/ String TextPath, /*optional*/ Integer TimeoutSec)
Connects to a specific Creo Parametric session by passing the identification string.
AsyncConnection_ConnectWS ( /*optional*/ String Display, /*optional*/ String UserID, /*optional*/ String WSName, /*optional*/ String TextPath, /*optional*/ Integer TimeoutSec)
Causes the application to connect to an existing Creo Parametric process and to an existing Pro/INTRALINK worksapce running on a host using a specified display. For use in simple and full asynchronous modes.
static /*optional*/ AsyncConnection
Connection established between your application and Creo Parametric. If your application is connected with Creo Parametric, call this function to get the connection object.
AsyncConnection_Spawn (String CmdLine, /*optional*/ String TextPath)
AsyncConnection_Start (String CmdLine, /*optional*/ String TextPath)
Causes the application to spawn and connect to a new Creo Parametric session. For use in simple and full asynchronous modes.
ConnectionId_Create (String ExternalRep)
Method Detail
ConnectionId_Create
ConnectionId_Create
(String ExternalRep)
User Guide References:
Parameters:
ExternalRep
The Creo Parametric session identification string.
Returns:
The connection id handle.
AsyncConnection_Start
AsyncConnection_Start
(String CmdLine, /*optional*/ String TextPath)
Causes the application to spawn and connect to a new Creo Parametric session. For use in simple and full asynchronous modes.
Parameters:
CmdLine
The full path to the startup command, batch file or script file used to start Creo Parametric.
TextPath
The path under which the message and menu files are held. If no external messaging or menus are needed pass null.
Returns:
Object representing the asynchronous connection.
AsyncConnection_Spawn
AsyncConnection_Spawn
(String CmdLine, /*optional*/ String TextPath)
Parameters:
CmdLine
TextPath
Returns:
AsyncConnection_Connect
AsyncConnection_Connect
( /*optional*/ String Display, /*optional*/ String UserID, /*optional*/ String TextPath, /*optional*/ Integer TimeoutSec)
Causes the application to connect to an existing Creo Parametric process running on a host using a specified display. It is intended for use in simple and full asynchronous modes.
If the method locates more than one Creo Parametric session with the appropriate characteristics, it will throw an XToolkitAmbiguous exception.
If you want to connect or reconnect to a specific Creo Parametric session, use the method pfcAsyncConnection.AsyncConnection_ConnectById(ConnectionId, /*optional*/ String, /*optional*/ Integer)
The application may only connect to one Creo Parametric session at any time.
Parameters:
Display
The name of the display Creo Parametric is using. If this is null, match any display. If this is an empty string, assume the local host.
UserID
The name of the user running the Creo Parametric to connect to. If this is null, match any user. If this is an empty string, assume the current user.
TextPath
The path under which the message and menu files are held. If no external messaging or menus are needed pass null.
TimeoutSec
The time, in seconds, to wait for Creo Parametric to respond to the connection request. Pass null to use the default connection timeout.
Returns:
Object representing the asynchronous connection.
AsyncConnection_ConnectWS
AsyncConnection_ConnectWS
( /*optional*/ String Display, /*optional*/ String UserID, /*optional*/ String WSName, /*optional*/ String TextPath, /*optional*/ Integer TimeoutSec)
Causes the application to connect to an existing Creo Parametric process and to an existing Pro/INTRALINK worksapce running on a host using a specified display. For use in simple and full asynchronous modes.
NOTE: This method is deprecated. Pro/INTRALINK 3.4 is not supported. Please use pfcAsyncConnection.AsyncConnection_Connect(/*optional*/ String, /*optional*/ String, /*optional*/ String, /*optional*/ Integer) to connect to an existing Creo Parametric process that has a Pro/INTRALINK 10.0 server registered.
If the method locates more than one Creo Parametric session with the appropriate characteristics, it will throw an XToolkitAmbiguous exception.
If you want to connect or reconnect to a specific Creo Parametric session, use the method pfcAsyncConnection.AsyncConnection_ConnectById(ConnectionId, /*optional*/ String, /*optional*/ Integer)
The application may only connect to one Creo Parametric session at any time.
Parameters:
Display
The name of the display Creo Parametric is using. If this is null, match any display. If this is an empty string, assume the local host.
UserID
The name of the user running the Creo Parametric to connect to. If this is NULL, match any user. If this is an empty string, assume the current user.
WSName
The name of the workspace Creo Parametric should use. If this is NULL, match any available workspace.
TextPath
The path under which the message and menu files are held. If no external messaging or menus are needed pass null.
TimeoutSec
The time, in seconds, to wait for Creo Parametric to respond to the connection request.
Returns:
Object representing the asynchronous connection.
AsyncConnection_ConnectById
AsyncConnection_ConnectById
(ConnectionId Id, /*optional*/ String TextPath, /*optional*/ Integer TimeoutSec)
Connects to a specific Creo Parametric session by passing the identification string.
The ID string for a given session can be obtained from AsyncConnection.GetConnectionId().
The application may only connect to one Creo Parametric session at any time.
User Guide References:
Parameters:
Id
The connection id string previously obtained for the Creo Parametric session you wish to connect to.
TextPath
The path under which the message and menu files are held. If no external messaging or menus are needed pass null.
TimeoutSec
The time, in seconds, to wait for Creo Parametric to respond to the connection request. Pass null to use the default timeout.
Returns:
Object representing the asynchronous connection.
AsyncConnection_GetActiveConnection
static /*optional*/ AsyncConnection
AsyncConnection_GetActiveConnection
()
Connection established between your application and Creo Parametric. If your application is connected with Creo Parametric, call this function to get the connection object.
User Guide References:
Returns:
Object representing the asynchronous connection.
Was this helpful?