Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have some basic c# code to catch the OnNewOccurence event and this was working fine at first but now its returning null as the occurence. The EventTimingEnum is also passed in as "Before", not sure if its related. Would there be a reason for this? I can't figure out what changed that would have made it stop working. The other parameters like DocumentObject and Context are being returned fine.
private void AssemblyEvents_OnNewOccurrence(_AssemblyDocument DocumentObject, ComponentOccurrence Occurrence, EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode)
{
if (PartBeingPlaced != null)
{
HandlingCode = HandlingCodeEnum.kEventHandled;
}
else
{
//HandlingCode = HandlingCodeEnum.kEventNotHandled;
}
HandlingCode = HandlingCodeEnum.kEventHandled;
}
Solved! Go to Solution.