# Linetype 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
[Serializable]
public sealed class Linetype : ModelComponent
```

## Constructors

- [Linetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/ctor.md): (2 overloads)

## Properties

- [AlwaysModelDistances](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/alwaysmodeldistances.md): Linetype patterns and widths are typically interpreted as distances on the printed output when printing. In this case AlwaysModelDistances is false (default). When set to true, the linetype pattern and width will be interpreted as being in world distances. This is useful for cases like modeling a road as a single curve.
- [ComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/componenttype.md): Returns [ModelComponentType.LinePattern](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponenttype.md).
- [HasShapes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/hasshapes.md): Does this linetype have shapes
- [InUse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/inuse.md): Returns true if the linetype is in use by a Rhino object, a layer, an instance definition, or a section style.
- [IsDeleted](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/isdeleted.md): Gets a value indicating whether this linetype has been deleted and is currently in the Undo buffer.
- [IsModified](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/ismodified.md): true if this linetype has been modified by LinetypeTable.ModifyLinetype() and the modifications can be undone.
- [IsPatternLocked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/ispatternlocked.md): Returns true if the pattern is locked and cannot be modified.
- [IsReference](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/isreference.md): Gets a value indicting whether this linetype is a referenced linetype. Referenced linetypes are part of referenced documents.
- [LineCapStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/linecapstyle.md): Defines how the ends of open curves should be drawn
- [LineJoinStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/linejoinstyle.md): Defines how the corners of curves should be drawn
- [LinetypeIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/linetypeindex.md): The index of this linetype.
- [Name](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/name.md): The name of this linetype.
- [PatternLength](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/patternlength.md): Total length of one repeat of the pattern.
- [SegmentCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/segmentcount.md): Number of segments in the pattern.
- [ShapeBounds](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/shapebounds.md): The bounding box of the shapes in this linetype definition.
- [ShapeGap](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/shapegap.md): If shapes are present in this linetype, this is the gap around the shape.
- [ShapeLocalOffset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/shapelocaloffset.md): Local offset applied to shapes
- [ShapeSpacing](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/shapespacing.md): If shapes are present in this linetype, this is the distance between shapes
- [UserStringCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/userstringcount.md): Gets the amount of user strings.
- [Width](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/width.md): Base width for this linetype
- [WidthUnits](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/widthunits.md): Unit system that widths are defined in. UnitSystem.None is default and means that the width is defined in pixels.

## Methods

- [AddShape](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/addshape.md): (2 overloads) Add a curve shape to this linetype definition
- [AppendSegment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/appendsegment.md): Adds a segment to the pattern.
- [CommitChanges](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/commitchanges.md)
- [CreateFromPatternString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/createfrompatternstring.md): (static) Creates a linetype from a pattern string. Values greater than zero represent line segments, and values less than or equal to zero represents space segments.
- [Default](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/default.md): Set linetype to default settings.
- [DeleteAllUserStrings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/deletealluserstrings.md)
- [DeleteUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/deleteuserstring.md)
- [DuplicateLinetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/duplicatelinetype.md): Duplicates a linetype, clears the name, id, and locked bits.
- [GetSegment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/getsegment.md): Gets the segment information at a index.
- [GetTaperPoints](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/gettaperpoints.md): Taper points are positions/width combinations along the length of a curve
- [GetUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/getuserstring.md): Gets user string from this geometry.
- [GetUserStrings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/getuserstrings.md): Gets a copy of all (user key string, user value string) pairs attached to this geometry.
- [PatternString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/patternstring.md): Returns a string that represents the pattern of the linetype, which can be used in user interface. Values greater than zero represent line segments, and values less than or equal to zero represent space segments.
- [ReadFromFile](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/readfromfile.md): (static) Reads linetypes from either a Rhino .3dm file or an AutoCAD .lin file.
- [RemoveAllShapes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/removeallshapes.md): Remove all shapes from this linetype
- [RemoveSegment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/removesegment.md): Removes a segment in the linetype.
- [RemoveTaper](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/removetaper.md): Remove taper information for stroke
- [SetSegment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/setsegment.md): Sets the length and type of the segment at index.
- [SetSegments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/setsegments.md): Set all segments.
- [SetTaper](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/settaper.md): (2 overloads) Set taper to a simple start width / end width
- [SetUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.linetype/setuserstring.md): Attach a user string (key,value combination) to this geometry.

## Inherited Members

- 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), [Index](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent/index.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), [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)
