Save as flat... (DXF)
Save as flat... (DXF)
(OP)
Hi,
I'm trying to obtain the DXF file of a sheet metal part, the flattened DXF of the sheet metal part, but... it only runs if previously I have do it interactively "File//Save as flat...// select a planar face or edge // and save as DXF file"
In the program I use the SaveAs method, an I give it the name of de file with the DXF extension, perhaps I have to do something with the model before saving it as DXF file?
thanks in advance
I'm trying to obtain the DXF file of a sheet metal part, the flattened DXF of the sheet metal part, but... it only runs if previously I have do it interactively "File//Save as flat...// select a planar face or edge // and save as DXF file"
In the program I use the SaveAs method, an I give it the name of de file with the DXF extension, perhaps I have to do something with the model before saving it as DXF file?
thanks in advance





RE: Save as flat... (DXF)
This is my old code: (it doesn't work)
Dim objFoldedDoc As Object
Set objFoldedDoc = objApp.ActiveDocument
Call objFoldedDoc.SaveAs(NewName:="E:\Documentation\Fig_SolidEdge\PRU-DXF-11.DXF")
And this is my new code: (works perfectly)
Dim objFoldedDoc As SolidEdgePart.SheetMetalDocument
Dim cActDocType As DocumentTypeConstants
cActDocType = objApp.ActiveDocumentType
If cActDocType = igSheetMetalDocument Then
Set objFoldedDoc = objApp.ActiveDocument
Else
Exit Sub
End If
Call objFoldedDoc.SaveAs(NewName:="E:\Documentation\Fig_SolidEdge\PRU-DXF-11.DXF")
So... the objFoldedDoc variable seems to have to be igSheetMetalDocument type.