How to export a 3D Flat Layout?

How to export a 3D Flat Layout?

llorden4
Collaborator Collaborator
620 Views
4 Replies
Message 1 of 5

How to export a 3D Flat Layout?

llorden4
Collaborator
Collaborator

I'm attempting to make 3D flat layouts, .STEP files for 3rd party CAD/CAM software to automatically read the varying angle cuts required in the sheet metal flat layout (currently using V2023.5.2).

 

Exporting from the Flat Layout tab still exports the folded model, is there any workflow (I will eventually work through an API) that will allow a direct export of just the Flat Layout?

 

I have used the unfold option in model space and exported in that fashion to a STEP file with some success; but making required chamfers on sheet metal edges is proving to be unreliable; working sometimes and unable to add at others.  The Flat Layout tab is much more stable to perform these modifications but won't export.

Autodesk Inventor Certified Professional
0 Likes
Accepted solutions (1)
621 Views
4 Replies
Replies (4)
Message 2 of 5

bradeneuropeArthur
Mentor
Mentor

Found in the hep files:

 

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&InvisibleLayers=IV_UNCONSUMED_SKETCH_CONSTRUCTION"

    ' Create the DXF file.
    oDataIO.WriteDataToFile sOut, "C:\temp\flat2.dxf"
End Sub

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 5

llorden4
Collaborator
Collaborator

Yes, I already use a routine similar to this for 2D single face exports.  So unless you know something I don't, this only exports a single face and has little to do with the 3D data export I'm discussing; else I'd very much like to learn more about what it is I'm missing.

Autodesk Inventor Certified Professional
0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor
Accepted solution

Hi @llorden4.  The only other option you may have available in your version of Inventor might be to export the SurfaceBody object you get from FlatPattern.Body Property to one of the 'ACIS SAT' or 'ACIS SAB' variations that are available when using the SurfaceBody.DataIO.WriteDataToFile() method.  I believe there are 5 possibilities with both export types (for a total of 10 variations), which you can get more info about using the DataIO.GetOutputFormats method.  I have not worked with those file types before though, so I don't know if they will work for your situation or not.

Edit:  I am using 2024.3.3 version right now, so I don't know if this will be the same for you, but when you have a sheet metal part open, and are in flat pattern editing mode, and you right-click on the main 'Flat Pattern' browser node, do you also get the option in your context menu named "Save Copy As..."?

WCrihfield_0-1740154434333.png

When I use that, the dialog that opens, allows me to change the 'Save as type' from the default 'DXF files(*.dxf)' to allow multiple other file types, and one of those is STEP files (see image below).  So, if that is possible, then there may be a way to automate it by attempting to 'simulate those user interaction events', rather than by true API methods.  Maybe with the help of Document.SelectSet.Select() method &/or the DoSelect() method along with using the CommandManager.PostPrivateEvents() method to post dialog choices, and maybe even a bit of SendKeys.SendWait() method to simulate clicking the Save button.  Just throwing some stuff out there as food for thought.

WCrihfield_1-1740154572710.png

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

llorden4
Collaborator
Collaborator

There we go, and a good reason to get me to update everyone's copies.   Thanks for the pointer.

Autodesk Inventor Certified Professional
0 Likes