Category Windchill servers, Object ProServer

Function ProServerObjectsCheckout


Description
Checks out or downloads an object to the workspace. Checkout rules are processed based on the Workspace config spec, unless the version is set using ProServercheckoutoptsVersionSet(). If the config spec is LATEST, for example, the latest version of the indicated object(s) will be checked out.If an aliased URL path to the model is supplied, and more than one revision of the model is in the path, Creo Parametric will apply the workspace config spec rules against the objects which reside in that folder.
Replacement in Object TOOLKIT: pfcServer::CheckoutObjects
Synopsis
#include <ProWTUtils.h>
ProErrorProServerObjectsCheckout(
ProMdl mdl
/* (In)
The top level object to checkout. Can be NULL.
*/
wchar_t* file
/* (In)
The top level object to checkout or download. Can be NULL. (One of mdl and aliased_url must not be NULL). This can be either an aliased URL to a given object or the object name. If an aliased URL path to the model is supplied, and more than one revision of the model is in the path, Creo Parametric will apply the workspace config spec rules against the objects which reside in that folder.
*/
ProBoolean checkout
/* (In)
PRO_B_TRUE to checkout and download, PRO_B_FALSE to download without checking out.
*/
ProServerCheckoutOptions options
/* (In)
An opaque handle to checkout options. Pass NULL for a default checkout (as per Creo Parametric's Checkout button in the File menu).
*/
wchar_t** object_url
/* (Out)
The url to the top level object in its downloaded/checked out location. Free this string using ProWstringFree().
*/
ProServerCheckoutConflicts* conflicts
/* (Out)
Information about checkout conflicts. NULL if the error return != PRO_TK_CHECKOUT_CONFLICT. Pass NULL if not interested in conflicts details.
*/
)
Returns
PRO_TK_NO_ERRORThe function succeeded.
PRO_TK_BAD_INPUTSOne or more inputs was invalid.
PRO_TK_E_NOT_FOUNDThe top level object was not found.
PRO_TK_BAD_CONTEXTThe primary server is not set when mdl is passed.
PRO_TK_CHECKOUT_CONFLICTConflicts occurred. Check the details in the conflicts return.

Manual References:

  1. Technical Summary of Changes for Creo 11.0.0.0: Functions superseded from Creo 1.0 to Creo 11.0
  2. Data Management: Windchill Operations: Checkout and Download
  3. Data Management: Windchill Operations: Checkout and Download
  4. Data Management: Windchill Operations: Sample Batch Workflow

Sample Code References:

  1. pt_wc_server ( PTWCServerPartToPView.c )
  2. pt_wc_server ( PTWCServerUpdateDXF.c )