Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Drawing - Export layers

NachitoMax
Advisor

Drawing - Export layers

NachitoMax
Advisor
Advisor

Hey

In much the same way we can change the layers in code when exporting a flat pattern to a DXF, can we do the same from a drawing so that the exported dxf has the layers required instead of the generic layers? Either code or built in method would suffice as long as the exported flat pattern in the dxf isnt all on Visible (ISO)

 

 

cheers

 

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Reply
1,335 Views
4 Replies
Replies (4)

JelteDeJong
Mentor
Mentor

goto "Save copy as"

save_copy_as_menu.png

Set "Save as type" to "Dxf"

and select "Options..."

save_copy_as.png

Check "Customize DWG/DXF" There will be a standard file wich you can change like you want. here you can set the layer names and that stuff.

Dxf_file_export_options.png

finish and save.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes

Anonymous
Not applicable

Hey

 

in that dialog, i can only change linetypes. I accessed the layers by Right Clicking the flat pattern at part level, selecting Save Copy As, then updating layers. It works fine whgen exporting from part level but i need the same results from drawing level export. I did select the .ini file a created but it didnt do anything.

 

A code method is also good

 

I need to do this from drawing level because i need to adda bunch oftext from iproperties which i cant do when exporting from part level

 

 

thanks

 

0 Likes

JelteDeJong
Mentor
Mentor

for me it also works on idw's. see screencast:

https://autode.sk/36nqfb6 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes

NachitoMax
Advisor
Advisor

Hi

Thanks for the reply. I get that bit and it would be great if there was docuemtnatino to support the customization of the FlatPattern.xml. for example, i dont want to use the default layer names, i need to use our own names with different colors. I am able to set that up in the .ini file but it doesnt do anything when exporting from a drawing.

 

So

 

is there any documentation on customizing the flatpattern.xml? in code, i can do it this way and name my layers & colors

 

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=CUT" & _
            "&OuterProfileLayerColor=255;0;0" & _
            "&BendUpLayer=BENDUP" & _
            "&BendUPLayerColor=0;255;0" & _
            "&BendDownLayer=BENDDOWN" & _
            "&BendDownLayerColor=0;255;0" & _
            "&InteriorProfilesLayer=INNER" & _
            "&InteriorProfilesLayerColor=255;0;127" & _
            "&TangentLayer=EXTENTS" & _
            "&TangentLayerColor=0;0;255"
            
    ' Create the DXF file.
    oDataIO.WriteDataToFile sOut, "C:\temp\flat2.dxf"
End Sub

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes