# GH_UserObject class

Namespace: [Grasshopper.Kernel](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.kernel.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_UserObject
```

Represents a custom user object. A User Object is an existing IGH_DocumentObject with overridden icon, instance description and exposure.

## Constructors

- [GH_UserObject](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/ctor.md): (2 overloads) Empty constructor

## Properties

- [BaseGuid](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/baseguid.md): Gets or sets the ComponentID of the IGH_DocumentObject that functions as the base class for this User Object.
- [Data](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/data.md): Gets or sets the serialized data. This data is used to deserialize a new instance of the base class.
- [Description](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/description.md): Gets or sets the Instance Description override for this User Object.
- [Exposure](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/exposure.md): Gets or sets the Exposure of this User Object.
- [Guid](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/guid.md): Gets or sets the Guid of this User Object. The Guid is created anew during construction and is not stored in the User Object File. You should never have to set this field.
- [Icon](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/icon.md): Gets or sets the icon associated with this User Object. If the icon hasn't been overridden, then a Default icon is returned.
- [Path](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/path.md): Gets or sets the file path this User Object is loaded from or saved to.

## Methods

- [Clear](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/clear.md): Destroy all data except the file path and the ID.
- [CreateDefaultPath](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/createdefaultpath.md): Set the Path field for this user object to the default. The default file name is derived from the Description.Name field. This method also ensures the UserObject directory exists.
- [InstantiateObject](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/instantiateobject.md): Instantiate a new IGH_DocumentObject from this User Object.
- [ReadFromFile](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/readfromfile.md): Force an update of the local data from the file. The Path field must be set for this to work.
- [SaveToFile](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/savetofile.md): Save the current User Object state to a file. Any existing file will be overwritten.
- [SetDataFromObject](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-userobject/setdatafromobject.md): Set the Data field content of ths UserObject from a Document object instance.
