Drawing is Busy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody
I have a problem with a Macro. I'm using Autocad 2008.
In my macro, I select a folder with DWG files and make a change on an object, save the file, but when I try close file, I get an error "Drawing is Busy" this is my code:
Private Sub cmdGenerar_Click()
Dim oFile, fs, obj
Set obj = CreateObject("Wscript.Shell") 'Objeto para las preguntas
Set fs = CreateObject("Scripting.FileSystemObject")
For i = 0 To lstArchivo.ListCount - 1
lstArchivo.ListIndex = i 'This is a lst with the file in the folder
cfileDWG = txtCarpeta.Value & "\" & lstArchivo.Text
Application.Documents.Open cfileDWG
agregaSolDes ' Subrutine that make the change on object
ThisDrawing.Save 'it's Work Ok
ThisDrawing.Close 'I get an error and I cann't cotinue
Next
End Sub
Thanks you.