Teamcenter中TCComponentItem与TCComponentBOMLine的创建
来源:互联网 发布:声波发生器软件 编辑:程序博客网 时间:2024/05/29 18:27
1:在teamcenter中创建零组件对象:直接上方法
TCSession session = (TCSession) AIFUtility.getDefaultSession(); //获取tcsession
public TCComponentItem createItem(TCSession session, String type,String itemID, String itemName, String itemRev) throws TCException {
//type是"Item",itemID是零组件id,itemName是零组件名字,itemRev是零组件版本
TCComponentItemType itemType = (TCComponentItemType) session.getTypeComponent(type);
//根据零组件信息创建零组件对象
TCComponentItem item = itemType.create(itemID,intmRev, type, itemName, "", null);//item = itemType.find(itemID); //可以根据零组件id查询tc中有没有这个零组件对象
}
2:在teamcenter中创建BOMLine对象:
public TCComponentBOMLine addBOMLine(TCSession session,
TCComponentItem parentItem, TCComponentItem childrenItem) throws TCException {
//prantItem是父零组件对象,childrenItem是子零组件对象
TCComponentBOMLine bomline = null;
TCComponentBOMWindowType winType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
TCComponentBOMWindow window = winType.create(null);
window.lock();
TCComponentBOMLine topLine = window.setWindowTopLine(parentItem,parentItem.getLatestItemRevision(), null, null);
bomline = topLine.add(childrenItem,childrenItem.getLatestItemRevision(), null, false, "");
topLine.save();
window.save();
window.unlock();
window.close();
return bomline;
}
- Teamcenter中TCComponentItem与TCComponentBOMLine的创建
- teamcenter的安装
- Teamcenter命令抑制无效的解决办法
- 所有与Teamcenter相关的文章都在此发表,其他文章在BlobBus发表http://guoy.blogbus.com
- 如何实现与Teamcenter PLM单点登录(SSO)
- linux下自动部署Teamcenter Enterprise 的服务端脚本
- Teamcenter - Index search 找不到相关物件的解决方法
- Teamcenter Organization
- Teamcenter Folder
- Teamcenter Item
- Teamcenter Dataset
- 数据库中触发器的创建与注意事项
- 数据库中数据库与表的创建
- android中资源的创建与引用
- SVN中Branch的创建与合并
- SVN中Branch的创建与合并
- 内核中线程的创建与销毁
- SVN中Branch的创建与合并
- Say hello to the universe!
- Codeforces Round #441 div2 A. Trip For Meal
- 插画风漫画来袭 天才美术少女的清甜恋爱!
- Spring Data ElasticSearch环境搭建
- 完美字符串
- Teamcenter中TCComponentItem与TCComponentBOMLine的创建
- Spring+Datatables分页
- python基础实例2:奖金问题
- tensorflow 优化器optimizer
- Linux的创建文件/目录中的权限参数mode
- Spring AOP两种实现机制是什么?
- 出租车问题
- android手势操作&&实现滑动切换activity
- 跑马灯AutoSwitchTextView