.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetAcadState.IsQuiescent appears to be stuck to False

0 REPLIES 0
Reply
Message 1 of 1
raulpa
1187 Views, 0 Replies

GetAcadState.IsQuiescent appears to be stuck to False

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,

Raul


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)
Directory.CreateDirectory(OutputPath)

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

Obj = ThisDrawing.ModelSpace.AddBox(ZeroOrgin, 2, 4, 😎
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
Loop
ThisDrawing.SaveAs(OutputPath & "\Test.dwg")

End Sub
End Class
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost