Fixed issue where first component was suppressed.
Take the first unsuppressed component available
This commit is contained in:
@@ -719,10 +719,16 @@ namespace ExportDXF.Forms
|
|||||||
|
|
||||||
var distinctComponents = bomComponents
|
var distinctComponents = bomComponents
|
||||||
.GroupBy(c => c.ReferencedConfiguration)
|
.GroupBy(c => c.ReferencedConfiguration)
|
||||||
.Select(group => group.First());
|
.Select(group => group.First())
|
||||||
|
.ToList();
|
||||||
|
|
||||||
if (distinctComponents.Count() == 1)
|
foreach (var component in bomComponents)
|
||||||
{
|
{
|
||||||
|
if (component.IsSuppressed())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var qtyString = table.DisplayedText[rowIndex, qtyColumnIndex];
|
var qtyString = table.DisplayedText[rowIndex, qtyColumnIndex];
|
||||||
int qty = 0;
|
int qty = 0;
|
||||||
|
|
||||||
@@ -734,8 +740,10 @@ namespace ExportDXF.Forms
|
|||||||
Quantity = qty,
|
Quantity = qty,
|
||||||
Description = table.DisplayedText[rowIndex, descriptionColumnIndex],
|
Description = table.DisplayedText[rowIndex, descriptionColumnIndex],
|
||||||
ItemNo = table.DisplayedText[rowIndex, itemNoColumnIndex],
|
ItemNo = table.DisplayedText[rowIndex, itemNoColumnIndex],
|
||||||
Component = distinctComponents.First()
|
Component = component
|
||||||
});
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user