SendCommand Method

Sends a command string from a VB or VBA application to the document for processing.

See Also | Example

Signature

object.SendCommand(Command)

Object

Document
The object or objects this method applies to.

Command

String; input-only
The command to send to the document.

Remarks

Use a space or the ASCII carriage return character (vbCr) at the end of the command string to end the command; this is equivalent to pressing ENTER on the keyboard.

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 continue 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.

 

   Comments?