Sends string to AutoCAD LT (LTCustomizer21 for AutoCAD LT reference manual)

ActiveX
    Function command(cmd As String) As Boolean
    Function command2(cmd As String, [cmdline_msg As String=""], [stop_next_msg As Boolean = False]) As Boolean
C/C++
    int WINAPI LTC_command(const wchar_t *cmd);
    int WINAPI LTC_command2(const wchar_t *cmd,const wchar_t *cmdline_msg=NULL,BOOL stop_next_msg=FALSE);

parameter
cmd :command line string. command2 adds return code lastly in LTCustomizer21
cmdline_msg :waits until this string appear on AutoCAD LT command line. In case of default, LTCustomizer21 waits until AutoCAD LT command prompt appear.
stop_next_msg :If this parameter is True, command2() finished when next command line message appeared on AutoCAD LT after LTCustomizer21 sent parameter 'cmd' irrespective of contents of parameter "cmdline_msg".

return value
True or 1: Success
False or 0: user canceled or other error.


These functions send string to AutoCAD LT. Unlike command(),command2() does not return until command prompt(ex: "Command:") appear. In addition, If you input string in parameter "cmdline_msg", command2() finished when "cmdline_msg" appeared, too. If you specify True to "stop_next_msg", command2() return as soon as next command line message appeared, independently of contents of "cmdline_msg" after "cmd" appeared on AutoCAD LT command line. command2() is also designed so as to return if user pushed ESC(cancel) key on AutoCAD LT. .