Message 1 of 10
File fails to save

Not applicable
02-06-2008
02:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm working on some code to save a DXF file after modification as a R12 DXF, but I'm having problems with the "SaveAs" function. Part of the code is below (just watch out for broken lines). It fails at the last line below.
Any suggestions?
MsgBox ThisDrawing.FullName
If (ThisDrawing.FullName = "") Or StrComp("DWG", UCase(Right(ThisDrawing.FullName, 3))) = 0 Then
SaveFile
Exit Sub
End If
Dim dteCreate As Date
Dim dteAccess As Date
Dim dteModify As Date
If Not modTime.GetFileTimes(ThisDrawing.FullName, dteCreate, dteAccess, dteModify, True) Then
Call MsgBox("Error getting file dates.", vbCritical, "Unable to Read File Dates")
Exit Sub
End If
MsgBox "Modified date: " & dteModify
oldDateMod = dteModify
ThisDrawing.SaveAs ThisDrawing.FullName, acR12_dxf
Any suggestions?
MsgBox ThisDrawing.FullName
If (ThisDrawing.FullName = "") Or StrComp("DWG", UCase(Right(ThisDrawing.FullName, 3))) = 0 Then
SaveFile
Exit Sub
End If
Dim dteCreate As Date
Dim dteAccess As Date
Dim dteModify As Date
If Not modTime.GetFileTimes(ThisDrawing.FullName, dteCreate, dteAccess, dteModify, True) Then
Call MsgBox("Error getting file dates.", vbCritical, "Unable to Read File Dates")
Exit Sub
End If
MsgBox "Modified date: " & dteModify
oldDateMod = dteModify
ThisDrawing.SaveAs ThisDrawing.FullName, acR12_dxf