Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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)

Status
Not open for further replies.

ailuJ

Computer
Joined
Oct 11, 2002
Messages
4
Location
ES
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 have solved (accidentally) my problem, or I think that I had do.

This is my old code: (it doesn't work)

Code:
    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)

Code:
    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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top