I'm having trouble migrating this command to arx 2015
acedCommand to acedCommandS or acedCommandC:
static int ads_cmdson(void)
{
struct resbuf *rb = acedGetArgs () ;
int osmodo;
ACHAR auxt[30];
struct resbuf rb1;
acedGetVar(_T("OSMODE"), &rb1);
osmodo = rb1.resval.rint;
rb1.resval.rint = 0;
acedSetVar(_T("OSMODE"), &rb1);
while (rb != NULL) {
if(rb->restype == RTREAL) {
acdbRToS(rb->resval.rreal,2,8,auxt);
acedCommand(RTSTR, auxt, RTNONE);
}
if(rb->restype == RTPOINT) acedCommand(rb->restype, rb->resval.rpoint, RTNONE);
if(rb->restype == RTSHORT) {
acdbRToS((ads_real)rb->resval.rint,2,0,auxt);
acedCommand(RTSTR, auxt, RTNONE);
}
if(rb->restype == RTANG) {
acdbRToS(rb->resval.rreal,2,8,auxt);
acedCommand(RTSTR, auxt, RTNONE);
}
if(rb->restype == RTSTR) acedCommand(rb->restype, rb->resval.rstring, RTNONE);
if(rb->restype == RTENAME) acedCommand(rb->restype, rb->resval.rlname, RTNONE);
if(rb->restype == RTPICKS) acedCommand(rb->restype, rb->resval.rlname, RTNONE);
if(rb->restype == RTORINT) {
acdbRToS(rb->resval.rreal,2,8,auxt);
acedCommand(RTSTR, auxt, RTNONE);
}
if(rb->restype == RT3DPOINT) acedCommand(rb->restype, rb->resval.rpoint, RTNONE);
if(rb->restype == RTLONG) {
acdbRToS(rb->resval.rlong,2,0,auxt);
acedCommand(RTSTR, auxt, RTNONE);
}
rb = rb->rbnext;
}
rb1.resval.rint = osmodo;
acedSetVar(_T("OSMODE"), &rb1);
if ( rb != NULL )
acutRelRb (rb) ;
return (RSRSLT) ;
}
Solved! Go to Solution.
Solved by Alfred.NESWADBA. Go to Solution.
Hi,
>>>crossposting<<< does not help you and does not help anyone else.
You've got a repsonse in your prev. post, but instead of answering it you just created a new thread, does not make sense, does not help to come more close to answers.
- alfred -