Windchill常用开发API

Windchill关于代码权限

1、如何使普通用户拥有管理员的权限调用API

  • 使用**SessionHelper.manager.setAdministrator()**将 Windchill 管理员设置为当前会话用户
  • 使用**SessionHelper.manager.setPrincipal()**恢复
// get current user:
WTPrincipal realUser = SessionHelper.manager.getPrincipal();

try {
// set session user to administrator
SessionHelper.manager.setAdministrator();finally {
//set the context back to normal user
SessionHelper.manager.setPrincipal(realUser.getName());
 }
    
//第二种设置管理员权限的方式
//直接设置为管理员并且返回参数为true
boolean accessEnforced = SessionServerHelper.manager.setAccessEnforced(false);
    
//取消管理员权限设置
SessionServerHelper.manager.setAccessEnforced(accessEnforced);

2、删除未引用文件

  • 远程查看移除未引用文件时因为进程队列数量限制无法成功创建RemoveUnreferencedTaskQueue
1. 在windchill shell中执行
xconfmanager -s wt.queue.max.processQueue=60 -t codebase/wt.properties -p

//在codebase/wt.properties文件下,修改了wt.queue.max.processQueue=60修改了增加进程队列数量。
//在windchill中执行完该命令行之后,一定要等待5分钟,等待配置文件写入成功之后在进行重启。
2. 重启windchill

3. 重新执行移除未引用文件
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值