No, I don't think so. Trying to call command function while another command is active will result in errors, such as application close unexpextedly or command nesting error. My suggestions are: 1. Change the first line of your code to (defun av:cz ()2. Replace (command "zoom" pt333 pt3333) with
(axZoomWindow pt333 pt3333)3. Define another function- (defun axZoomWindow (p1 p2)
- (if (null app)(setq app (vlax-get-acad-object)))
- (vla-ZoomWindow app (vlax-3d-point p1) (vlax-3d-point p2))
- )
4. (vlax-add-cmd "cz" 'cv:cz "cz" 5) |