getentity loop problem

getentity loop problem

Anonymous
Not applicable
192 Views
6 Replies
Message 1 of 7

getentity loop problem

Anonymous
Not applicable
I am using the getentity method in a continuous loop. I want the user to be able to select entities until they press the escape key. Similar to the ddedit command or something. When the user presses the escape key an error is thrown. No problem I can't the error and end the cycle. The problem is that the escape error is the same error that is thrown when you select nothing. So I can't tell the diference between a bad pick and an escape. Anybody have any ideas?
0 Likes
193 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Use a MsgBox to confirm that they want to exit the
routine?

--
John Goodfellow
irtf'nm
use 'microtouch' in address to email



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
am using the getentity method in a continuous loop. I want the user to be able
to select entities until they press the escape key. Similar to the ddedit
command or something. When the user presses the escape key an error is thrown.
No problem I can't the error and end the cycle. The problem is that the escape
error is the same error that is thrown when you select nothing. So I can't
tell the diference between a bad pick and an escape. Anybody have any
ideas?
0 Likes
Message 3 of 7

Anonymous
Not applicable
After the error occurs, inspect the value of the ERRNO
system variable. ThisDrawing.GetVariable("ERRNO") will
return 7 for a missed pick, 52 otherwise.

--
http://www.acadx.com

"jbauer" wrote in message
news:f0498b8.-1@WebX.maYIadrTaRb...
> I am using the getentity method in a continuous loop. I
want the user to be able to select entities until they press
the escape key. Similar to the ddedit command or something.
When the user presses the escape key an error is thrown. No
problem I can't the error and end the cycle. The problem is
that the escape error is the same error that is thrown when
you select nothing. So I can't tell the diference between a
bad pick and an escape. Anybody have any ideas?
>
0 Likes
Message 4 of 7

Anonymous
Not applicable
That't a good Idea. I currently have it set up so the user has to type quit to exit, but I would like this routine to act more like a built in AutoCAD routine.
0 Likes
Message 5 of 7

Anonymous
Not applicable
Thanks a lot Frank that did the trick. I guess now I don't understand why the err object can't tell the difference. Do you know what's going on behind the scenes.
0 Likes
Message 6 of 7

Anonymous
Not applicable
The Err Object and ERRNO are two totally separate things.
Have a look at the thread "ERRNO Part 2" by Rob Outman,
5/2/01, 11:57 AM.

--
http://www.acadx.com

"jbauer" wrote in message
news:f0498b8.3@WebX.maYIadrTaRb...
> Thanks a lot Frank that did the trick. I guess now I don't
understand why the err object can't tell the difference. Do
you know what's going on behind the scenes.
>
0 Likes
Message 7 of 7

Anonymous
Not applicable
it was big problem for me , thanks alot
0 Likes