# IGH_InitCodeAware interface

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 interface IGH_InitCodeAware
```

Implement this interface in your IGH_DocumentObject class if you want to handle initialization codes from Canvas Search boxes.

**Derived types:** [GH_DigitScroller](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-digitscroller.md), [GH_NumberSlider](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-numberslider.md), [GH_Panel](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-panel.md), [GH_Scribble](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-scribble.md)

## Methods

- [SetInitCode](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.igh-initcodeaware/setinitcode.md): This method will be called when the user inserts an object via the Canvas Search popup and supplies an "=XXXX" string init code. Do not throw exceptions in this method! Either handle the code correctly or ignore it.
