app.EventsEnabled
Global event switch. Turn it off during batch runs to cut the stutter from callbacks; turn it back on afterwards.
Signature
app.EventsEnabled
Notes
Global event switch. Turn it off during batch runs to cut the stutter from callbacks; turn it back on afterwards.
Python example (runnable)
Requires
pywin32. The example assumes app / doc / page / layer are already connected.
See Connection & InitPython
print("Event switch was: ", app.EventsEnabled)
app.EventsEnabled = False # off during batch work
# ... a pile of edits ...
app.EventsEnabled = True # always turn it back on
print("Event switch restored: ", app.EventsEnabled)
About this section: Events
Events — waiting for user interaction.
- This section has 4 entries; this is one of them.
- See the full section index: Events
Other entries in this section
- doc.GetUserClick(Prompt)Pauses the script until the user clicks the canvas, then returns that
- doc.GetUserArea(Message)Has the user drag out a rectangle and returns it. The right primitive
- app.AdviseEvents(...) / UnadviseEvents(...)Event hooks are a VBA feature. Reaching them from Python over COM effe