acedGetKword- how to use default input

acedGetKword- how to use default input

Anonymous
Not applicable
1,205 Views
7 Replies
Message 1 of 8

acedGetKword- how to use default input

Anonymous
Not applicable
hi,
is it possible in ARX to use default input in
acedGetXXX functions, so that it could be alowed
to confirm that default input by pressing return/space?

if((retval= acedInitGet(RSG_OTHER,"No Yes")) != RTNORM)
throw retval;
if(retval=acedGetKword("\nDima,do you want to proceed?[Yes/No]",&response)!=RTNORM)
throw retval;

here if I press enter/space after the prompt
retval is not RTNORM
0 Likes
1,206 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
if((retval= acedInitGet(RSG_OTHER,"No Yes")) != RTNORM)
throw retval;
if(retval=acedGetKword("\nDima,do you want to proceed?[Yes/No]",&response)!=RTNORM)
throw retval;
0 Likes
Message 3 of 8

Anonymous
Not applicable
in this case the the x-koordinate is preset,
with 5.0

 

 

double  x    
= 5.0;
   // X-Koordinate
for distance
   acedInitGet(RSG_NONEG,
NULL);
   retval = acedGetReal(Type the X-koordinate,
&x);

 

 

hope this helps

chris


 
0 Likes
Message 4 of 8

Anonymous
Not applicable
The code:


if((retval= acedInitGet(RSG_OTHER,"No Yes")) != RTNORM)

throw retval;

if(retval=acedGetKword("\nDima,do you want to proceed?
[Yes/No]",&response)!=RTNORM)

throw retval;
0 Likes
Message 5 of 8

Anonymous
Not applicable

int retval;

ads_real resultdist=0, dist;

char distr[20],kwd[20];

CString response="Yes";

0 Likes
Message 6 of 8

Anonymous
Not applicable

the retval of of press enter/space is
RTNONE


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
hi,

is it possible in ARX to use default input in
acedGetXXX functions, so
that it could be alowed
to confirm that default input by pressing
return/space?

if((retval= acedInitGet(RSG_OTHER,"No Yes")) != RTNORM)
throw retval;

if(retval=acedGetKword("\nDima,do you want to
proceed?[Yes/No]",&response)!=RTNORM)
throw retval;

here if I press enter/space after the prompt
retval is not
RTNORM

0 Likes
Message 7 of 8

Anonymous
Not applicable
an example:

 

    acedInitGet(8,
"Interpolieren Markierung Startpunkt");
    result =
acedGetPoint(lastPoint, "\nErsten Profilpunkt eingeben
[Interpolieren/Markierung/Startpunkt] <Objektmodus>:",
inputPoint);

if the user press enter/space the result is RTNONE
and i know

he wants Objektmodus

 

Bernd


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


the retval of of press enter/space is
RTNONE


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
hi,

is it possible in ARX to use default input in
acedGetXXX functions,
so that it could be alowed
to confirm that default input by pressing
return/space?

if((retval= acedInitGet(RSG_OTHER,"No Yes")) != RTNORM)
throw retval;

if(retval=acedGetKword("\nDima,do you want to
proceed?[Yes/No]",&response)!=RTNORM)
throw retval;

here if I press enter/space after the prompt
retval is not
RTNORM

0 Likes
Message 8 of 8

Anonymous
Not applicable



//This func. prompts user to select

//the text entity and then extracts its value ""

char dnlGetDiameter()

{

//acedSSGet variables declarations

struct resbuf eb;

char sbuf[10],sbuf2[10];//Buffer to hold the string

ads_name ssname,en;

//acdbEntGet staff

struct resbuf *ed, *cb;

char *tvalue;




eb.restype=0; //Entity name

strcpy(sbuf,"TEXT");

eb.resval.rstring=sbuf;

eb.rbnext=NULL; //No other properties

acedSSGet(":S",NULL,NULL,&eb,ssname);



if(acedSSName(ssname,0L,en)!=RTNORM)

acutPrintf("Failed\n");

ed=acdbEntGet(en);//Retrieve entity data



for (cb=ed; cb!=NULL; cb=cb->rbnext)

{

if(cb->restype==1)

{

acutPrintf("%d, Current value:%s \n", cb->restype, cb->resval.rstring);

tvalue=cb->resval.rstring;

strcpy(sbuf2, tvalue);

break;

}

}




acutRelRb(ed);

acutPrintf("sbuf2 value:%s",sbuf2);

char tvalue2=reinterpret_cast(sbuf2);

return tvalue2;


}

0 Likes