windchill 通过代码设置分类属性
作者:互联网
public static WTPart classifyWTPart(WTPart part,String bindingAttributeName,String classificationNode)
throws WTException, WTPropertyVetoException {
Debug.P("---isCheckOut-----"+ WorkInProgressHelper.isCheckedOut(part)+
"---isWorkCopy------"+WorkInProgressHelper.isWorkingCopy(part));
WTPart part_work = (WTPart)WorkInProgressHelper.service.checkout(part,
WorkInProgressHelper.service.getCheckoutFolder(), null).getWorkingCopy();
PersistableAdapter obj = new PersistableAdapter(part_work,null, SessionHelper.getLocale(),new UpdateOperationIdentifier());
obj.load(bindingAttributeName);
obj.set(bindingAttributeName, classificationNode);
obj.apply();
PersistenceHelper.manager.save(part_work);
return (WTPart)WorkInProgressHelper.service.checkin(part_work, null);
}
标签:obj,windchill,WorkInProgressHelper,代码,work,WTPart,part,null,属性 来源: https://www.cnblogs.com/yorshika/p/15798175.html