×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Save as flat... (DXF)

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

RE: Save as flat... (DXF)

(OP)
I have solved (accidentally) my problem, or I think that I had do.

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources