Reply

Batch Save As AutoCAD dwg from Solid Edge

[ Edited ]

I'm sure this has been addressed before in many ways.

I'm using VB 2008 to create a simple batch program to

SaveAs .dft to .dwg. I cannot seem loop through the .dft sheets

to create the individual .dwg files. Does anyone have this

VB code. P.S i'm using vers ST3.

 

'My Attempted Code

For p As Integer = 0 To lstFoundFiles.Items.Count

objDoc = objApp.Documents.Open(lstFoundFiles.Items.Item(p).ToString)

s = 0

For s = 1 To objDraft.Count - 1

If objDraft.Item(s).BackgroundVisible = True Then

objDraft.Item(s).Activate()

objDraft.SaveAs(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\MyTestDwg-" & s & ".dwg", ".dwg") objDoc.Close()

Next p

 

Posted by: Scott Smith
Post date: 4/7/2011 2:59:20 AM

2 REPLIES

RE: Batch Save As AutoCAD dwg from Solid Edge

[ Edited ]

In your code, it doesn't look like you are getting a reference to objDraft.

Also, on the second to last line, it appears that you close the objDoc before iterating through all the sheets.

 

Posted by: Terry Tyson
Post date: 4/11/2011 6:09:40 AM

RE: Batch Save As AutoCAD dwg from Solid Edge

[ Edited ]

Terry

Thanks for your response. I must have overlooked

some code I inserted.  I'll try your suggestions and

see what happens.

 

Thanks again

 

Posted by: Scott Smith
Post date: 4/25/2011 10:18:50 AM