This is kind of a two part question.
So I have made some IUpdaters that monitor for (and block) certain actions based on a person’s username being on a list of approved names. They work great in isolation, but I came across a problem that they are triggered on Reload Latest. Essentially, here’s what happens:
1.Person A (who is Allowed to make a change) makes their change and syncs.
2. Person B who is not allowed to make the change syncs or reloads latest and gets swatted down as if They are making the change themselves.
My thinking was to try to create some kind of flag that would let the Updater know that it’s being triggered by a reload. I tried using the DocumentChanged event and checking transaction names for “Reload Latest”. This worked in that I could detect that a reload was happening. The problem was at that point, the changes have already happened. Then I came across the DocumentReloadingLatest Event, which is supposed to trigger BEFORE the reload latest starts. However, I can’t seem to get this event to trigger. This is how I’m registering it:
def reloading(sender, args):
print "TRIGGERED"
__revit__.Application.DocumentReloadingLatest += reloading
Has anyone ever used this event before? I noticed that there isn’t a built in hook for it in the pyRevitDevHooks, so maybe there is something funky with it?
Thanks !