From 9e527acec5ac0057b7904161f635079b80d3f813 Mon Sep 17 00:00:00 2001 From: AJ Date: Thu, 26 Apr 2018 13:47:08 -0400 Subject: [PATCH] Fixed missing description when exporting assembly. --- ExportDXF/Forms/MainForm.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ExportDXF/Forms/MainForm.cs b/ExportDXF/Forms/MainForm.cs index 2a4643c..29936b7 100644 --- a/ExportDXF/Forms/MainForm.cs +++ b/ExportDXF/Forms/MainForm.cs @@ -303,6 +303,12 @@ namespace ExportDXF.Forms item.KFactor = sheetMetalData.KFactor; } + if (item.Description == null) + item.Description = model.Extension.CustomPropertyManager[config].Get("Description"); + + if (item.Description == null) + item.Description = model.Extension.CustomPropertyManager[""].Get("Description"); + var db = string.Empty; item.Material = part.GetMaterialPropertyName2(config, out db); @@ -573,11 +579,16 @@ namespace ExportDXF.Forms { var component = group.First(); + var model = component.GetModelDoc2() as ModelDoc2; + + if (model == null) + continue; + var name = component.ReferencedConfiguration.ToLower() == "default" ? component.GetTitle() : string.Format("{0} [{1}]", component.GetTitle(), component.ReferencedConfiguration); - list.Add(new Item + list.Add(new Item { ItemNo = name, PartNo = name,