Hello,
One question regarding BOMComp[], what is the correct way to get to this? Please look at this function:
private void HandleBOMSelection(ISelection oneSelection, Connection oneConnection)
{
Item selectedItem = oneConnection.WebServiceManager.ItemService.GetItemsByIds(new long[] { oneSelection.Id }).FirstOrDefault();
ItemBOM itemBom = oneConnection.WebServiceManager.ItemService.GetItemBOMByItemIdAndDate(selectedItem.Id, selectedItem.LastModDate, BOMTyp.Historic,
BOMViewEditOptions.Defaults | BOMViewEditOptions.ReturnOccurrences | BOMViewEditOptions.ReturnUnassignedComponents);
var itemBomAssocArray = itemBom.ItemAssocArray;
var itemBomRevArray = itemBom.ItemRevArray;
var itemBomCompArray = itemBom.BOMCompArray;
string string_itemBomAssocArray = string.Join("\n", itemBomAssocArray.Select(item => string.Join(", ", item.GetType().GetProperties().Select(prop => $"{prop.Name}: {prop.GetValue(item)}"))));
string string_itemBomRevArray = string.Join("\n", itemBomRevArray.Select(item => string.Join(", ", item.GetType().GetProperties().Select(prop => $"{prop.Name}: {prop.GetValue(item)}"))));
string string_itemBomRevArray = string.Join("\n", itemBomCompArray.Select(item => string.Join(", ", item.GetType().GetProperties().Select(prop => $"{prop.Name}: {prop.GetValue(item)}"))));
}
itemBomAssocArray and itemBomRevArray are ok, however itemBomCompArray is null. Why?