Set GetnestedEntity to Handle a missed pick on an object differently

Set GetnestedEntity to Handle a missed pick on an object differently

GeeHaa
Collaborator Collaborator
932 Views
8 Replies
Message 1 of 9

Set GetnestedEntity to Handle a missed pick on an object differently

GeeHaa
Collaborator
Collaborator

Hi

 

I am trying to select a text object and if the text pick is missed immediately go to a selection window. The way I am trying to do this is to use editor.getpoint then immediately feed the point into the editor.getnestedentity with  noninteractivepickpoint set to true. The problem with this is for the first pick the cursor is a crosshair and not a pickbox. I am using this approach because it seems there is no way to have getnestedentity stop picking points if you miss. I can hit enter if I set allownone to true but that is an extra step.  Is there a way to temporarily turn the crosshairs to a pickbox or is there a better way to approach this?

 

Thanks in advance.

0 Likes
Accepted solutions (1)
933 Views
8 Replies
Replies (8)
Message 2 of 9

_Tharwat
Advisor
Advisor

Hi,

 

Why you are using editor.getPoint to select an entity since you have a method with the editor.getEntity or GetNestedEntity?

0 Likes
Message 3 of 9

GeeHaa
Collaborator
Collaborator

Thanks for the response.

 

I need to select attributes within a block as well.

0 Likes
Message 4 of 9

GeeHaa
Collaborator
Collaborator
If I use getnestedentity if you miss it just asks to select more objects I need it to stop selecting so I can implement getcorner. Basically if the user misses with getnested entityI am making a selectionset of every attribute and text object in the drawing and determining if they are within the box.
0 Likes
Message 5 of 9

_Tharwat
Advisor
Advisor

Did you write any codes for this regard?

0 Likes
Message 6 of 9

GeeHaa
Collaborator
Collaborator
Yes but its over 1000 lines too big to post
0 Likes
Message 7 of 9

GeeHaa
Collaborator
Collaborator

I don't know if this helps but this is the code I  use to start the selection process

 

 

                Dim mypeo As New PromptNestedEntityOptions(vbCr + "Select " + " Text, Count=" + TextList.Count.ToString())
                Dim myPPO As New PromptPointOptions(vbCr + "select " + " Text, Count=" + TextList.Count.ToString())
                Dim myPPRes As PromptPointResult = Nothing
                myPPRes = myed.GetPoint(myPPO)
If myPPRes.Status = PromptStatus.OK Then mypeo.AllowNone = True mypeo.NonInteractivePickPoint = myPPRes.Value mypeo.UseNonInteractivePickPoint = True 100: Dim mypNestSelRes As PromptNestedEntityResult = Nothing mypNestSelRes = myed.GetNestedEntity(mypeo)


It works but like I said I would like to temporarily switch the crosshairs with a selectionbox
Im not sure if this is the right approach even.
0 Likes
Message 8 of 9

GeeHaa
Collaborator
Collaborator
Accepted solution

Its a kludge but I set the cursorsize to 1 and autosnap to 1 and the aperture to the Pickbox size temporarily and it kind of looks like a pickbox.

 

Thanks for your input.

0 Likes
Message 9 of 9

GeeHaa
Collaborator
Collaborator
I also had to set APBOX to 1 temporarily
0 Likes