EndCommand 事件 (ActiveX)
命令完成后立即触发。 支持的平台:仅限 Windows 签名VBA: object.EndCommand(CommandName)
言论AutoCAD 完成对命令的处理后,该事件将跟随该事件。如果用户取消该命令,则不会触发该事件。EndCommand BeginCommand EndCommand 对于任何基本的 AutoCAD 命令,或者通过 ObjectARX 应用程序在 AutoCAD 命令堆栈上注册的任何命令,或者 Visual LISP 函数,都会触发该事件。对于任何通常已定义的 AutoLISP 函数,它不会被触发,因为它不会公开给命令堆栈,即使您从 AutoCAD 命令行执行它也是如此。如果需要在执行AutoLISP命令时识别它们,则需要使用Visual LISP函数将命令正确注册到AutoCAD命令堆栈。BeginCommandvlax-add-cmdC:vlax-add-cmd 如果取消定义 AutoCAD 命令,然后通过 AutoLISP 函数重新定义该命令,则在调用实际 AutoCAD 命令之前,可能不会触发该事件;例如,(命令“._LINE”...)。defunBeginCommand AutoCAD 命令在命令堆栈中以组的形式存储。每个 AutoCAD 任务将创建一个命令堆栈实例。此堆栈由本机 AutoCAD 命令以及您添加到其中的任何自定义命令组成。 显示模式对话框时不会触发任何事件 例子VBA: Private Sub AcadDocument_EndCommand(ByVal CommandName As String) ' This example intercepts a drawing EndCommand event. ' ' This event is triggered when a drawing receives ' any command compatible with this event. ' ' To trigger this example event: Issue any command to an open drawing from ' either the command line, VBA, the ACAD menus, the ACAD toolbars, or LISP. ' When the command is finished, this event will be triggered. ' Use the "CommandName" variable to determine which command just finished MsgBox "A drawing has just finished a " & CommandName & " command." End Sub 可视化 LISP: Not available |
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-3-28 16:44
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.