Method SetEventScript
SetEventScript(EventScriptType, string?)
Sets the script to be run on the specified object event.
public void SetEventScript(EventScriptType eventType, string? script)
Parameters
eventTypeEventScriptTypeThe event to be assigned.
scriptstringThe new script to assign to this event.
Exceptions
- InvalidOperationException
Thrown if setting the event script failed. This can be from an invalid event script type, or this event is locked as a service has subscribed to this event. See IsEventLocked(EventScriptType) to determine if an event script can be changed.
- ArgumentOutOfRangeException
Thrown if the specified script name is invalid.