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.SaveAs(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\MyTestDwg-" & s & ".dwg", ".dwg") objDoc.Close()
Posted by: Scott SmithPost date: 4/7/2011 2:59:20 AM
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 TysonPost date: 4/11/2011 6:09:40 AM
Thanks for your response. I must have overlooked
some code I inserted. I'll try your suggestions and
see what happens.
Posted by: Scott SmithPost date: 4/25/2011 10:18:50 AM