# InstanceDefinition class

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

```cs
public sealed class InstanceDefinition : InstanceDefinitionGeometry
```

This is the same as [InstanceDefinitionGeometry](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry.md), but in a Rhino document.

## Properties

- [ArchiveFileStatus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/archivefilestatus.md): Returns the archive file status of a linked instance definition.
- [ComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/componenttype.md): Returns [ModelComponentType.InstanceDefinition](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponenttype.md).
- [Index](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/index.md): Index of this instance definition in the index definition table.
- [IsDeleted](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/isdeleted.md): Returns true if this instance definition is deleted. Deleted object are not saved to a file archive.
- [IsReference](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/isreference.md): An object from a work session reference model is reference a reference object and cannot be modified. An object is a reference object if, and only if, it is on a reference layer.
- [IsTenuous](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/istenuous.md): True if this instance definition is from a linked file. It will be saved only if it is referenced by an instance reference object that is in the active geometry list and is being saved. Note that there can be multiple linked instance definitions with references to tenuous instance definitions.
- [LayerStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/layerstyle.md): Specifies how model components (layers, materials, dimension styles, etc.) from linked instance definition files appear in the active model.
- [ObjectCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/objectcount.md): Number of objects this definition uses. This counts the objects that are used to define the geometry. This does NOT count the number of references to this instance definition.
- [SkipNestedLinkedDefinitions](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/skipnestedlinkeddefinitions.md): This property applies when an instance definition is linked. If true, when reading the file that defines the content of the linked instance definition, skip any linked instance definitions found in that file. If false, when reading the file that defines the content of the linked instance definition, recursively load linked instance definitions found in that file.
- [SourceArchive](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/sourcearchive.md): Gets the full file path for linked instance definitions.
- [UnitSystem](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/unitsystem.md): Gets the unit system of the instance definition. If the instance definition was imported from another 3dm file, the unit system may differ from that of the document.
- [UpdateType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/updatetype.md)

## Methods

- [CreatePreviewBitmap](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/createpreviewbitmap.md): (6 overloads) Creates a preview bitmap of the instance definition.
- [Equals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/equals.md): Equality is checked against InstanceDefinition.Id
- [GetContainers](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/getcontainers.md): Gets a list of all the InstanceDefinitions that contain a reference this InstanceDefinition.
- [GetHashCode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/gethashcode.md): Use Id.GetHashCode()
- [GetObjects](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/getobjects.md): Gets an array with the objects that belong to this instance definition.
- [GetReferences](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/getreferences.md): Gets a list of the CRhinoInstanceObjects (inserts) that contains a reference this instance definition.
- [InUse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/inuse.md): Determines whether the instance definition is referenced.
- [Object](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/object.md): returns an object used as part of this definition.
- [UseCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/usecount.md): (2 overloads) Returns the number of references of this instance definition in the model. Both top-level references and nested instances are included in the count.
- [UsesDefinition](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/usesdefinition.md): Determines if this instance definition contains a reference to another instance definition.
- [UsesLayer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/useslayer.md): Returns true if some object in the instance definition is on the layer with the specified layer index.
- [UsesLinetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.instancedefinition/useslinetype.md): Returns true if some object in the instance definition references the linetype with the specified linetype index.

## Inherited Members

- From [InstanceDefinitionGeometry](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry.md): [Description](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/description.md), [IsLinkedType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/islinkedtype.md), [SourceArchiveRelativePath](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/sourcearchiverelativepath.md), [Url](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/url.md), [UrlDescription](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/urldescription.md), [UserStringCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/userstringcount.md), [DeleteAllUserStrings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/deletealluserstrings.md), [DeleteUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/deleteuserstring.md), [GetObjectIds](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/getobjectids.md), [GetUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/getuserstring.md), [GetUserStrings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/getuserstrings.md), [SetUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry/setuserstring.md)
- From [ModelComponent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent.md): [ComponentStatus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/componentstatus.md), [DeletedName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/deletedname.md), [HasId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasid.md), [HasIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasindex.md), [HasName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasname.md), [Id](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/id.md), [IdIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/idislocked.md), [IndexIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/indexislocked.md), [InstanceDefinitionModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/instancedefinitionmodelserialnumber.md), [IsComponentStatusLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/iscomponentstatuslocked.md), [IsSystemComponent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/issystemcomponent.md), [ModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/modelserialnumber.md), [Name](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/name.md), [NameIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/nameislocked.md), [ReferenceModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/referencemodelserialnumber.md), [ClearId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearid.md), [ClearIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearindex.md), [ClearName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearname.md), [DataCRC](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/datacrc.md), [LockId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockid.md), [LockIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockindex.md), [LockName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockname.md), [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/tostring.md)
- From [CommonObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject.md): [Disposed](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/disposed.md), [HasUserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/hasuserdata.md), [IsDocumentControlled](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isdocumentcontrolled.md), [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalid.md), [UserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdata.md), [UserDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdictionary.md), [ConstructConstObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/constructconstobject.md), [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/dispose.md), [EnsurePrivateCopy](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/ensureprivatecopy.md), [GetObjectData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/getobjectdata.md), [IsValidWithLog](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalidwithlog.md), [NonConstOperation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/nonconstoperation.md), [OnSwitchToNonConst](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/onswitchtononconst.md), [ToJSON](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/tojson.md)
