# InstanceDefinitionTable class

Namespace: [Rhino.DocObjects.Tables](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.docobjects.tables.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public sealed class InstanceDefinitionTable : RhinoDocCommonTable<InstanceDefinition>
```

## Properties

- [ActiveCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/activecount.md): Number of items in the instance definitions table, excluding deleted definitions.
- [ComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/componenttype.md)
- [Count](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/count.md): Number of items in the instance definitions table.
- [Document](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/document.md): Document that owns this table.

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/item.md): Conceptually, the InstanceDefinition table is an array of Instance definitions. The operator[] can be used to get individual instance definition. An instance definition is either active or deleted and this state is reported by IsDeleted or will be null if it has been purged from the document.

## Methods

- [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/add.md): (6 overloads) Adds an instance definition to the instance definition table.
- [Compact](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/compact.md): Purge deleted instance definition information that is not in use. This function is time consuming and should be used in a thoughtful manner.
- [CreateFromFile](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/createfromfile.md): (2 overloads) Creates an instance definition by reading a file, the way the Insert command does when inserting a file as a block. No instance reference is created.
- [Delete](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/delete.md): (2 overloads) Deletes the instance definition. This deletes all references too.
- [DestroySourceArchive](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/destroysourcearchive.md): Destroys all source archive information. Specifically:[InstanceDefinitionGeometry.SourceArchive](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/sourcearchive.md) is set to the empty string.; SourceRelativePath is set to false; The alternative source archive path is set to the empty string.; Checksum.Zero() is used to private destroy all checksum information.; [InstanceDefinition.UpdateType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/updatetype.md) is set to [InstanceDefinitionUpdateType.Static](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinitionupdatetype.md).
- [Export](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/export.md): Exports the block definition's component objects to one of the file formats supported by Rhino.
- [Find](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/find.md): (3 overloads) Finds the instance definition with a given id.
- [GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/getenumerator.md)
- [GetList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/getlist.md): Gets an array of instance definitions.
- [GetUnusedInstanceDefinitionName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/getunusedinstancedefinitionname.md): (3 overloads) Gets unused instance definition name used as default when creating new instance definitions.
- [InstanceDefinitionIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/instancedefinitionindex.md): Get the index of the instance definition with a given id.
- [MakeSourcePathRelative](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/makesourcepathrelative.md): (obsolete) Obsolete method that always returns false. Marks the source path for a linked instance definition as relative or absolute.
- [Modify](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/modify.md): (5 overloads) Modifies the instance definition name and description. Does not change instance definition ID or geometry.
- [ModifyGeometry](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/modifygeometry.md): (3 overloads)
- [ModifyInsertionPlane](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/modifyinsertionplane.md): Modifies the insertion plane of an instance definition. The definition's geometry is re-origined so that the supplied plane becomes the new insertion plane - its origin is the new insertion point and its axes become the definition's axes. Existing instance references are not modified, so they will appear to move. Only embedded instance definitions are supported; the function returns false for linked definitions.
- [ModifyInsertionPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/modifyinsertionpoint.md): Modifies the insertion point of an instance definition. The definition's geometry is re-origined so that the supplied point becomes the new insertion point - the point that aligns with the insertion location when the block is inserted. Existing instance references are not modified, so they will appear to move. Only embedded instance definitions are supported; the function returns false for linked definitions.
- [ModifySourceArchive](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/modifysourcearchive.md): (3 overloads) If the instance definition is linked or embedded, use SetSource to specify the source archive.
- [Purge](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/purge.md): Purges an instance definition and its definition geometry.
- [PurgeUnused](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/purgeunused.md): Purges any unused instance definitions.
- [RefreshLinkedBlock](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/refreshlinkedblock.md): Reload linked block definitions and update the Rhino display.
- [Undelete](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/undelete.md): Undeletes an instance definition that has been deleted by Delete()
- [UndoModify](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/undomodify.md): Restores the instance definition to its previous state, if the instance definition has been modified and the modification can be undone.
- [UpdateLinkedInstanceDefinition](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.instancedefinitiontable/updatelinkedinstancedefinition.md): Read the objects from a file and use them as the instance's definition geometry.

## Inherited Members

- From [CommonComponentTable<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1.md): [Clear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1/clear.md), [FindId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1/findid.md)
