Teamcenter中签入、签出数据集是比较常用的功能,因此Teamcener在这块,特别是对签出部分加入了很多灵活可配置的入口点,配置时候可以通过首选项组合配置出不同的效果,开发方面API也提供了支持多种需求的方法,可以通过开发场景需要来灵活使用。
配置篇:
数据集签入\签出\取消签出有下面6个相关首选项,不同组合可以出来不同的效果,
TC_checkout_and_export
TC_check_out_dir
Confirmation_shown_on_reservation_dialogs
Confirm_checkout_suppressed
Confirm_checkin_suppressed
Confirm_cancel_checkout_suppressed
各首选项含义
1.TC_checkout_and_export
配置签出确认对话框是否默认勾选“签出时导出数据集”勾选项
默认是0,改为1后,签出确认对话框中默认自动勾选了“签出时导出数据集”
Indicates if Teamcenter has to export the file to an OS directory at the time of checking out a dataset. Valid values are 0/1.
0 - Do not export the files to the OS on Check-Out.
2.TC_check_out_dir
配置签出时候如果勾选“签出时导出数据集”勾选项,数据集的命名引用将被导出到的路径
默认C:\\temp
Specifies the directory where files will be exported when a dataset is checked-out.
The value must match the path format for the client operating system (OS).
3.Confirmation_shown_on_reservation_dialogs
配置确认对话框中是否显示“不再显示确认对话框”勾选框
Specifies whether a Don't show confirmation dialog again check box is displayed in the Check-Out, Cancel Check-Out, and Check-In dialog boxes in the rich client and thin client.
默认false
改为true后,签入\签出\取消签出相关确认对话框将会显示出“不再显示确认对话框”勾选项,如果勾选了,并确定了,以后对应操作将不再显示确认对话框而是直接签入\签出\取消签出等,(有些业务场景需要这样的,用户追求高效操作,且不需要对签入签出等做更改记录,则可以省了确认这一步骤),“不再显示确认对话框”勾选框如果勾选影响的是Confirm_checkout_suppressed\Confirm_checkin_suppressed\Confirm_cancel_suppressed三个用户级别首选项,这三个首选项默认是false,如果勾选了则为true,如果这种不显示确认对话框的需求是Site或者Group级别的,管理员可以对这三个的Site或者Group级别首选项设置为true,并且将Confirmation_shown_on_reservation_dialogs也设置为true,以达到不显示确认对话框的效果
4.Confirm_checkout_suppressed
配置不显示签出确认对话框,默认为false,如果为true
(且Confirmation_shown_on_reservation_dialogs为true),
则签出时候不显示确认对话框
Specifies whether the Don't show confirmation dialog again check box is selected in the Check-Out dialog box in the rich client and thin client.
Valid Values:
true - The check box is selected and checkout proceeds without confirmation.
false - The check box is not selected and checkout requires confirmation.
5.Confirm_checkin_suppressed
配置不显示签入对话框,默认为false,如果为true
(且Confirmation_shown_on_reservation_dialogs为true),
则签入时候不显示确认对话框
Specifies whether the Don't show confirmation dialog again check box is selected in the Check-In dialog box in the rich client and thin client.
Valid Values:
true - The check box is selected and checkin proceeds without confirmation.
false - The check box is not selected and checkin requires confirmation.
6.Confirm_cancel_checkout_suppressed
配置补显示取消签出对话框,默认为false,如果为ture
(且Confirmation_shown_on_reservation_dialogs为true),
则取消签出时候不显示确认对话框
Specifies whether the Don't show confirmation dialog again check box is selected in the Cancel Check-Out dialog box in the rich client and thin client.
Valid Values:
true - The check box is selected and cancel checkout proceeds without confirmation.
false - The check box is not selected and cancel checkout requires confirmatio
使用技巧篇:
1.批量备份\修改\替换数据集
系统配置或者系统使用时,经常会遇到要对大量数据集内容进行替换\修改\备份情况,如果一个个数据集去处理效率比较低,可以通过批量选择数据集后,签出确认对话框勾选“签出时导出数据集”,
开发篇:
RCP开发对应签入\签出\取消签出也是又相应的api,提供了很多中参数组合实现对数据集签出时候是否导出数据集、是否覆盖数据集、导出到什么路径等等设置。
签出:
方法一
//String arg3 对应签出确认对话框的“签出时导出数据集”勾选项,1是导出,2是不导出,//String arg4 对应导出文件夹路径//boolean arg5 对应签出确认对话框的“覆盖现有文件”勾选项,true覆盖,false不覆盖TCReservationService.reserve(TCComponent arg0, String arg1, String arg2, short arg3, String arg4, boolean arg5)
方法二
//String arg3 对应签出确认对话框的“签出时导出数据集”勾选项,1是导出,2是不导出,默认导出首选项TC_check_out_dir设置的路径TCReservationService.reserve(arg0, arg1, arg2, arg3);
方法三
TCReservationService.reserve(arg0)
签入:
TCReservationService.unreserve(TCComponent arg0)
取消签出:
TCReservationService.cancelReservation(TCComponent arg0)
——长按关注PLM有个号——