SendCommand Method

Back to Methods Reference

Sends a command string to the document for processing.


VBA : object.SendCommand(Command)

VL : (vla-SendCommand object Command)

(vla-SendCommand thisdrawing (strcat "Zoom" " " "e" " "))

  • Object : Document
    The object or objects this method applies to.
  • Command : String; input-only
    The command to send to the document.


This method processes any AutoCAD command-line function, including LISP expressions.
If the drawing specified is not active, it will be made active.
This method is generally synchronous. However, if the command sent with this method requires any user interaction (such as picking a point on the screen), then this method will return as soon as the user input begins. The command will then continue to be processed asynchronously.
When this method is called from an event handler it is processed asynchronously.

You should never use this method to issue a command for which there is an ActiveX method available. For example, do not use SendCommand "VBALOAD ". Instead, use the LoadDVB method.

Example :

(defun c:al-sendcommand ()


(setq thisdrawing (vla-get-activedocument

(vla-SendCommand thisdrawing (strcat "Zoom" " " "e" " "))



The AutoLisp/Visual Lisp/VBA Resource Website
Search the WWW Search AfraLisp

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website