Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

save as flat....(DXF) is producing an empty file

Status
Not open for further replies.

robsb

Materials
Apr 4, 2007
1
Thanks to fellow member ailuJ and previous thread562-33964

I've tailored the following code to gain a DXF file, however the DXF file created is empty of any lines. I'm running the code as a vb exe within Solid Edge with the sheet metal part already open. Can anybody please help?


Public objApp As SolidEdgeFramework.Application

Set objApp = GetObject(, "SolidEdge.Application")
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

objFoldedDoc.SaveAs "c:\test.dxf"


 
Replies continue below

Recommended for you

Hi,

You can't save a sheet metal part as a DXF file. Check File/Save As you will see Save As Type doesn't provide dxf.

I guess you perhaps intended to save the Flat Pattern as DXF, which matches File/Save as Flat. If so, you would need to call function SaveAsFlatDXF, which is a member of SolidEdgePart.Models.

objFoldedDoc.Models.SaveFlatAsDXF(FileName As String, Face As Object, Edge As Object, Vertex As Object)

You will need to identify a planar face as the reference face, an edge which aligns to the x-axis in the flat pattern, and a vertex which matchs the original point in the flat patter.

I guess this function will work even with NULL edge and vertex.
 
Hi,

IMHO that will not work. Have a look into the sample

C:\Program Files\Solid Edge Vxx\Custom\GandT
(xx your SE version)

how to flatten a part. The GandT will flatten the part in the
x/y plane. And when you go this way you may use the

call objFlatDoc.Models.SaveAsFlatDxf(...)

to save the flattened part. But still then you are left with the
task to supply all the required arguments to the method ...

dy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor