Uncheck flat pattern corner treatment

This commit is contained in:
AJ
2023-03-01 08:07:06 -05:00
parent db481baa89
commit 2e6ecd11a1
4 changed files with 19 additions and 3 deletions

View File

@@ -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);

View File

@@ -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);
}
}
}

View File

@@ -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 {

View File

@@ -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())));