Message 1 of 1
Documentevent OnChange Event not firing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello again,
I'm trying to implement the Documentevent onChange in c# but it doesn't fire.
public void AppEvent_OnActivateDocument_Handler(_Document DocumentObject, EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode) { if (BeforeOrAfter == EventTimingEnum.kAfter) { DocumentObject.DocumentEvents.OnChangeSelectSet += DocumentEvents_OnChangeSelectSet; DocumentObject.DocumentEvents.OnChange += DocumentEvents_OnChange; } HandlingCode = HandlingCodeEnum.kEventHandled; } private void DocumentEvents_OnChange(CommandTypesEnum ReasonsForChange, EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode) { HandlingCode = HandlingCodeEnum.kEventNotHandled; }
private void DocumentEvents_OnChangeSelectSet(EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode)
{
HandlingCode = HandlingCodeEnum.kEventNotHandled;
}
The problem is that the OnChange doesn't react in contrast to the OnChangeSelectSet which works like it should.
The help docs say following: "
Fires when this document changes, supplying the reasons for change and the context in which this action is being taken."
This should include all changes to the document including parameterchanges, modelchanges, etc. (but no viewchanges or measurements, like described at the bottom of the help page)
Anyone can point me to the solution, please? What have I done wrong in my code?
Thank you in advance
BG
Hel