» Back to Documentation

IGlobal is, as its name suggest, global interface to 3dsmax SDK. It provides all globally defined static methods, access to each namespace, and also access to constructors to create new instances of classes.

You can get a reference to IGlobal in two ways:

  1. By declaring an IPlugin- derived class that takes IGlobal in its constructor. For example:

    public class MyPlugin: IPlugin
    {
           public void Initialize( IGlobal global, ISynchronizeInvoke sync )
           {
                    // Use or store global for later use...
           }

           public void Cleanup()
           {
           }
    }
  2. By declaring a Autodesk.Max.Plugins.ClassDesc - derived class which takes IGlobal in its constructor. For example:

    public class MyClassDesc : Autodesk.Max.Plugins.ClassDesc
    {
            IGlobal global;
            public AnchorClassDesc( IGlobal global )
            {
                this.global = global;
            }
    }

You can then store and use IGlobal reference throughout the lifetime of your plugin.