Export sheet-metal flat patterns from Autodesk Inventor to DXF with customizable workflows.
Flat Pattern Exporter (FPExport) is a standalone WPF utility that connects to a running Autodesk Inventor session and automates flat-pattern exports for sheet-metal parts. The tool scans assemblies or parts, resolves conflicts, and produces DXF files with predictable naming, layer configuration, and optional previews. Settings, tokens, and UI preferences persist between sessions so teams can standardize their export pipeline.
- Connects to Autodesk Inventor through the COM API and validates the active document before processing.
- Scans assemblies using BOM or occurrence traversal, with filters for reference, phantom, purchased, and library components.
- Tracks part metadata in a document cache and resolves duplicate item numbers via the conflict analyzer.
- Exports DXF files with customizable layer mapping, AutoCAD version targeting, polylines merging, spline replacement, geometry rebasing, and optional DXF optimization.
- Builds file names from tokenized templates (including custom text and user-defined iProperties) and organizes output by material, thickness, or custom subfolders.
- Generates thumbnails for parts and exported DXF previews to aid validation. Uses a dual-method approach: ApprenticeServer API (primary, faster) with automatic fallback to Windows Shell API if ApprenticeServer is unavailable.
- Persists UI layout, column order, presets, themes, and localization preferences in
%AppData%\FlatPatternExporter\settings.json. - Ships with English and Russian UI resources plus a light/dark theme switcher.
This project is developed with assistance from Claude Code - an AI-powered coding assistant that helps with architecture design, code implementation, and documentation.
- Windows 10/11 x64
- .NET 8.0 Desktop Runtime (or Visual Studio 2022 with .NET workload for development)
- Autodesk Inventor 2020 or newer (tested with the 2026 API) installed locally
- Git in
PATHif you want build numbers populated by the MSBuildSetVersionInfotarget - ApprenticeServer (optional) – recommended for faster thumbnail generation; Windows Shell API is used automatically if ApprenticeServer is unavailable
Clone the repository and choose the workflow that fits your environment.
- Install Visual Studio 2022 with the
.NET desktop developmentworkload. - Open
FlatPatternExporter.slnand restore NuGet packages (netDxf.netstandard,Svg.Skia,Microsoft-WindowsAPICodePack-Shell,ClosedXML,stdole). - Ensure the reference to
Autodesk.Inventor.Interop.dllinFlatPatternExporter/FlatPatternExporter.csprojpoints to your Inventor installation (update theHintPathif necessary). - Set the solution platform to
x64(runtime identifierwin-x64) and build. - Start Autodesk Inventor, open the target assembly or part, then run the application from Visual Studio (
F5).
dotnet restore FlatPatternExporter/FlatPatternExporter.csproj dotnet build FlatPatternExporter/FlatPatternExporter.csproj -c ReleaseIf the build fails because the Inventor interop assembly was not found, edit the HintPath in FlatPatternExporter.csproj or copy the DLL into FlatPatternExporter/lib and reference it there.
Use the included publish profiles under FlatPatternExporter/Properties/PublishProfiles or run:
dotnet publish FlatPatternExporter/FlatPatternExporter.csproj -c Release -r win-x64 --self-contained falseThe publish output contains a ready-to-run folder; distribute it alongside your configuration presets if required.
For automated release creation, use the included scripts:
-
Build all release archives:
publish.bat # Select option 5 (All) to create all build typesThis creates archives in
Release/directory:FlatPatternExporter-v{VERSION}-x64-Deploy.zipFlatPatternExporter-v{VERSION}-x64-Portable.zipFlatPatternExporter-v{VERSION}-x64-FrameworkDependent.zipFlatPatternExporter.Updater-v{VERSION}-x64.zip
-
Create draft release on GitHub:
create-release-draft.bat
This script automatically:
- Detects version from Git commit count
- Creates and pushes a new tag
- Uploads all archives to GitHub
- Creates a draft release with placeholder notes
-
Finalize release:
- Open the provided edit URL in your browser
- Update release notes with detailed description
- Click "Publish release" when ready
See PUBLISH.md for detailed publishing documentation.
- Launch Autodesk Inventor and open the assembly or part you want to process.
- Run Flat Pattern Exporter (
FlatPatternExporter.exe). The app connects to the active Inventor session on startup. - Click Scan to analyze the document. Choose between BOM and Traverse scanning modes and adjust component filters as needed.
- Review detected sheet-metal parts, quantities, properties, and conflict warnings in the data grid.
- Configure export options: output folder strategy, layer presets, AutoCAD version, spline replacement, DXF optimization, file-name tokens, and thumbnail generation.
- Click Export to generate DXF files (and optional previews). Progress bars report the operation status and any skipped items.
- Use Clear to reset the session or adjust settings and re-export as needed.
- Component filters: exclude reference, purchased, phantom, and library parts from the export queue.
- Organization: create material/thickness subfolders or route files to a custom project/workspace directory.
- DXF formatting: merge profiles into polylines, rebase geometry to origin, trim centerlines, and post-process DXFs with
Utilities/DxfOptimizer. - Spline handling: replace splines with lines or arcs and control tolerance.
- Layer presets: toggle individual layers, assign custom names, colors, and line types; save presets for later reuse.
- File naming: compose file names with tokens such as
{PartNumber},{Material},{Thickness}, model states, user-defined properties, or{CUSTOM:text}segments.
- Application settings are serialized to
%AppData%\FlatPatternExporter\settings.json. Delete this file to reset the UI to defaults. - Template presets, token configurations, layer overrides, and column layouts are saved per user.
- User-defined properties picked during a session are recorded in
PropertyMetadataRegistry.UserDefinedPropertiesand become available as tokens automatically. - The conflict analyzer stores part occurrences with model states to highlight duplicate identifiers before export.
FlatPatternExporter/Core/– Inventor integration, document scanning, caching, DXF export, thumbnail generation.Services/– property metadata registry, token engine, settings persistence, version info, localization.UI/– WPF windows, controls, helpers, and view models for the main user experience.Models/– export options, scan results, conflict data, layer settings, and progress models.Libraries/– standalone helpers (DXF renderer, COM marshal core, tooltip notifications).Utilities/– DXF post-processing utilities.Converters/,Extensions/,Styles/,Resources/– XAML infrastructure, themes, and localized strings (Strings.resx,Strings.ru.resx).
LocalizationManager exposes runtime language switching between English (en-US) and Russian (ru-RU). Use the toggle in the custom title bar to switch themes. All visual styles are defined in Styles/ to keep XAML declarative and maintainable.
- Cannot connect to Inventor: ensure Inventor is running under the same user and that COM registration is intact. The app displays localized error messages when the connection fails.
- Missing Autodesk interop: verify the path to
Autodesk.Inventor.Interop.dllmatches your Inventor version. Different installations (e.g., 2024/2025/2026) store the assembly in version-specific folders. - Duplicate part numbers: review the conflict analyzer panel after scanning. Resolve naming conflicts in Inventor or adjust token templates before exporting.
- Incorrect DXF output: experiment with spline replacement, geometry rebasing, and layer presets. Use the DXF preview column to confirm results quickly.
- Thumbnail generation: the application automatically handles thumbnail retrieval using a dual-method approach. If ApprenticeServer (Inventor's lightweight document reader) is unavailable, the app seamlessly falls back to Windows Shell API. No manual configuration is required—thumbnails will be generated using the best available method.
This project is licensed under the MIT License - see the LICENSE.txt file for full details.
Copyright © 2025 Sinicyn Ivan Victorovich
FPExport подключается к Autodesk Inventor и автоматизирует экспорт разверток листового металла в DXF. Приложение сканирует сборки (BOM или обходом), фильтрует детали, выявляет конфликтующие обозначения, предлагает тонкие настройки DXF (слои, версии AutoCAD, полилинии, оптимизацию) и формирует имена файлов по токенам, включая пользовательские iProperties. Все настройки, пресеты и параметры интерфейса сохраняются в %AppData%\FlatPatternExporter\settings.json. Для сборки установите .NET 8, Visual Studio 2022 и убедитесь, что Autodesk.Inventor.Interop.dll ссылается на установленную версию Inventor. Подробные инструкции и структура проекта описаны в разделах выше.