acedCommand and sendStringToExecute

acedCommand and sendStringToExecute

Anonymous
Not applicable
752 Views
4 Replies
Message 1 of 5

acedCommand and sendStringToExecute

Anonymous
Not applicable
In certain cases (if AutoCAD is not at the Command prompt ) the function 'acedCommand' does not invoke its input AutoCAD command. I thought to use function virtual Acad::ErrorStatus AcApDocManager::sendStringToExecute(AcApDocument* pAcTargetDocument,const char * pszExecute,bool bActivate = true,bool bWrapUpInactiveDoc = false,bool bEchoString = true) = 0; can anyone help me use this function to do something like 'acedCommand(RTSTR, "zoom", RTSTR, "all", 0)', thanks a lot
0 Likes
753 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
sendStringToExecute sends the string you provide to the commandline.
Try something like: acDocManager->sendStringToExecute(acDocManager->mdiActiveDocument(), ".zoom all\n", true, false, false);
0 Likes
Message 3 of 5

Anonymous
Not applicable
Thanks very much. when executing the command, in the AutoCAD command line, there is a sentence: Enter BACKSPACE to interrupt script. Do you know what it means? "ggr@nedgraphics.nl" wrote in message news:23656172.1102519686134.JavaMail.jive@jiveforum2.autodesk.com... > sendStringToExecute sends the string you provide to the commandline. > Try something like: acDocManager->sendStringToExecute(acDocManager->mdiActiveDocument(), ".zoom all\n", true, false, false);
0 Likes
Message 4 of 5

Anonymous
Not applicable
Thanks very much for your quick help. it works in the case where the function acedCommand does not work. Thanks again. "ggr@nedgraphics.nl" wrote in message news:23656172.1102519686134.JavaMail.jive@jiveforum2.autodesk.com... > sendStringToExecute sends the string you provide to the commandline. > Try something like: acDocManager->sendStringToExecute(acDocManager->mdiActiveDocument(), ".zoom all\n", true, false, false);
0 Likes
Message 5 of 5

Anonymous
Not applicable
Do you mean what the '\n' at the end in ".zoom all\n" is for?
It has the same function as hitting enter on your keyboard after typing a command on the commandline.
0 Likes