View Full Version : Help with asynchronus issue
Using Acad Map 2000i, we were creating a revision cloud using the Express tools Revcloud command, which is coded in LISP. We are upgrading to Acad Map 2008, and I find that the former Express tool Revcloud is now a built in command. As such, it now runs in an asynchronous mode similar to _pline, etc. The issue is that we want to show a VBA form at the completion of the Revcloud execution to gather information for the newly created revcloud. Currently, the form will show up before you actually get to start the Revcloud command.
Does anyone have any suggestions about how we can detect the ending of that asynchronus command so we can show the form? We have tried entering a loop looking at ActiveCommand and isQuiescent, but the loops that we tried defeated that.
Thanks,
Joe
jwanstaett
2008-04-18, 01:18 PM
set up a EndCommand Event
If the CommandName if the Revcloud command then show your form
Auto Help
Signature
object.EndCommand(CommandName)
object
Application
An object expression that evaluates to a valid container object. In this case, the only valid container is the application.
CommandName
String
The name of the command that was issued.
Remarks
The EndCommand event follows the BeginCommand event after AutoCAD completes processing the command. If the user cancels out of the command, the EndCommand event will not be triggered.
The BeginCommand event will be fired for any basic AutoCAD command, or any command registered on the AutoCAD command stack via an ObjectARX application, or the Visual LISP vlax-add-cmd function. It will not be fired for any normally defun'd C: LISP function because it is not exposed to the command stack, even though you execute it from the AutoCAD command Line. If you need LISP commands to be recognized when they execute, you will need to use the Visual LISP vlax-add-cmd function to register the command correctly to the AutoCAD command stack.
If you undefine an AutoCAD command and then redefine it via a LISP defun, the BeginCommand event may not be triggered until an actual AutoCAD command is called; for example, (command "_.LINE" ...).
AutoCAD commands are stored in groups in the command stack. One instance of the command stack is created per AutoCAD session. This stack consists of the native AutoCAD commands, as well as any custom commands you add to it.
No events will be fired while a modal dialog is being displayed.
Thanks, I will give the EndCommand a try.
Joe
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.