ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cancel LISP command from ARX

3 REPLIES 3
Reply
Message 1 of 4
karl.sch1983
197 Views, 3 Replies

Cancel LISP command from ARX

I have a reactor setup as follows

 

 

void CmdEdtrReactor::commandWillStart(const ACHAR* cmdStr)
{
     if (wcscmp(cmdStr, L"(C:MYLSPTEST)") == 0)
     this->veto();
}

 

 

However, the LISP command continues to execute. I can step through the debugger and see that the reactor is called and command matched, and this->veto is called. But after that the LISP continues to execute? Does anyone know if there is a better way to cancel a LISP command from ARX. Thanks for your help.

 

EDIT: I even tried this option, but no difference.

3 REPLIES 3
Message 2 of 4

Method veto() may be called only from AcApDocManagerReactor::documentLockModeChanged event:

https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-RefGuide-AcApDocManagerReactor__veto

But I am not sure that this method can help with cancel lisp-command.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 4

Thanks @Alexander.Rivilis , for a moment there I thought we have the solution, but your suspicion is right. The veto command still does not recognize the LISP command for some reason. I can get in the reactor event and veto gets called but no affect on LISP command.

I have decided to go alternate route and get rid of the lisp altogether so I am only dealing with ARX modules. Although I would like to know if someone has come across this, and if so, what did they do instead of migrating LISP to ARX. Thanks again for looking into it.

Message 4 of 4

Try:

 

acDocManager->sendStringToExecute(curDoc(), L"\x03\x03");
// or other method
acedPostCommand(L"\x03\x03");

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost