Hi.. Need some help on this, allthough it´s an oldiebutgoodie.
Digging throw tons of threads, blogs & help info, I´m still a bit confused, but believe I can boil my confusion down to these two basic questions:
Hope someone can clear this out for me!
Hi,
You could regard "DATAIO" as a lite level of DXF exporting, compared with TranslatorAddin. DATAIO does not use *.ini file. The configuration params are provided as the argument of DATAIO.WriteDataToFile. e.g.
Public Sub WriteSheetMetalDXF() ' Get the active document. This assumes it is a part document. Dim oDoc As PartDocument Set oDoc = ThisApplication.ActiveDocument ' Get the DataIO object. Dim oDataIO As DataIO Set oDataIO = oDoc.ComponentDefinition.DataIO ' Build the string that defines the format of the DXF file. Dim sOut As String sOut = "FLAT PATTERN DXF?AcadVersion=R12&OuterProfileLayer=Outer" ' Create the DXF file. oDataIO.WriteDataToFile sOut, "C:\temp\flat2.dxf" End Sub
If you activate flatpattern and run TranslatorAddin.SaveCopyAs, you will get the DXF from flatpattern.
Hi Xiaodong..
Coming back to this issue on a practical level I´m afraid there is a bit more to the picture than meets the eye.
Activating flatpattern & using SaveCopyAs() gives me a .dxf file allright, but the file is corrupted (not possible to open and the size is 19kb )??
Doing the same procedure manually generates a valid dxf file with a size of 215 kb
I am using the example from the help files to assign a path to the ini file, but checking the namedvaluemap of the dxf translator it contains no "Export_Acad_IniFile" key??
I see 4 members in the dxf translators namedvaluemap: Solid : true, Surface : true, Sketch : true, DwgVersion : 31.. ( Dwg ?? )
Exporting a flatpattern I would assume Solid & Surface should be set to false??
Is there an example with the correct assigning of the namedvaluemap that works for flatpattern & an ini file?
Did you ever manage to solve this?
I am running against the same corrupt file issue