Ilogic rule to pop up a prompt

Ilogic rule to pop up a prompt

vishnuteja14
Contributor Contributor
502 Views
6 Replies
Message 1 of 7

Ilogic rule to pop up a prompt

vishnuteja14
Contributor
Contributor

I am looking for a prompt message to pop up when ever I press delete key from keyboard 

Is there any ilogic rule ??

@

0 Likes
503 Views
6 Replies
Replies (6)
Message 2 of 7

Frederick_Law
Mentor
Mentor

Catching key is low level Windows IO event.

You'll need to use Addin.

I won't do it this way.

Think about what happen when to want to delete text.  Every character will get a popup.

 

What are you trying to do?

 

Message 3 of 7

vishnuteja14
Contributor
Contributor

Actually I have an adding to delet any part that place through tool but if any user delete the part manually it's causing issue in model since it is leaving few ucs which generated from tool while placing 

So I want to give a prompt message if it is placed through automation tool it should say "use idelete" button to delete part 

0 Likes
Message 4 of 7

Frederick_Law
Mentor
Mentor

Inside IV SDK is a Event Watcher.

It can should events triggered by different commands and action.

 

Using that I found "AssemblyEvents.OnDelete" when deleting in assembly:

https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-AD95C63D-9952-47BA-8EA5-452D96897EA5

 

You can use that to check if the part is one added by your app and show dialog.

You don't want to show dialog on every del keypress.

You don't want to show dialog on every part/assembly delete.

Message 5 of 7

vishnuteja14
Contributor
Contributor

Can you elaborate i cannot understand this so your saying event will be trigger when I press delete key is it or if the object which I delete is from the app which I placed 

 

Am I right ?

0 Likes
Message 6 of 7

Frederick_Law
Mentor
Mentor

Please read the API page I've linked.

Again, don't even think about catching the del keypress.

You need to catch when something is deleted in assembly.  Not when del is pressed.

Message 7 of 7

Frederick_Law
Mentor
Mentor

Have you done any event handler before?

0 Likes