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

Prompt user with Mutiple option

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
waseefur.rahman
229 Views, 2 Replies

Prompt user with Mutiple option

Hi Everyone,

I want to prompt user with multiple options, 
(i.e) User can either select polyline or even enter a keyword to proceed with further operations.
I have used below code to prompt

int stat = acedEntSel(_T("\nDefine next window or enter 'RM' to define next room or enter 'X' to exit definition[RM/X]"), ent, pt);

if (stat != RTNORM && stat != RTKWORD)
{

}

 While debugging when I enter any keyword, it's not returning any keyword,

Can anyone please advise, what needs to change to achieve the required result.

Thanks in advance. 

2 REPLIES 2
Message 2 of 3
tbrammer
in reply to: waseefur.rahman

If you want to allow keywords you must call acedInitGet() first:

int val=RSG_NONULL; // see docs for acedInitGet() for possible values.
acedInitGet(val, L"RM eXit");
int stat = acedEntSel(_T("\nDefine next window or enter 'RM' to define next room or enter 'X' to exit definition [RM/X]"), ent, pt);
if( stat==RTKWORD ) {
    TCHAR userstring[512];
    if (acedGetInput(userstring) == RTNORM) {
       // Now userstring is one of the keywords passed to acedInitGet().
    }
}

In your case I would use

stat = acedEntSel(_T("\nSelect next window or [next Room/eXit]"), ent, pt);

 So the user only needs to type 'R' or 'X' or click on one of the options.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 3

Thats awesome...!!!

your answer worked for me.

Thanks a lot...

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

Post to forums  

Autodesk Customer Advisory Groups


Autodesk Design & Make Report