From 6bddbff08e0ddd9e61dfc6d61532ef54b9b770d4 Mon Sep 17 00:00:00 2001 From: AJ Date: Tue, 28 Oct 2025 17:24:21 -0400 Subject: [PATCH] feat(naming): update DXF filename format to include drawing number and PT## - Use prefix as drawing number and format as {DrawingNo} PT{ItemNo} - Default to PT{ItemNo} when no prefix provided --- ExportDXF/Services/PartExporter.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ExportDXF/Services/PartExporter.cs b/ExportDXF/Services/PartExporter.cs index 17993ef..9c4221e 100644 --- a/ExportDXF/Services/PartExporter.cs +++ b/ExportDXF/Services/PartExporter.cs @@ -283,7 +283,11 @@ namespace ExportDXF.Services return prefix + item.PartName; } - return prefix + item.ItemNo.PadLeft(2, '0'); + var num = item.ItemNo.PadLeft(2, '0'); + // Expected format: {DrawingNo} PT{ItemNo} + return string.IsNullOrWhiteSpace(prefix) + ? $"PT{num}" + : $"{prefix} PT{num}"; } private void LogExportFailure(Item item, ExportContext context) @@ -304,4 +308,4 @@ namespace ExportDXF.Services } } } -} \ No newline at end of file +}