Hi,
I am using GetEntity() of Editor object to allow user to select a single entity. Here is the code for the same.
PromptEntityResult result = editor.GetEntity(new PromptEntityOptions("\nSelect Relay Entity To Query"));
The user can respond by pressing Enter key or Escape key or select the Entity. The problem is that the PromptEntityResult.Status returns the same Cancel for both the Enter and Escape key press. So my question is how do I recognize which key was pressed (Enter or Cancel) as a response to GetEntity() method.
thanks
Nirvan
Solved! Go to Solution.
Solved by _gile. Go to Solution.
Hi,
Using a PromptEntityOption instance, you can set its AllowNone property to true so that if the user press Enter the PromptEntityResult.Status will be None instead of Cancel.
PromptEntityOptions options = new PromptEntityOptions("\nSelect Relay Entity To Query"); options.AllowNone = true; PromptEntityResult result = ed.GetEntity(options);