Category Windchill servers, Object ProCurrent

Function ProCurrentWorkspaceImport


Description
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 (see error status descriptions). 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. In addition, warnings and information messages are logged in proimpex.log file.
Replacement in Object TOOLKIT: pfcBaseSession::ImportToCurrentWS
Synopsis
#include <ProWorkspace.h>
ProErrorProCurrentWorkspaceImport(
ProWorkspaceImpExDepCriterion dep_criterion
/* (In)
the dependency criterion,
*/
wchar_t** source_objects
/* (In)
a ProArray of paths (absolute or relative to current working directory) to objects to import.
*/
)
Returns
PRO_TK_NO_ERRORall the specified objects and their specified dependents have been processed; proimpex.errors still to be checked for possible problems with individual objects
PRO_TK_BAD_INPUTSone or more arguments was invalid
PRO_TK_E_BUSYcannot import because there are objects in Creo Parametric session
PRO_TK_E_NOT_FOUNDno workspace registered as current (or non linked session)
PRO_TK_GENERAL_ERRORan error caused the entire operation to fail.

Manual References:

  1. Data Management: Windchill Operations: Import and Export
  2. Data Management: Windchill Operations: Import and Export
  3. Data Management: Windchill Operations: File Copy

Sample Code References:

  1. pt_wc_server ( PTWCServerPopulate.c )
  2. pt_wc_server ( PTWCServerPopulate.c )