Checkout and Download
To modify an object from the commonspace, you must check out the object. The process of checking out communicates your intention to modify a design to the Windchill server. The object in the database is locked, so that other users can obtain read-only copies of the object, and are prevented from modifying the object while you have it checked out.
Checkout is often accompanied by a download action, where the objects are brought from the server-side workspace to the local workspace cache. In Creo TOOLKIT, both operations are covered by the same set of functions.
Functions Introduced:
The function ProServerObjectsCheckout() checks out and optionally downloads the object to the workspace based on the configuration specifications of the workspace. It takes the following two potential identifiers for the model to checkout:
ProMdl handle—Specifies the object to be checked out. This is applicable if the model has already been retrieved without checking out.
Aliased URL—Specifies the commonspace path of the object.
Use the function ProServerMultiobjectsCheckout() to check out and download a ProArray of objects to the workspace based on the configuration specifications of the workspace.
Note:
 
Creo TOOLKIT functions do not support the AS_STORED configuration.
If you specify the value of the input argument checkout as PRO_B_TRUE in the above functions, the selected object is checked out. Otherwise, the object is downloaded without being checked out. The download action enables you to bring read-only copies of objects into your workspace. This allows you to examine the object without placing a lock on it.
If you pass NULL as the value of the input argument options in the above functions, then the default Creo+ checkout rules apply.
The function ProServercheckoutoptsAlloc() allocates a set of checkout options for the object. These options are as follows:
dependency—Specifies the dependency rule used while checking out dependents of the object selected for checkout. The function ProServercheckoutoptsDependencySet() sets the dependency rule for checkout. The types of dependencies specified by the enumerated type ProServerDependency are as follows:
PRO_SERVER_DEPENDENCY_ALL—All the objects that are dependent on the selected object are downloaded, that is, they are added to the workspace.
PRO_SERVER_DEPENDENCY_REQUIRED—All the objects that are required to successfully retrieve the selected object in the CAD application are downloaded, that is, they are added to workspace.
PRO_SERVER_DEPENDENCY_NONE—None of the dependent objects from the selected object are downloaded, that is, they are not added to workspace.
include_option—Specifies the rule for including instances from the family table during checkout. The function ProServercheckoutoptsIncludeinstancesSet() sets the flag to include instances during checkout. The type of instances specified by the enumerated type ProServerInclude are as follows:
PRO_SERVER_INCLUDE_ALL—All the instances of the selected object are checked out.
PRO_SERVER_INCLUDE_SELECTED—The application selects the instance members from the family table to be included during checkout.
PRO_SERVER_INCLUDE_NONE—No additional instances from the family table are added to the object list.
version—Specifies the version of the object that is checked out or downloaded to the workspace. If version is not set, the object is checked out according to the current workspace configuration. The function ProServercheckoutoptsVersionSet() sets the version of the object.
download—Specifies the checkout type as download or link. The value download specifies that the object content is downloaded and checked out, while link specifies that only the metadata is downloaded and checked out. Use the function ProServercheckoutoptsDownloadSet() to set this option.
readonly—Downloads the file without checking out the file. To use this option you must set the checkout argument of the function ProServerObjectsCheckout() as PRO_B_FALSE. Use the function ProServercheckoutoptsReadonlySet() to set the readonly flag to PRO_B_TRUE.
Use the function ProServercheckoutoptsFree() to free the memory of the checkout options.
The following truth table explains the dependencies of the different control factors in ProServerObjectsCheckout() and the effect of different combinations on the end result.
Argument checkout in ProServerObjectsCheckout()
ProServercheckoutoptsDownloadSet()
ProServercheckoutoptsReadonlySet()
Result
PRO_B_TRUE
PRO_B_TRUE
NA
Object is checked out and its content is downloaded.
PRO_B_TRUE
PRO_B_FALSE
NA
Object is checked out but content is not downloaded.
PRO_B_FALSE
NA
PRO_B_TRUE
Object is downloaded without checkout and as read-only.
PRO_B_FALSE
NA
PRO_B_FALSE
This combination is invalid and is not supported.
The function ProServercheckoutoptsReadonlySet() can be used to download objects without checking them out. To download objects, you must set the checkout argument of the function ProServerObjectsCheckout() as PRO_B_FALSE before using ProServercheckoutoptsReadonlySet().
The following table describes the different values that can be specified for the check out options for the functions ProServercheckoutoptsReadonlySet() and ProServerObjectsCheckout(). It also describes the actions that can be performed on the downloaded or checked out object from the Creo+ user interface or using the Creo TOOLKIT applications.
The following table explains the dependencies of the different control factors on ProServercheckoutoptsReadonlySet():
Argument readonly in ProServercheckoutoptsReadonlySet()
Argument checkout in ProServerObjectsCheckout()
State of Object Content
Options Available in the Creo+ User Interface
Actions that can be Performed Using Creo TOOLKIT Applications
PRO_B_TRUE
PRO_B_FALSE
Downloaded but not checked out
The Conflicts dialog box allows you to perform one of the following operations on the object: check out, revise and check out, continue with modifications, or make the object read only.
Refer to the Creo+ Help for more information on resolving conflicts.
Check out the object and modify it
PRO_B_FALSE
PRO_B_FALSE
Checked out
The object can be modified.
The object can be modified.
PRO_B_TRUE
PRO_B_TRUE
Checked out
The object can be modified.
The object can be modified.
No option set
PRO_B_FALSE
Downloaded but not checked out
The Conflicts dialog box allows you to perform one of the following operations on the object: check out, revise and check out, continue with modifications, or make the object read only.
Check out the object and modify it
War dies hilfreich?