# PlugIn class

Namespace: [Rhino.PlugIns](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.plugins.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class PlugIn
```

A general purpose utility plug-in that can contain one or more commands.

**Derived types:** [DigitizerPlugIn](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.digitizerplugin.md), [FileExportPlugIn](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.fileexportplugin.md), [FileImportPlugIn](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.fileimportplugin.md), [RenderPlugIn](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.renderplugin.md)

## Constructors

- [PlugIn](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/ctor.md)

## Properties

- [AddToHelpMenu](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/addtohelpmenu.md): Called by Rhino to determine if the plug-in name should be added to the Rhino Help/Plug-ins menu.
- [AskOnLoadProtection](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/askonloadprotection.md): (static) If true, Rhino will display a warning dialog when load-protected plug-ins are attempting to load. If false, load-protected plug-ins will silently not load.
- [Assembly](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/assembly.md): Source assembly for this plug-in.
- [Description](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/description.md): Returns the description of the plug-in, as found in the plug-in's assembly attributes.
- [Id](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/id.md): Returns the Guid, or unique Id, of the plug-in.
- [InstalledPlugInCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/installedplugincount.md): (static) Returns the number of installed Rhino plug-ins.
- [LicenseId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/licenseid.md)
- [LoadAtStartup](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/loadatstartup.md): (obsolete)
- [LoadTime](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/loadtime.md): Plug-ins are typically loaded on demand when they are first needed. You can change this behavior to load the plug-in at during different stages in time by overriding this property.
- [LocalPlugInName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/localpluginname.md): Optionally override this to provide a localized plug-in name
- [Name](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/name.md): Returns the name of the plug-in, as found in the plug-in's assembly attributes.
- [Settings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/settings.md): Persistent plug-in settings.
- [SettingsDirectory](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/settingsdirectory.md): Get the plug-in's settings directory. This is the directory where the plug-in's persistent settings files are saved. This directory will be located in the user's profile folder. Note, this does not verify the directory exists.
- [SettingsDirectoryAllUsers](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/settingsdirectoryallusers.md): Get the plug-in's "all users" settings directory. This directory will be located in the system's program data folder. Note, this does not verify the directory exists.
- [Version](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/version.md): Returns the version of the plug-in, as found in the plug-in's assembly attributes.
- [WindowPositionSettings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/windowpositionsettings.md)

## Methods

- [AskUserForLicense](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/askuserforlicense.md)
- [CommandSettings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/commandsettings.md)
- [CreateCommands](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/createcommands.md): Called right after plug-in is created and is responsible for creating all of the commands in a given plug-in. The base class implementation Constructs an instance of every publicly exported command class in your plug-in's assembly.
- [DisplayHelp](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/displayhelp.md): Called by Rhino if AddToHelpMenu is true and menu item associated with this plug-in is selected.
- [DocumentPropertiesDialogPages](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/documentpropertiesdialogpages.md): Override this function if you want to extend the document properties sections of the options dialog. This function is called whenever the user brings up the Options dialog.
- [Find](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/find.md): (2 overloads, static) Finds the plug-in instance that was loaded from a given assembly.
- [FlushSettingsSavedQueue](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/flushsettingssavedqueue.md): (static)
- [GetCommands](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getcommands.md): All of the commands associated with this plug-in.
- [GetEnglishCommandNames](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getenglishcommandnames.md): (static) Gets names of all "non-test" commands for a given plug-in.
- [GetInstalledPlugInFolders](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getinstalledpluginfolders.md): (static)
- [GetInstalledPlugInNames](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getinstalledpluginnames.md): (3 overloads, static) Returns the names of all installed Rhino plug-ins.
- [GetInstalledPlugIns](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getinstalledplugins.md): (2 overloads, static) Get a list of all registered plug-in's regardless of if they are loaded or not.
- [GetLicense](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getlicense.md): (2 overloads) Verifies that there is a valid product license for your plug-in, using the Rhino licensing system. If the plug-in is installed as a standalone node, the locally installed license will be validated. If the plug-in is installed as a network node, a loaner license will be requested by the system's assigned Zoo server. If the Zoo server finds and returns a license, then this license will be validated. If no license is found, then the user will be prompted to provide a license key, which will be validated.
- [GetLicenseOwner](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getlicenseowner.md): Get the customer name and organization used when entering the product license.
- [GetLoadProtection](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getloadprotection.md): (static) Get load protection state for a plug-in
- [GetPlugInInfo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getplugininfo.md): (static) Returns detailed information about an installed Rhino plug-in.
- [GetPlugInObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getpluginobject.md)
- [GetPluginSettings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/getpluginsettings.md): (static)
- [Icon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/icon.md): Returns the plug-in's icon in bitmap form.
- [IdFromFileName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/idfromfilename.md): (static) Attempt to get a plugiin id from just the filename of a plug-in
- [IdFromName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/idfromname.md): (static) Gets the id of an installed plug-in giving the plug-in's name.
- [IdFromPath](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/idfrompath.md): (static) Gets the id of an installed plug-in giving the plug-in's file path.
- [IsTextureSupported](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/istexturesupported.md): Returns true if this renderer can render the texture natively without needing it to be baked into a bitmap, false otherwise. By default, returns false for all textures.
- [LoadComputeExtensionPlugins](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/loadcomputeextensionplugins.md): (static) Used by compute's startup code to load plug-ins that have registered custom endpoints
- [LoadPlugIn](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/loadplugin.md): (3 overloads, static) Loads an installed plug-in.
- [NameFromPath](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/namefrompath.md): (static) Gets a plug-in name for an installed plug-in given the path to that plug-in.
- [ObjectPropertiesPages](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/objectpropertiespages.md): (2 overloads) Override this function is you want to extend the object properties dialog
- [OnLoad](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/onload.md): Is called when the plug-in is being loaded.
- [OnShutdown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/onshutdown.md)
- [OptionsDialogPages](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/optionsdialogpages.md): Override this function if you want to extend the options dialog. This function is called whenever the user brings up the Options dialog.
- [PathFromId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/pathfromid.md): (static) Gets the path to an installed plug-in given the id of that plug-in
- [PathFromName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/pathfromname.md): (static) Gets the path to an installed plug-in given the name of that plug-in
- [PlugInExists](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/pluginexists.md): (static) Verifies that a Rhino plug-in is installed.
- [RaiseOnPlugInSettingsSavedEvent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/raiseonpluginsettingssavedevent.md): (static) Raise any pending OnPlugInSettingsSaved events, the events are normally queued while a command is running and fired while Rhino is in an idle state. Calling this method will raise any pending changed events regardless of Rhino's current idle state or if a command is running.
- [ReadDocument](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/readdocument.md): Called whenever a Rhino document is being loaded and plug-in user data was encountered written by a plug-in with this plug-in's GUID.
- [RegisterCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/registercommand.md)
- [ResetMessageBoxes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/resetmessageboxes.md)
- [ReturnLicense](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/returnlicense.md): Returns, or releases, a product license that was obtained from the Rhino licensing system. Note, most plug-ins do not need to call this as the Rhino licensing system will return all licenses when Rhino shuts down.
- [SavePluginSettings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/savepluginsettings.md): (static)
- [SaveSettings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/savesettings.md): Write settings to disk which will raise a [PlugIn.SettingsSaved](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/settingssaved.md) event.
- [SetLicenseCapabilities](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/setlicensecapabilities.md)
- [SetLoadProtection](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/setloadprotection.md): (static) Set load protection state for a certain plug-in
- [ShouldCallWriteDocument](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/shouldcallwritedocument.md): Called whenever a Rhino is about to save a .3dm file. If you want to save plug-in document data when a model is saved in a version 5 .3dm file, then you must override this function to return true and you must override WriteDocument().
- [WriteDocument](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/writedocument.md): Called when Rhino is saving a .3dm file to allow the plug-in to save document user data.

## Events

- [SettingsSaved](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/settingssaved.md): This event is raised when an instance of Rhino has modified the external settings file associated with this plug-in's [PlugIn.Settings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/settings.md) property.
- [UnknownUserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.plugins.plugin/unknownuserdata.md): (static) This event is raised when a 3dm file is loaded with unknown user data, and the plug-in to handle it could not be loaded.
