zoukankan      html  css  js  c++  java
  • Teamcenter中TCComponentItem与TCComponentBOMLine的创建

    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中有没有这个零组件对象
    版权声明:本文为CSDN博主「叮当LIU」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_36880602/article/details/78259443
    

     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;
    }
    ————————————————
    版权声明:本文为CSDN博主「叮当LIU」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_36880602/article/details/78259443
    

      

  • 相关阅读:
    完全背包详解
    0-1背包详解
    优先队列 + 模拟
    循环节 + 矩阵快速幂
    并查集 + 路径压缩(经典) UVALive 3027 Corporative Network
    dp
    动态规划分类(完整版)
    (二)Spring框架之JDBC的基本使用(p6spy插件的使用)
    (一)Spring框架基础
    (十六)客户端验证与struts2中的服务器端验证
  • 原文地址:https://www.cnblogs.com/wwssgg/p/14705539.html
Copyright © 2011-2022 走看看