I'm develop a run-time routine in arx using acedGrRead to get user
coordinate.
If the user want to zoom or use another autocad command, I get the code 11,
but I don't know what I must do to let Autocad execute the new command and
then resume my command.
This is the code:
void test()
{
int retType;
int pippo;
int track;
AcDbObjectId IdLine;
AcDbObjectId IdPrecLine;
resbuf *result = new resbuf();
MSG mes;
AcDbEntity *MyLine;
Acad::ErrorStatus
es=acDocManager->lockDocument(curDoc(),AcAp::kWrite,NULL,NULL,true);
IdPrecLine=AcDbObjectId();
do {
pippo=acedGrRead(3,&retType,result);
switch (retType)
{
case 5:
// Arrivata una cordinata
// faccio disegnare una linea da (0,0) al cursore
IdLine=DrawLine(0,0,0,result->resval.rpoint[0],result->resval.rpoint[1],0);
if(::PeekMessage(&mes, NULL, 0, 0, PM_REMOVE))
{
::TranslateMessage(&mes);
::DispatchMessage(&mes);
}
if (IdPrecLine!=0) {
acdbOpenObject(MyLine,IdPrecLine,AcDb::kForWrite);
MyLine->erase(true);
MyLine->close();
break;
}
case 11:
// what I must do here????
break;
}
IdPrecLine=IdLine;
if(::PeekMessage(&mes, NULL, 0, 0, PM_REMOVE))
{
::TranslateMessage(&mes);
::DispatchMessage(&mes);
}
} while (retType!=3);
es=acDocManager->unlockDocument(curDoc());
}
Thanks in advance!!!!
Pivanti Marco