Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sheet metal flat pattern export via API

sheet metal flat pattern export via API

With Inventor 2023 there is a new feature called Mark. 

The format string option inside the DataIO-Method "WriteDataToFile" offers no possibility to influence the mark layers while exporting the Flat Pattern DXF via API.

 

First of all, it would be very helpfull to add that possibility. And no, it's not possible with the style editor, because you cannot disable particular layers.

 

The better way would be enabling the support to use the UI-INI file as an option for the flat pattern dxf export command in the UI instead of creating a string-Format option:

kraemema_0-1684139194072.png

 

 

API Sample could be changed to something like this:

 

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&TrimCenterlinesAtContour=True"
' refer to the INI-File for DXF-Flat Pattern Tranlsation
Dim sIniFile as String
sIniFile = "C:\TEMP\flatPatternDxf.ini" ' Create the DXF file. oDataIO.WriteDataToFile sIniFile, "C:\temp\flat2.dxf" End Sub
2 Comments
Yijiang.Cai
Autodesk
Status changed to: Accepted

Many thanks for posting the idea, and tracked as [INVGEN-69434]

Yijiang.Cai
Autodesk
Status changed to: Implemented

It has been implemented in API of Inventor 2025, and please have a try. Many thanks!

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Technology Administrators


Autodesk Design & Make Report