Message 1 of 6
Close File Problem

Not applicable
08-19-2005
02:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Non of the following statements are closing the file(with is already open or
active on my autocad) ,can any one tell me please that how I suppose to fix
it?
Thanks.
'==========================================
Private Sub close_all_Click()
'close all details
Dim filename_(1 To 5) As String
Dim i As Integer
Dim answer As String
Dim docs As AcadDocuments
filename_(1) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\A20-ROOF & FLOOR.dwg")
filename_(2) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\A30-CONNECTION.dwg")
filename_(3) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\A40-FOOTING.dwg")
filename_(4) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\A10-GLOBAL.DWG")
filename_(5) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\utility\01_UTIL_1.dwg")
answer = MsgBox(" OPEN ALL DETAILS ?! ", vbYesNo)
If answer = vbYes Then
For i = 1 To 5
'On Error Resume Next
docs = filename_(i).Name
Close docs
ThisDrawing.Application.documents.Close filename_(i)
Next
ThisDrawing.Application.documents.Item(strDoc).Close
End Sub
'==========================================
Non of the following statements are closing the file(with is already open or
active on my autocad) ,can any one tell me please that how I suppose to fix
it?
Thanks.
'==========================================
Private Sub close_all_Click()
'close all details
Dim filename_(1 To 5) As String
Dim i As Integer
Dim answer As String
Dim docs As AcadDocuments
filename_(1) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\A20-ROOF & FLOOR.dwg")
filename_(2) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\A30-CONNECTION.dwg")
filename_(3) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\A40-FOOTING.dwg")
filename_(4) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\A10-GLOBAL.DWG")
filename_(5) = LCase("C:\Documents and
Settings\afshin.ST-1.000\Desktop\D\utility\01_UTIL_1.dwg")
answer = MsgBox(" OPEN ALL DETAILS ?! ", vbYesNo)
If answer = vbYes Then
For i = 1 To 5
'On Error Resume Next
docs = filename_(i).Name
Close docs
ThisDrawing.Application.documents.Close filename_(i)
Next
ThisDrawing.Application.documents.Item(strDoc).Close
End Sub
'==========================================