我是Teamcenter富客户端编程的新手。我正在尝试弄清楚如何在Teamcenter中指示/提取BOMView项的内容。
我使用的是Java,到目前为止,我可以使用AIFComponentContext和TCComponent来获取Teamcenter中任何其他对象的父/子树,但不能获取BOMView……
有没有人想知道如何获得BOMView的子项?(目前,这只能在富客户端的"Teamcenter-Structure manager“视图中看到)。
发布于 2018-01-04 22:41:58
我认为你想使用StructureManagementService.CreateBomWindows
/// <summary>
/// Opens a structure Management BOM Window
/// </summary>
/// <typeparam name="T">BOM window</typeparam>
/// <param name="action">action to do in the BOM window</param>
/// <param name="bomWindowOwner">root node for the BOM window</param>
/// <returns></returns>
public static T OpenBomWindow<T>(Func<CreateBOMWindowsResponse, T> action, ModelObject bomWindowOwner)
{
CreateBOMWindowsResponse windowResponse = TCProgram.StructureManageServiceCad.CreateBOMWindows(new CreateBOMWindowsInfo[]
{
new CreateBOMWindowsInfo()
{
ItemRev = bomWindowOwner as Mstrong.ItemRevision,
Item = bomWindowOwner as Mstrong.Item
}
});
try
{
return action.Invoke(windowResponse);
}
finally
{
TCProgram.StructureManageServiceCad.CloseBOMWindows(windowResponse.Output.Select(x => x.BomWindow).ToArray());
}
}一旦你有了这个方法,你的声明就会像这样。
OpenBomWindow(
(CreateBOMWindowsResponse bomResponse) =>
{
Mstrong.BOMLine bomLine = bomResponse.Output[0].BomLine;
},
parentItemRev);https://stackoverflow.com/questions/45370413
复制相似问题