# Plugin class

Namespace: [Grasshopper2.Framework](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.framework.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public abstract class Plugin
```

Every grasshopper plugin assembly must implement a single public type with a public, parameter-less constructor derived from this class.

**Derived types:** [GrasshopperCorePlugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.grasshoppercoreplugin.md)

## Constructors

- [Plugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/ctor.md): Base constructor. Plugin identity (id, name, info and version) is by default sourced from assembly attributes — see the individual properties.

## Properties

- [Assembly](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/assembly.md): Gets the plugin assembly.
- [Author](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/author.md): Name of plugin author. By default this is read from the Rhino `[assembly: PlugInDescription(DescriptionType.Organization)]` attribute, falling back to `[assembly: AssemblyCompany]`.
- [Contact](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/contact.md): Contact details of plugin author. By default this is read from the Rhino `[assembly: PlugInDescription(DescriptionType.Email)]` attribute.
- [Copyright](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/copyright.md): plugin copyright message. By default this is read from the `[assembly: AssemblyCopyright]` attribute. Since that attribute is a compile-time constant, a `{now}` placeholder within it is expanded to the current year when the plugin is loaded.
- [DefaultLicence](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/defaultlicence.md): (static) Gets the default description for licences which tracks the Rhino licence, based on the the local user name and organisation.
- [DocumentationFolder](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/documentationfolder.md): Gets the documentation folder for this plugin. Ideally this folder contains subfolders for supported languages such as "English" and "Deutsch" etc. Grasshopper will then know which one to pick based on current language settings. If no language subfolders exist, the folder contents are used directly. By default, any folder called "Documentation" next to the plugin assembly will be returned, or otherwise the folder which contains all *.term, *.spec, and *.topic files within the assembly folder.
- [ExportedTypes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/exportedtypes.md): Iterate over all exported types in the plugin assembly, and all satellite assemblies.
- [Icon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/icon.md): Gets the icon for this plugin. The icon may be null.
- [Id](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/id.md): Gets the ID of this plugin. By default this is read from the `[assembly: Guid]` attribute, which is the same id Rhino uses to identify the plugin.
- [Info](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/info.md): Gets a short description of this plugin. By default this is read from the `[assembly: AssemblyDescription]` attribute.
- [LicenceAgreement](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/licenceagreement.md): Gets the licence agreement text for this plugin. If the agreement string starts with 'http' or 'www' a web-address lookup is implied.
- [LicenceDescription](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/licencedescription.md): Gets the licence description for this plugin, for example 'trial', 'commercial', 'free', 'educational'...
- [Location](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/location.md): Gets the location from which this plugin was loaded.
- [Name](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/name.md): Gets the name of this plugin. By default this is read from the `[assembly: AssemblyTitle]` attribute.
- [PluginDocumentObjectTypes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/plugindocumentobjecttypes.md): Iterate over all IDocumentObject types this plugin exposes.
- [SatelliteAssemblies](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/satelliteassemblies.md): Override this method if this plugin has satellite assemblies which provide additional components, conversion methods, type assistants etc.
- [Version](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/version.md): Gets the version of this particular build of this plugin. By default this is read from the `[assembly: AssemblyFileVersion]` attribute, which is the same version Rhino reports for the plugin (the build date stamp).
- [Website](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/website.md): URL of plugin home page. By default this is read from the Rhino `[assembly: PlugInDescription(DescriptionType.WebSite)]` attribute.

## Methods

- [HarvestCustomTypes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/harvestcustomtypes.md): Perform custom type creation, in case your plugin does not ship with compiled types.
- [Loaded](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/loaded.md): Gets whether the plugin has been loaded by GH2
- [OnLoaded](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/onloaded.md): This method will be called after type harvesting completes, but before the plugin is added to the available framework. Throw from this method to prevent this plugin from becoming available.
- [OwnsAssistant](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/ownsassistant.md): Gets whether this plugin owns a particular type assistant type.
- [OwnsDataType](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/ownsdatatype.md): Gets whether this plugin owns a particular data type.
- [OwnsObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/ownsobject.md): Gets whether this plugin owns a particular document object type.
- [PlugInDescription](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.plugin/plugindescription.md): Reads a Rhino [PlugInDescriptionAttribute](https://mcneel-apidocs-rhinocommon-7f6eb10c6967.herokuapp.com/api/rhinocommon/type/rhino.plugins.plugindescriptionattribute/) of the given kind from the plugin assembly, returning an empty string when it is absent. These are the same attributes Rhino's plugin manager reads.
