## XSILoadPlugin

### Description

Called by Softimage to load a plug-in.

XSILoadPlugin registers plug-in items (such as commands, properties, and menus) and sets plug-in properties (such as the version number, the author name and e-mail address, and the location of the help file).

### Applies To

All plug-in items.

### Syntax

    public class <class_name>
    {
            public bool Load( PluginRegistrar in_reg )
            {
                    ...
            }
    }

    CStatus XSILoadPlugin( PluginRegistrar& in_reg )
    {
            ...
    }

    function XSILoadPlugin( in_reg )
    {
            ...
    }

    def XSILoadPlugin( in_reg ):
            ...

    Function XSILoadPlugin( in_reg )
            ...
    End Function

    sub XSILoadPlugin
    {
            my $in_reg = shift;
    }

### Parameters

Parameter | Language | Type | Description
--- | --- | --- | ---
in_reg | Scripting and C# | PluginRegistrar | The object used to register plug-in items and set plug-in properties.
| C++ | PluginRegistrar& |

### Examples

    function XSILoadPlugin( in_reg )
    {
            in_reg.Author = "sblair";
            in_reg.Name = "My_CommandPlugin";
            in_reg.Email = "";
            in_reg.URL = "";
            in_reg.Major = 1;
            in_reg.Minor = 0;

            in_reg.RegisterCommand("My_Command","My_Command");
            in_reg.RegisterMenu(siMenuTbGetPropertyID,"My_Command_Menu",false,false);
            //RegistrationInsertionPoint - do not remove this line

            return true;
    }

    SICALLBACK XSI::CStatus XSILoadPlugin( XSI::PluginRegistrar& in_reg )
    {
            in_reg.PutAuthor( L"Softimage" );

            in_reg.PutName( L"VertexColors SDKExample" );
            in_reg.PutVersion( 1, 0 );

            in_reg.RegisterCustomDisplay( L"VertexColorsSDKExample" );

            return XSI::CStatus::OK;
    }

    import win32com.client
    from win32com.client import constants

    null = None
    false = 0
    true = 1

    def XSILoadPlugin( in_reg ):
            in_reg.Author = "sblair"
            in_reg.Name = "MyPythonCommandPlugin"
            in_reg.Email = ""
            in_reg.URL = ""
            in_reg.Major = 1
            in_reg.Minor = 0

            in_reg.RegisterCommand("MyPythonCommand","MyPythonCommand")
            in_reg.RegisterMenu(constants.siMenuMainHelpID,"MyPythonCommand_Menu",false,false)
            #RegistrationInsertionPoint - do not remove this line

            return true

### See Also

- PluginRegistrar.RegisterCommand
- PluginRegistrar.RegisterEvent
- PluginRegistrar.RegisterTimerEvent
- PluginRegistrar.RegisterFilter
- PluginRegistrar.RegisterMenu
- PluginRegistrar.RegisterOperator
- PluginRegistrar.RegisterProperty

C++ plug-ins can also register custom displays, display passes, and display callbacks using these PluginRegistrar member functions:

- PluginRegistrar::RegisterCustomDisplay
- PluginRegistrar::RegisterDisplayPass
- PluginRegistrar::RegisterDisplayCallback