I strongly recommend you to use separate rule for each event handler. In the background you can call one external rule with specific arguments.
But to your question. It is possible but it can be little bit obscure and behavior can change in future without any information because it is not part of public iLogic API.
This code snippet show how to access underlying .NET call stack and print the called methods to the iLogic log. You need to analyze this callstack and determine which event runs this rule
Imports System.Diagnostics
'Get Call stack
Dim stackTrace As New StackTrace()
' Get method calls (frames)
Dim stackFrames As StackFrame() = stackTrace.GetFrames()
For Each stackFrame As StackFrame In stackFrames
'Write method name
Logger.Debug(StackFrame.GetMethod().Name)
Next
My results for
Part Geometry Changed event | Before Save Document event |
INFO| 19: >>--------------------------- DEBUG|Main DEBUG|ExecRuleInAssembly DEBUG|ExecRuleEval DEBUG|EvalRule DEBUG|EvalRule DEBUG|RuleRun DEBUG|VisitRule DEBUG|RunListOfRules DEBUG|RunInternalRules DEBUG|OnSurfaceBodyChanged DEBUG|InvokeMethod DEBUG|UnsafeInvokeInternal DEBUG|Invoke | INFO| 20: >>--------------------------- DEBUG|Main DEBUG|ExecRuleInAssembly DEBUG|ExecRuleEval DEBUG|EvalRule DEBUG|EvalRule DEBUG|RuleRun DEBUG|VisitRule DEBUG|RunListOfRules DEBUG|RunInternalRules DEBUG|mobjApplicationEvents_OnSaveDocument DEBUG|InvokeMethod DEBUG|UnsafeInvokeInternal DEBUG|Invoke |