Flat pattern save copy as dxf

Flat pattern save copy as dxf

Anonymous
Not applicable
451 Views
1 Reply
Message 1 of 2

Flat pattern save copy as dxf

Anonymous
Not applicable

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

0 Likes
452 Views
1 Reply
Reply (1)
Message 2 of 2

Maxim-CADman77
Advisor
Advisor

I wonder - was it ever solved?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes