获取一个 AcadState 对象,以监视进程外应用程序中的 AutoCAD 状态。 支持的平台:仅窗口 言论建议您在获取 AutoCAD 应用程序对象后立即调用此方法。这是识别处于静止状态的 AutoCAD 的最佳机会。 例子工 务 局: Sub Example_GetAcadState()
' This example gets the acadState object and checks to see if
' AutoCAD is in a quiescent state.
Dim State As AcadState
Set State = GetAcadState
If State.IsQuiescent Then
MsgBox "AutoCAD is quiescent."
Else
MsgBox "AutoCAD is not quiescent."
End If
End Sub
Visual LISP: (vl-load-com)
(defun c:Example_GetAcadState()
;; This example gets the acadState object and checks to see if
;; AutoCAD is in a quiescent state.
(setq acadObj (vlax-get-acad-object))
(setq State (vla-GetAcadState acadObj))
(if (= (vla-get-IsQuiescent State) :vlax-true)
(alert "AutoCAD is quiescent.")
(alert "AutoCAD is not quiescent.")
)
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 08:47
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.