# LinetypeTable 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 LinetypeTable : RhinoDocCommonTable<Linetype>, ICollection<Linetype>
```

## Properties

- [ActiveCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/activecount.md): Returns number of linetypes in the linetypes table, excluding deleted linetypes.
- [ByLayerLinetypeName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/bylayerlinetypename.md): Returns the text name of the by-layer linetype.
- [ByParentLinetypeName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/byparentlinetypename.md): Returns the text name of the by-parent linetype.
- [ComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/componenttype.md)
- [ContinuousLinetypeName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/continuouslinetypename.md): Returns the text name of the continuous linetype.
- [Count](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/count.md): Returns number of linetypes in the linetypes table, including deleted linetypes.
- [CurrentLinetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/currentlinetype.md): Returns reference to the current linetype. Note that this reference may become invalid after a call to AddLinetype().
- [CurrentLinetypeIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/currentlinetypeindex.md): At all times, there is a "current" linetype. Unless otherwise specified, new objects are assigned to the current linetype. If the current linetype source is LinetypeFromLayer the object's layer's linetype is used instead.
- [CurrentLinetypeSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/currentlinetypesource.md): Source used by an object to determine its current linetype to be used by new objects.
- [Document](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/document.md): Document that owns this table.
- [LinetypeScale](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/linetypescale.md): For display in Rhino viewports, the linetypes are scaled by a single scale factor for all viewports. This is not used for printing, where all linetype patterns are scaled to print in their defined size 1:1 on the paper.

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/item.md): Conceptually, the linetype table is an array of linetypes. The operator[] can be used to get individual linetypes. A linetype is either active or deleted and this state is reported by Linetype.IsDeleted.

## Methods

- [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/add.md): (2 overloads) Adds a new linetype with specified definition to the linetype table.
- [AddReferenceLinetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/addreferencelinetype.md): Adds a reference linetypes that will not be saved in files.
- [Delete](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/delete.md): (3 overloads) Deletes multiple linetypes.
- [Find](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/find.md): (3 overloads) Finds a linetype with a matching ID.
- [FindIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/findindex.md): Retrieves a Linetype object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.
- [FindName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/findname.md): Finds the linetype with a given name.
- [GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/getenumerator.md)
- [GetUnusedLinetypeName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/getunusedlinetypename.md): (2 overloads) Gets unused linetype name used as default when creating new linetypes.
- [LinetypeIndexForObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/linetypeindexforobject.md): Returns the effective linetype index to be used to find the linetype definition to draw an object. If an object's linetype source is LinetypeFromObject, the linetype index in the object's attributes is used. If an object's linetype source is LinetypeFromLayer the linetype index from the object's layer is used.
- [LoadDefaultLinetypes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/loaddefaultlinetypes.md): (2 overloads) Fills in the linetype table with any default linetypes not already included.
- [Modify](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/modify.md): Modify linetype settings.
- [PurgeUnused](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/purgeunused.md): Purges any unused linetypes.
- [SetCurrentLinetypeIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/setcurrentlinetypeindex.md): At all times, there is a "current" linetype. Unless otherwise specified, new objects are assigned to the current linetype. The current linetype is never deleted.
- [ICollection<Linetype>.Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/system-collections-generic-icollection-rhino-docobjects-linetype-add.md)
- [Undelete](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/undelete.md): Restores a linetype that has been deleted.
- [UndoModify](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.linetypetable/undomodify.md): If the linetype has been modified and the modification can be undone, then UndoModify() will restore the linetype to its previous state.

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