
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
We currently use a simple VBA macro to generate a DXF of a drawing to a specific folder by clicking on a button. We need the same function for creating a SAT file from an IPT (sheet metal part) and I am struggling to make this work. I know it is probably possible with Ilogic but would prefer to just add have this as the same function we have on the DXF.
This would export the IPT as a 3D model (not the flat pattern) to a specified folder and keep the original filename but as *.SAT
The code we use for the DXF export is below. If any VBA experts out there could help with some code for SAT files it would be appreciated.
Thanks
Fred
Sub EXPORT()
Dim invApp As Inventor.Application
Set invApp = ThisApplication
invApp.SilentOperation = True
Dim idwDoc As Inventor.DrawingDocument
Set idwDoc = invApp.ActiveDocument
Dim dxfFile As String
dxfFile = idwDoc.FullFileName
dxfFile = "\\HKEURVAULT\Inventor Resources\DXF_FOR_LAYOUTS\" & idwDoc.DisplayName
Mid(dxfFile, Len(dxfFile) - 3) = ".dxf"
With invApp.CommandManager
Call .PostPrivateEvent(kFileNameEvent, dxfFile)
Call .StartCommand(kFileSaveCopyAsCommand)
End With
Set idwDoc = Nothing
invApp.SilentOperation = False
Set invApp = Nothing
End Sub
Solved! Go to Solution.