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

acedCommand 2015

1 REPLY 1
SOLVED
Reply
Message 1 of 2
moaciroj
839 Views, 1 Reply

acedCommand 2015

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) ;
}

1 REPLY 1
Message 2 of 2
Alfred.NESWADBA
in reply to: moaciroj

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

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

Post to forums  

Autodesk Design & Make Report

”Boost