# Grasshopper1 class

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

```cs
public class Grasshopper1
```

A set of utility methods for converting Grasshopper 1.0 data and types into Grasshopper 2.0 data and types.

## Fields

- [DoNotAutoMigrate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/donotautomigrate.md): (static) If your migrator siphons over all relevant properties from a Grasshopper 1 object and you do not wish for the migration pipeline to set things like UserName, Activity state, Preview state and so on, then add a CustomValue with this key to prevent that automatic logic from running.
- [DoNotMigratePersistent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/donotmigratepersistent.md): (static) Add a value with this key in the object CustomValues to prevent persistent data from being copied by the automatic migration process.
- [DoNotMigratePreview](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/donotmigratepreview.md): (static) Add a value with this key in the object CustomValues to prevent the preview state from being automatically assigned.
- [Grasshopper1InstanceId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/grasshopper1instanceid.md): (static) Key for storing Grasshopper 1 instance IDs in the custom values of an object.
- [Grasshopper1SourceId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/grasshopper1sourceid.md): (static) Key for a Grasshopper 1 instance id naming this parameter as the source of that object's outgoing wires.
- [Grasshopper1TargetId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/grasshopper1targetid.md): (static) Key for a Grasshopper 1 instance id naming this parameter as the target of that object's incoming wires.
- [MigrationGroup](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/migrationgroup.md): (static) Key marking a group created to hold the objects replacing one Grasshopper 1 object.
- [MigrationRelay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/migrationrelay.md): (static) Key marking an object a migrator inserted purely to route data through a conversion.
- [MigrationRelayInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/migrationrelayinput.md): (static) Key for the routed input index on a component tagged with [Grasshopper1.MigrationRelay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/migrationrelay.md).
- [MigrationRelayOutput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/migrationrelayoutput.md): (static) Key for the routed output index on a component tagged with [Grasshopper1.MigrationRelay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/migrationrelay.md).

## Properties

- [BuildDate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/builddate.md): Gets a string describing the build date of Grasshopper 1.
- [ComponentType](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/componenttype.md): Gets the type which describes the IGH_Component interface as defined in Grasshopper 1.
- [DocObjectType](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/docobjecttype.md): Gets the type which describes the IGH_DocumentObject interface as defined in Grasshopper 1.
- [Instance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/instance.md): (static) Gets the Grasshopper 1.0 interop object, i.e. an instance of GrasshopperPlugin.GrasshopperInterop as exposed via the GetInteropObject() method on the Grasshopper 1.0 plugin object. Invoking this property will cause Grasshopper 1.0 to be loaded if it isn't already. This property will throw if the loading of Grasshopper 1.0 fails.
- [ParameterType](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/parametertype.md): Gets the type which describes the IGH_Param interface as defined in Grasshopper 1.
- [Version](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/version.md): Gets a string describing the version of Grasshopper 1.

## Methods

- [CreateAndMigrate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/createandmigrate.md): (2 overloads) Create a GH1 object, migrate it to the appropriate GH2 object(s) and position them at the specified location.
- [CreateDocument](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/createdocument.md): Create a new document wrapper from an existing file.
- [CreateDocumentFromXml](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/createdocumentfromxml.md): Create a new document wrapper from a Grasshopper 1 xml archive, such as the text which Grasshopper 1 places on the clipboard during a copy operation. Archives with both "Clipboard" and "Definition" root chunks are supported.
- [CreateObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/createobject.md): (2 overloads) Create the default instance of an IGH_DocumentObject, IGH_Component or IGH_Param which matches the given ComponentId.
- [CreateWrapper](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/createwrapper.md): Create an IGH_Param, IGH_Component or IGH_DocumentObject.
- [CreateXml](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/createxml.md): Serialize a Grasshopper 1 document object to an xml string.
- [HarvestThumbnail](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/harvestthumbnail.md): (static) Try and load the embedded thumbnail from a GH1 file. This method is static because it does not require Grasshopper 1 to be loaded first.
- [HarvestWires](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/harvestwires.md): Collect all wires in a Grasshopper 1 document.
- [ParameterPersistentData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/parameterpersistentdata.md): Extract the persistent data (if any) from a parameter.
- [ParameterVolatileData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/parametervolatiledata.md): Extract the volatile data (if any) from a parameter.
- [ReadDataFile](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/readdatafile.md): (2 overloads) Convert the contents of a data file into a collection of named trees.
- [WriteDataFile](https://developer.rhino3d.com/api/gh2/type/grasshopper2.interop.grasshopper1/writedatafile.md): (2 overloads) Create a Grasshopper 1.0 compliant data file from a set of named trees.
