获取版本或者结构管理器中的变量选项和选项值
TCComponentBOMWindow bomWindow = TCUtils.createBomWindow();
try {
ItemRevVariantData variantData = ItemRevVariantData.create(itemRev, bomWindow);
BOMVariantOption[] listOptions = variantData.listOptions();
for (int i = 0; i < listOptions.length; i++) {
String askName = listOptions[i].askName();
String[] listValues = listOptions[i].listValues();
System.out.println(askName);
System.out.println(Arrays.toString(listValues));
}
} catch (TCException e) {
e.printStackTrace();
}finally{
try {
bomWindow.save();
bomWindow.close();
} catch (TCException e) {
e.printStackTrace();
}
}