Skip to content

LinetypeTable

Public Class

Inheritance Hierarchy

System.Object
Rhino.FileIO.CommonComponentTable. Linetype.
Rhino.DocObjects.Tables.RhinoDocCommonTable. Linetype.
Rhino.DocObjects.Tables.LinetypeTable

Namespace: Rhino.DocObjects.Tables

Assembly: RhinoCommon (in RhinoCommon.dll)

Syntax

public sealed class LinetypeTable : RhinoDocCommonTable<Linetype>,
ICollection<Linetype>, IEnumerable<Linetype>, IEnumerable

The LinetypeTable type exposes the following members.

Properties

Name

Description


Public Property

Returns number of linetypes in the linetypes table, excluding deleted linetypes.


Public Property

Returns the text name of the by-layer linetype.


Public Property

Returns the text name of the by-parent linetype.


Public Property

(Overrides

.)


Public Property

Returns the text name of the continuous linetype.


Public Property

Returns number of linetypes in the linetypes table, including deleted linetypes.


Public Property
CurrentLinetype

Returns reference to the current linetype. Note that this reference may become invalid after a call to AddLinetype().


Public Property

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.


Public Property

Source used by an object to determine its current linetype to be used by new objects.


Public Property

Document that owns this table.


Public Property

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.


Public Property

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.


Methods

Name

Description


Public Method

Adds a new linetype with specified definition to the linetype table.


Public Method

Adds a new linetype with specified definition to the linetype table.


Public Method

Adds a reference linetypes that will not be saved in files.


Public Method

Marks all items as deleted.

(Inherited from CommonComponentTable.T..)


Public Method

(Overrides

.)


Public Method

Deletes multiple linetypes.


Public Method

Deletes linetype.


Public Method

Equals

Determines whether the specified object is equal to the current object.

(Inherited from Object.)


Public Method

Finds the linetype with a given name.


Public Method

Finds a linetype with a matching ID.


Public Method

Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/opening operations. This function will not find grip objects.

(Inherited from CommonComponentTable.T..)


Public Method

Retrieves a Linetype object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.


Public Method

Finds the linetype with a given name.


Public Method

(Overrides

.)


Public Method

GetHashCode

Serves as the default hash function.

(Inherited from Object.)


Public Method

GetType

Gets the Type of the current instance.

(Inherited from Object.)


Public Method

Gets unused linetype name used as default when creating new linetypes.


Public Method

Obsolete.

Obsolete. Use the other overload. Gets unused linetype name used as default when creating new linetypes.


Public Method

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.


Public Method
LoadDefaultLinetypes.

Fills in the linetype table with any default linetypes not already included.


Public Method
LoadDefaultLinetypes(Boolean)

Fills in the linetype table with any default linetypes not already included.


Public Method

Modify linetype settings.


Public Method

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.


Public Method

ToString

Returns a string that represents the current object.

(Inherited from Object.)


Public Method

Restores a linetype that has been deleted.


Public Method

If the linetype has been modified and the modification can be undone, then UndoModify() will restore the linetype to its previous state.