Export dxf with Polylines from DrawingDocument

Export dxf with Polylines from DrawingDocument

c.bloedorn
Enthusiast Enthusiast
323 Views
4 Replies
Message 1 of 5

Export dxf with Polylines from DrawingDocument

c.bloedorn
Enthusiast
Enthusiast

Hi Everyone,

I'm wanting to create a dxf exporter and am currently deciding which of the two options to utilize (DataIO or TranslatorAddIn). I'm leaning towards the TranslatorAddIn option, as it allows certain customizations I'm after. However, I really need it to export closed line segments as Polylines, much like the "MergeProfilesIntoPolyline" setting via DataIO does.

Is this possible (perhaps by adjusting the .ini or .xml file)?

Thanks in advance for any help!

0 Likes
324 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Hi @c.bloedorn.  We can actually open that INI file with Notepad.exe, and review its contents, and/or change it.  We can also open the XML file that may be specified within that INI file for customizing the Layers, with the Notepad.exe, and review that also.  I did not see any setting with a name like that in either of my files that get referenced by the TranslatorAddIn.SaveCopyAs method.  It does have the "REPLACE SPLINE", and "CHORD TOLERANCE" settings though.  Sometimes the CAM software will be able to 'merge' or 'clean-up' imported profile geometry for us, if it is not already that way within the DXF file.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

c.bloedorn
Enthusiast
Enthusiast

Hi @WCrihfield 

Thanks for the reply. What you're saying though is that there is unfortunately no out of the box setting/solution for this, right?

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor

I'm just saying that one specific setting named "MergeProfilesIntoPolyline" only seems to be available when using the DataIO.WriteDataToFile method of exporting to DXF, but does not appear to be available when using the TranslatorAddIn.SaveCopyAs method of exporting to DXF.

 

However, I opened my INI file again this morning, to have another look, and I do see an option/setting within it called "GROUP GEOMETRY", which is currently set "=No".  Maybe this is that same setting, but with a different name.  Merging profiles into a polyline is pretty much just 'grouping', since all the individual entities retain their sizes, shapes, orientations, and such.  The only time I think I ever see that setting being available when exporting anything to DXF manually, is when I have a true sheet metal part open, and it has a Flat Pattern, and I am in flat pattern edit mode, then I right-click on the Flat Pattern node, choose 'Save Copy As' from that right-click menu, specify the path and file name, then click the Save button, then a dialog shows.  In that dialog, there three tabs (General, Layer, & Geometry) for specifying all the different types of settings.  On the tab named Geometry, within a sub-area labeled '2d Geometry', is a checkbox option named "Merge Profiles into Polyline".  If I go through that process again, manually, turn that option on, and save that configuration to a new INI file in the process.  Then open that new INI file again afterwards, I can see that this option named "GROUP GEOMETRY" is now set to "=Yes", instead of "=No".  So, this must be the same setting, just with a different name within the INI file.  So, the only way to set those options is through the 'manual' export process, and saving those settings changes to an INI file.  Then, if you are using the TranslatorAddIn.SaveCopyAs method, you would specify that INI file as what options to use.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

c.bloedorn
Enthusiast
Enthusiast

Hey @WCrihfield 

Thanks again for the reply!

This sounded very plausible, but after trying various different .ini files I have not been able to make this work.

Maybe I'm missing something, but I think I'll give up on this for now and think of a different solution for what I'm trying to achieve.

0 Likes