CommandManager.Pick bug with ESC key

CommandManager.Pick bug with ESC key

Anonymous
Not applicable
1,689 Views
6 Replies
Message 1 of 7

CommandManager.Pick bug with ESC key

Anonymous
Not applicable

Hi all,

 

I discovered a bug with the CommandManager.Pick method.

 

When 2 Pick command follow each other, if I press on [Esc] key, the KeyDown event cancels the first Pick command and the KeyUp event cancels the next one.

 

You can reproduce this behavior by inserting 2 parts in assembly and run this iLogic code (press [Esc] key instead of selecting part):

 

Dim message As String

For index = 1 To 10
	message = "Pick #" & index
	ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyOccurrenceFilter, message)
Next

 

The result: all the even are skipped.

 

 

Does someone had a workaround?  (I thought to catch the KeyDown event and ignore it.)

 

 

Thanks,

 

Pascal

0 Likes
Accepted solutions (1)
1,690 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

I  work with Inventor Professional 2013 64-Bit Edition SP2 Update 4

0 Likes
Message 3 of 7

Anonymous
Not applicable

The keyboard events are disabled when the Pick command is activated.  So, my workaround doesn't work.

0 Likes
Message 4 of 7

_dscholtes_
Advocate
Advocate

I would like to have some solution for this effect as well. I want to let the user either select something or press escape to use a suggested default selection, twice in a row. Selecting something using the InteractionEvents has the same issue.

 

I  work with Inventor Professional 2018 64-Bit Edition release 2018.2.3

0 Likes
Message 5 of 7

BrianEkins
Mentor
Mentor
Accepted solution

Hopefully, this will help.

 

https://ekinssolutions.com/selecting-multiple-entities-using-pick-in-inventor/

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 6 of 7

Anonymous
Not applicable

Thanks Brian!

0 Likes
Message 7 of 7

_dscholtes_
Advocate
Advocate

@BrianEkinswrote:

Hopefully, this will help.

 

https://ekinssolutions.com/selecting-multiple-entities-using-pick-in-inventor/


Thank you. And thank you also for all the other examples you posted everywhere.

0 Likes