Hi @willAM42F. This is a relatively vast, and somewhat advanced subject, so not sure I can do it justice in one or two typed up forum responses. There are not really that many Autodesk provided, fully functional example codes for you to review that deal directly with handling Inventor events. And the few that do, are usually in VBA, which is quite outdated and unsecure (but still useful). Plus, reviewing one or two 'event handler' examples, if they are not well commented, explaining everything, may leave you with more questions than answers.
Below is one such 'API Sample' provided in Inventor's online help area, which has an example using the UserInputEvents.OnDrag event handler, but this is a relatively complicated looking one to look at, with a lot of other stuff going on, when just getting started with the subject.
https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=UserInputEventsSink_OnDrag_Sample
I used to have an article on the subject of creating and using custom event handlers from within iLogic rules hosted in the knowledge.autodesk.com area back in 2020, but they took all user submitted articles down a year or so back. I still have most of what was in that article in a PDF, so I will attach that here. It is only a little more than would fit on one page, so not super in-depth or detailed, but may be a good starting point. It only contains one example code, but within that one code example, two event handlers are being used. Things could have been handled in a more robust way, but its an old example and I knew less then than I know now about these things. I have several other examples on hand, but some of them may contain company specific stuff that I would have to generalize or simplify. There is a limited list of events that we have access to 'handle' this way, and that PDF only shows 'most' of the main objects that have multiple events listed under each of them. There have been a few more added since then.
Wesley Crihfield

(Not an Autodesk Employee)