Message 1 of 2
Flat pattern save copy as dxf

Not applicable
05-28-2015
09:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having issues with performing an export/save copy as with a sheetmetal part that has a flatpattern to dxf, the dxf file always ends up corrupt.
I'm using .ini file generated from the regular save copy as -> configuration on a flat pattern. And my code follows somewhat the API example.
Is it even possible to export the flatpattern with these .ini files? What am i missing?
Code:
TranslatorAddIn translatorAddin = null; TranslationContext translationContext = Application.TransientObjects.CreateTranslationContext(); translationContext.Type = IOMechanismEnum.kFileBrowseIOMechanism; NameValueMap options = Application.TransientObjects.CreateNameValueMap(); DataMedium dataMedium = Application.TransientObjects.CreateDataMedium(); var sheetMetalDxf = filetypeBase as SheetMetalDXF; translatorAddin = (TranslatorAddIn)Application.ApplicationAddIns.ItemById["{C24E3AC4-122E-11D5-8E91-0010B541CD80}"]; if (sheetMetalDxf.UseSettingsFile) { if (sheetMetalDxf.SettingsFile != "") options.set_Value("Export_Acad_IniFile", sheetMetalDxf.SettingsFile); } dataMedium.FileName = Path.GetFileNameWithoutExtension(document.FullFileName); translatorAddin.SaveCopyAs(document, translationContext, options, dataMedium);
- Anders Hansson