# ModelComponent 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 abstract class ModelComponent : CommonObject
```

Base class for all components in a model (document) and manages the index, id and other information common to this type of objects.

This class parallels the C++ ON_ModelComponent.

**Derived types:** [BitmapEntry](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.bitmapentry.md), [DimensionStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.dimensionstyle.md), [File3dmEmbeddedFile](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.file3dmembeddedfile.md), [File3dmObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.file3dmobject.md), [File3dmRenderContent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.file3dmrendercontent.md), [Group](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.group.md), [HatchPattern](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchpattern.md), [InstanceDefinitionGeometry](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.instancedefinitiongeometry.md), [Layer](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.layer.md), [Linetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype.md), [Markup](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.markup.md), [Material](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.material.md), [PageViewGroup](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.pageviewgroup.md), [RhinoObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.rhinoobject.md), [SectionStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.sectionstyle.md), [TextureMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.texturemapping.md)

## Properties

- [ComponentStatus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/componentstatus.md): Gets or sets the component status of the model component.
- [ComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/componenttype.md): Gets the [ModelComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponenttype.md) for this object. Useful in switch statements.
- [DeletedName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/deletedname.md): Gets the name of a component that is deleted.
- [HasId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasid.md): Returns a value indicating whether the component has an ID.
- [HasIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasindex.md): Returns a value indicating whether the component has an Index.
- [HasName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/hasname.md): Returns a value indicating whether the component has a Name.
- [Id](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/id.md): Gets or sets the ID of the current instance.
- [IdIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/idislocked.md): Returns a value indicating whether the component ID is already locked.
- [Index](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/index.md): Gets or sets the model component index attribute.
- [IndexIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/indexislocked.md): Returns a value indicating whether the component Index is already locked.
- [InstanceDefinitionModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/instancedefinitionmodelserialnumber.md): When a component is in a model as part of the information required for a linked instance definition, this value identifies the linked instance definition reference model.
- [IsComponentStatusLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/iscomponentstatuslocked.md): The component status itself can be locked. This returns an indication.
- [IsDeleted](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/isdeleted.md): true if the component is deleted. Deleted components are kept by the document for undo purposes.
- [IsReference](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/isreference.md): Gets a value indicting whether this component is a referenced component. Referenced components are part of referenced documents.
- [IsSystemComponent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/issystemcomponent.md): True if this model component is a system constant. An incomplete list of system constant model components is below: ON_ModelComponent::Unset; ON_InstanceDefinition::Empty; ON_Linetype::Unset; ON_Linetype::Continuous; ON_Linetype::ByLayer; ON_Linetype::ByParent; ON_Layer::Unset; ON_Layer::Default; ON_TextStyle::Unset; ON_TextStyle::Default; ON_TextStyle::ByLayer; ON_TextStyle::ByParent; ON_DimStyle::Unset; ON_DimStyle::Default; ON_DimStyle::DefaultInchDecimal; ON_DimStyle::DefaultInchFractional; ON_DimStyle::DefaultFootInchArchitecture; ON_DimStyle::DefaultMillimeterSmall; ON_DimStyle::DefaultMillimeterLarge; ON_DimStyle::DefaultMillimeterArchitecture
- [ModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/modelserialnumber.md): A value identifying the model that manages this component.
- [Name](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/name.md): Gets or sets the name
- [NameIsLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/nameislocked.md): Returns a value indicating whether the component Name is already locked.
- [NamePathSeparator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/namepathseparator.md): (static) Returns the string "::". This is the string Rhino uses in layer full path names to separate the names of individual layers.
- [ReferenceModelSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/referencemodelserialnumber.md): When a component is in a model for reference, this value identifies the reference model.

## Methods

- [ClearId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearid.md): Resets the HasId property of the model component to false, if possible.
- [ClearIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearindex.md): Resets the HasIndex property of the model component to false, if possible.
- [ClearName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/clearname.md): Resets the HasName property of the model component to false, if possible.
- [DataCRC](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/datacrc.md): Increments the Cyclic Redundancy Check value by this instance.
- [IsValidComponentName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/isvalidcomponentname.md): (static) Tests for a valid model component name.
- [LockId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockid.md): Locks the component Id property.
- [LockIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockindex.md): Locks the component Index property.
- [LockName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/lockname.md): Locks the component Name property.
- [ModelComponentTypeIgnoresCase](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/modelcomponenttypeignorescase.md): (static) Informs the developer if a particular model component type will require case-ignoring searching within a document. This is currently true with groups; false otherwise.
- [ModelComponentTypeIncludesParent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/modelcomponenttypeincludesparent.md): (static) Informs the developer if a particular model component type will include the hash of the parent.
- [ModelComponentTypeRequiresUniqueName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/modelcomponenttyperequiresuniquename.md): (static) Informs the developer if a particular model component type will require uniqueness within a document. This is currently true with render materials and model geometry; false otherwise.
- [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/tostring.md): Returns the name of the model component type, and then its name and index.

## Inherited Members

- 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)
