Fixed empty item number when exporting assembly.

This commit is contained in:
AJ
2018-04-26 12:59:32 -04:00
parent 6c2fe443d6
commit 9856c9eb92
2 changed files with 10 additions and 9 deletions

View File

@@ -206,25 +206,25 @@ namespace ExportDXF.Forms
Print("Found " + bomTables.Count);
Print("");
var items = new List<Item>();
foreach (var bom in bomTables)
{
if (worker.CancellationPending)
return;
Print(bom.BomFeature.Name);
Print("Fetching components...");
var items = GetItems(bom);
Print("Found " + items.Count);
Print("");
ExportToDXF(items);
items.AddRange(GetItems(bom));
}
}
private void ExportToDXF(PartDoc part)
Print("Found " + items.Count + " total");
ExportToDXF(items);
}
private void ExportToDXF(PartDoc part)
{
var prefix = textBox2.Text;
var model = part as ModelDoc2;
@@ -579,6 +579,7 @@ namespace ExportDXF.Forms
list.Add(new Item
{
ItemNo = name,
PartNo = name,
Quantity = group.Count(),
Component = component