CheckIn
After you have finished working on objects in your workspace, you can share the design changes with other users. The checkin operation copies the information and files associated with all changed objects from the workspace to the database.
Functions Introduced
The function ProServerObjectsCheckin() checks in or uploads an object to the database. The object to be checked in or uploaded must be present in the current session. Changes made to the object are not included unless you save the object to the workspace using the function ProMdlSave() before it is checked in or uploaded.
Note:
 
ProServerObjectsCheckin() checks in the target object by default. To only upload the object, set the checkin option upload_only to PRO_B_TRUE.
If you pass NULL as the value of the input argument options, the checkin operation is similar to the Auto Check In option in . For more details on Auto Check In, refer to the online help for .
By using an appropriately constructed options argument, you can control the checkin or upload operation. The APIs described in this section help in constructing the options argument.
The function ProServercheckinoptsAlloc() allocates a set of checkin or upload options for the object. These options are as follows:
Default location—Specifies the default folder_location on the server for the automatic checkin operation. Use the function ProServercheckinoptsDeflocationSet() to set this location.
Server location—Specifies the folder_location on the server in which an object will be checked in or uploaded. Use the function ProServercheckinoptsLocationAdd() to set this location.
Baseline—Specifies the baseline information for the objects upon checkin. This information does not apply to upload operations. Use the function ProServercheckinoptsBaselineSet() to create a new baseline. The baseline information for a checkin operation is as follows:
baseline_name—Specifies the name of the baseline.
baseline_number—Specifies the number of the baseline.
The default format for the baseline name and baseline number is Username + time (GMT) in milliseconds.
baseline_location—Specifies the location of the baseline.
baseline_lifecycle—Specifies the name of the lifecycle.
keep_checked_out—If this option is set to PRO_B_TRUE, then the contents of the selected object are checked in to the server and automatically checked out again for further modification. The default value is PRO_B_FALSE. This option does not apply to upload operations. Use the function ProServercheckinoptsKeepcheckedoutSet() to set the keep_checked_out flag.
autoresolve—Specifies the option used to automatically resolve objects that have not been completely checked in or uploaded to the database. The autoresolve options specified by the enumerated type ProServerAutoresolveOption are as follows:
PRO_SERVER_DONT_AUTORESOLVE—Model references missing from the workspace are not automatically resolved. This may result in a conflict upon checkin. This option is used by default.
PRO_SERVER_AUTORESOLVE_IGNORE—Missing references are automatically resolved by ignoring them.
SERVER_AUTORESOLVE_UPDATE_IGNORE—Missing references are automatically resolved by updating them in the database and ignoring them if not found.
Use the function ProServercheckinoptsCommentSet() to set the history comment for checkin operations. These checkin comments are visible in the Windchill History tab.
Use the function ProServercheckinoptsAutoresolveSet() to assign the appropriate autoresolve option.
upload_only—Specifies the option to fully check in the target object or only upload the object to the server. Set this option to PRO_B_TRUE to only upload and not check in the target objects and to PRO_B_FALSE to upload and check in the objects. By default, this option is PRO_B_FALSE, if not explicitly set, to cause a checkin. Use the function ProServercheckinoptsUploadonlySet() to set the upload_only flag.
Use the function ProServercheckinoptsFree() to free the memory of the checkin options.
这对您有帮助吗?