diff --git a/ExportDXF/Forms/MainForm.cs b/ExportDXF/Forms/MainForm.cs index 793d2be..d58ed5f 100644 --- a/ExportDXF/Forms/MainForm.cs +++ b/ExportDXF/Forms/MainForm.cs @@ -530,6 +530,8 @@ namespace ExportDXF.Forms if (templateDrawing == null) templateDrawing = CreateDrawing(); + Helper.UncheckFlatPatternCornerTreatment(partModel); + var sheet = templateDrawing.IGetCurrentSheet(); var modelName = Path.GetFileNameWithoutExtension(partModel.GetPathName()); sheet.SetName(modelName); diff --git a/ExportDXF/Helper.cs b/ExportDXF/Helper.cs index 3fefd7f..adf98c4 100644 --- a/ExportDXF/Helper.cs +++ b/ExportDXF/Helper.cs @@ -1,4 +1,7 @@ -namespace ExportDXF +using SolidWorks.Interop.sldworks; +using System.Diagnostics; + +namespace ExportDXF { public static class Helper { @@ -17,5 +20,16 @@ default: return i.ToString() + "th"; } } + + public static void UncheckFlatPatternCornerTreatment(ModelDoc2 model) + { + var flatPattern = model.GetFeatureByTypeName("FlatPattern"); + var flatPatternFeatureData = flatPattern.GetDefinition() as FlatPatternFeatureData; + + flatPatternFeatureData.CornerTreatment = false; + flatPatternFeatureData.SimplifyBends = false; + + var ret = flatPattern.ModifyDefinition(flatPatternFeatureData, model, null); + } } } \ No newline at end of file diff --git a/ExportDXF/Properties/Resources.Designer.cs b/ExportDXF/Properties/Resources.Designer.cs index 8a74000..b9d9b62 100644 --- a/ExportDXF/Properties/Resources.Designer.cs +++ b/ExportDXF/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace ExportDXF.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/ExportDXF/Properties/Settings.Designer.cs b/ExportDXF/Properties/Settings.Designer.cs index 0d01f56..9590b08 100644 --- a/ExportDXF/Properties/Settings.Designer.cs +++ b/ExportDXF/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace ExportDXF.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));