CompuServe Thread

#autolisp

2 messages in this thread
#21850From: Terry GilbertApr 14, 1988 5:04 PM
I'm trying to write a function that lets me time how long a pan or zoom command takes (roughly). My approach has been to redefine the pan and zoom commands as autolisp routines. The autolisp routine for zoom, for example, initializes the user timer via the TIME command, and then invokes the original ZOOM via the command function. The next autlisp instruction reads the value of the user timer and stores it off to be printed to a file later. The problem is that once the autolisp 'command' function invokes an AutoCad command, it doesn't wait for that ccommand to terminate. It goes ahead and executes the next autolisp function. One solution is to write a special routine for each different mode of the ZOOM command, but some modes really can't be simulated; the ZOOM Dynamic command, for instance. What I need is for some way to monitor the status of the ZOOM command from autolisp. Autolisp could jujust loop until it sees that the command has finished, and then go on. I don't know if this is possible, but if somebody can think of a way, or perhaps knows of another way to time PAN and ZOOM commands in a reasonable fashion, I'd appreciate the info. Thanks in advance.
#21865From: Training [ADESK]Apr 15, 1988 11:54 AM
Terry — Hmmmm. I see what you mean, but I don't have a solution for you. There's been a request in the past to allow AutoLISP to monitor the state of the current AutoCAD prompt, i.e., to be able to tell whether AutoCAD is at the "Command:" prompt. Such a feature would probably solve your problem. I don't know whether such a thing is feasible, but I'll look into it. — Brad ..