1. 程式人生 > >遍歷獲取Teamcenter中結構管理器的所有BOMLine

遍歷獲取Teamcenter中結構管理器的所有BOMLine

getch ntb lis row title asc mce for .get

直接上代碼:

 1 public void collectAllBomLine(TCComponentBOMLine topBomLine) throws TCException{
 2         String objectName = topBomLine.getProperty("bl_indented_title");
 3         String level = topBomLine.getProperty("bl_level_starting_0");
 4         
 5         BomLineBean bomLineBean = new BomLineBean(objectName, level);
6 BomLineList.add(bomLineBean); 7 8 if(topBomLine.hasChildren()){ 9 AIFComponentContext[] childrens = topBomLine.getChildren(); 10 for (AIFComponentContext aifComponentContext : childrens) { 11 TCComponentBOMLine bomLine = (TCComponentBOMLine) aifComponentContext.getComponent();
12 collectAllBomLine(bomLine); 13 } 14 } 15 16 }

完畢

遍歷獲取Teamcenter中結構管理器的所有BOMLine