OnSelectionChange (XSIApplication)
Description
Fired when the selection state has changed, such as a SelectObj command.
This event is installed using the XSIApplication.Advise method and can be removed using the XSIApplication.Unadvise method, please see these methods for a detailed example of installing and uninstalling events.
The event may be temporarily muted via the EventInfo.Mute property. All installed events can be viewed in the plugin manager dialog's event tab.
NOTE: The prefered and alternative method of installing this is event is as a self-installing plugin. See PluginRegistrar.RegisterEvent method for more details.
Scripting Syntax
XSIApplication.OnSelectionChange ([CustomData], [ChangeType])
Parameters
Parameter |
Type |
Description |
CustomData |
Variant |
Custom data passed to the event handler. This argument is optional; you can specify one when binding an event with XSIApplication.Advise. The data is passed to the event handler whenever the event is fired, an empty value is passed if no custom data is specified. |
ChangeType |
siSelectionChangeType |
Type of operation performed on the selection. |
Examples
1. VBScript Example
function XSIApplication_OnSelectionChange( CustomData, ChangeType ) call Application.LogMessage( "*** VBScript Event - XSIApplication_OnSelectionChange ***") end function
2. JScript Example
function XSIApplication::OnSelectionChange( CustomData, ChangeType )
{
Application.LogMessage( "*** JScript Event - XSIApplication::OnSelectionChange ***");
// your code here
}
3. PerlScript Example
sub XSIApplication_OnSelectionChange
{
my ($CustomData, $ChangeType) = @_;
$Application->LogMessage( "*** PerlScript Event - XSIApplication_OnSelectionChange ***");
# your code here
}
4. Python Example
def XSIApplication_OnSelectionChange( data, changetype ): Application.LogMessage( '*** PythonScript Event - XSIApplication_OnSelectionChange ***' ) # your code here return 0
See Also
PluginRegistrar.RegisterEvent |
XSIApplication.EventInfos |