aks
Guest
|
Posted:
Wed Jan 05, 2005 7:52 pm Post subject:
Re: GetEntity usage |
|
|
I don't think the "regulars" will see your post. Unlike other
newsgroups Autodesk filters out all posts that are not made through
Autodesk's channels. To answer your question, I think you have to use
a VBA KeyboardStateClass routine to perform your own check as to
whether or not the enter key was pressed. That is what I do and I got
it from a similar post to this NG. You can search for VBA
KeyboardState routines in both this NG and the overall web. Sorry I
don't have a link handy, but it is a common solution and so I think
you will find it easy enough.
Checking the the KeyboardState turns out to be fairly easy. You will
find that it opens up all sorts of interface possibilities that you
cannot do with straight AutoCAD VBA.
On 4 Jan 2005 12:40:41 -0800, John_Doe@inbox.ru wrote:
| Quote: | Consider the following code:
Dim pnt As Variant
Dim obj As AcadObject
Do
On Error Resume Next
ThisDrawing.Utility.GetEntity obj, pnt
If Err.Number = 0 Then
'Do something meaningful - something was selected
.................
Else
'didn't select anything
On Error GoTo errhandler
Exit Do
End If
Loop
I have found that Err.Number is -2147352567 both when user clicked on
the empty space or pressed Enter key. Is it possible to distinquish
between these 2 cases ? What I am trying to accomplish is to exit from
the loop ONLY if Enter key was pressed but not when user clicked on the
empty space. |
|
|