Active Contributor
Posts: 49
Registered: ‎10-12-2006
Message 1 of 1 (664 Views)

GetAcadState.IsQuiescent appears to be stuck to False

664 Views, 0 Replies
10-22-2006 09:33 AM
It seems that I have a synchronization problem with the SendCommand in the example below. The two SendCommands are not executed until after the file has been saved. I tried waiting until the IsQuiescent state is True, but that never happens. Can somebody give me any ideas as to why the IsQuiescent state appears to be stuck to False? Is there another way to solve this synchronization problem with the SendCommand?

Thank you very much in advance for your help,


Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Imports System.IO

Public Class ClsTest

Public Sub Test()
Dim OutputPath As String = "c:\Test\dwg"
Dim ObjAcad As AcadApplication
Dim ThisDrawing As AcadDocument
Dim ZeroOrgin() As Double = {0, 0, 0}
Dim Obj As Acad3DSolid

Directory.Delete(OutputPath, True)

ObjAcad = DirectCast(GetObject(, "AutoCAD.Application.17"), AcadApplication)
ObjAcad.Visible = True
ThisDrawing = ObjAcad.ActiveDocument

Obj = ThisDrawing.ModelSpace.AddBox(ZeroOrgin, 2, 4, 8)
ThisDrawing.SendCommand("VPOINT r 225 8 ")
ThisDrawing.SendCommand("SHADEMODE Realistic ")
' It appears that IsQuiescent is never True and as a result,
' this loop never exits. Any ideas why? Is there another way to
' know when the SendCommand is finished?
Do Until ObjAcad.GetAcadState.IsQuiescent = True
ThisDrawing.SaveAs(OutputPath & "\Test.dwg")

End Sub
End Class
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.