LinetypeTable
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
ActiveCount
Returns number of linetypes in the linetypes table, excluding deleted linetypes.
Public Property
ByLayerLinetypeName
Returns the text name of the by-layer linetype.
Public Property
ByParentLinetypeName
Returns the text name of the by-parent linetype.
Public Property
ComponentType
(Overrides
CommonComponentTable.T..ComponentType
.)Public Property
ContinuousLinetypeName
Returns the text name of the continuous linetype.
Public Property
Count
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
CurrentLinetypeIndex
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
CurrentLinetypeSource
Source used by an object to determine its current linetype to be used by new objects.
Public Property
Document
Document that owns this table.
Public Property
Item
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
LinetypeScale
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
Add(Linetype)
Adds a new linetype with specified definition to the linetype table.
Public Method
Add(String, IEnumerable.Double.)
Adds a new linetype with specified definition to the linetype table.
Public Method
AddReferenceLinetype
Adds a reference linetypes that will not be saved in files.
Public Method
Clear
Marks all items as deleted.
(Inherited from CommonComponentTable.T..)
Public Method
Delete(Linetype)
(Overrides
CommonComponentTable.T..Delete(T)
.)Public Method
Delete(IEnumerable.Int32., Boolean)
Deletes multiple linetypes.
Public Method
Delete(Int32, Boolean)
Deletes linetype.
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public Method
Find(String)
Finds the linetype with a given name.
Public Method
Find(Guid, Boolean)
Finds a linetype with a matching ID.
Public Method
FindId
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
FindIndex
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
FindName
Finds the linetype with a given name.
Public Method
GetEnumerator
(Overrides
CommonComponentTable.T..GetEnumerator.
.)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
GetUnusedLinetypeName.
Gets unused linetype name used as default when creating new linetypes.
Public Method
GetUnusedLinetypeName(Boolean)
Obsolete.
Obsolete. Use the other overload. Gets unused linetype name used as default when creating new linetypes.
Public Method
LinetypeIndexForObject
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
Modify linetype settings.
Public Method
SetCurrentLinetypeIndex
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
Undelete
Restores a linetype that has been deleted.
Public Method
UndoModify
If the linetype has been modified and the modification can be undone, then UndoModify() will restore the linetype to its previous state.