Show / Hide Table of Contents

Class Linetype

Represents a line type. Simple and complex line types are supported.

Inheritance
System.Object
DxfObject
TableObject
Linetype
Implements
IHasXData
System.ICloneable
System.IComparable
System.IComparable<TableObject>
System.IEquatable<TableObject>
Inherited Members
TableObject.NameChanged
TableObject.OnNameChangedEvent(String, String)
TableObject.XDataAddAppReg
TableObject.OnXDataAddAppRegEvent(ApplicationRegistry)
TableObject.XDataRemoveAppReg
TableObject.OnXDataRemoveAppRegEvent(ApplicationRegistry)
TableObject.Name
TableObject.IsReserved
TableObject.InvalidCharacters
TableObject.XData
TableObject.IsValidName(String)
TableObject.ToString()
TableObject.CompareTo(Object)
TableObject.CompareTo(TableObject)
TableObject.GetHashCode()
TableObject.Equals(Object)
TableObject.Equals(TableObject)
DxfObject.CodeName
DxfObject.Handle
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class Linetype : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>

Constructors

| Improve this Doc View Source

Linetype(String)

Initializes a new instance of the Linetype class.

Declaration
public Linetype(string name)
Parameters
Type Name Description
System.String name

Line type name.

| Improve this Doc View Source

Linetype(String, IEnumerable<LinetypeSegment>)

Initializes a new instance of the Linetype class.

Declaration
public Linetype(string name, IEnumerable<LinetypeSegment> segments)
Parameters
Type Name Description
System.String name

Line type name.

System.Collections.Generic.IEnumerable<LinetypeSegment> segments
| Improve this Doc View Source

Linetype(String, IEnumerable<LinetypeSegment>, String)

Initializes a new instance of the Linetype class.

Declaration
public Linetype(string name, IEnumerable<LinetypeSegment> segments, string description)
Parameters
Type Name Description
System.String name

Line type name.

System.Collections.Generic.IEnumerable<LinetypeSegment> segments
System.String description

Line type description.

| Improve this Doc View Source

Linetype(String, String)

Initializes a new instance of the Linetype class.

Declaration
public Linetype(string name, string description)
Parameters
Type Name Description
System.String name

Line type name.

System.String description

Line type description.

Fields

| Improve this Doc View Source

ByBlockName

ByBlock line type name.

Declaration
public const string ByBlockName = "ByBlock"
Field Value
Type Description
System.String
| Improve this Doc View Source

ByLayerName

ByLayer line type name.

Declaration
public const string ByLayerName = "ByLayer"
Field Value
Type Description
System.String
| Improve this Doc View Source

DefaultName

Default line type name.

Declaration
public const string DefaultName = "Continuous"
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

ByBlock

Gets the ByBlock line type.

Declaration
public static Linetype ByBlock { get; }
Property Value
Type Description
Linetype
| Improve this Doc View Source

ByLayer

Gets the ByLayer line type.

Declaration
public static Linetype ByLayer { get; }
Property Value
Type Description
Linetype
| Improve this Doc View Source

Center

Gets a predefined center line.

Declaration
public static Linetype Center { get; }
Property Value
Type Description
Linetype
| Improve this Doc View Source

Continuous

Gets the predefined continuous line.

Declaration
public static Linetype Continuous { get; }
Property Value
Type Description
Linetype
| Improve this Doc View Source

DashDot

Gets a predefined dash dot line.

Declaration
public static Linetype DashDot { get; }
Property Value
Type Description
Linetype
| Improve this Doc View Source

Dashed

Gets a predefined dashed line

Declaration
public static Linetype Dashed { get; }
Property Value
Type Description
Linetype
| Improve this Doc View Source

Description

Gets or sets the line type description.

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String
Remarks

New line characters are not allowed.

| Improve this Doc View Source

Dot

Gets a predefined dot line

Declaration
public static Linetype Dot { get; }
Property Value
Type Description
Linetype
| Improve this Doc View Source

IsByBlock

Defines if the line type is defined by block.

Declaration
public bool IsByBlock { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsByLayer

Defines if the line type is defined by layer.

Declaration
public bool IsByLayer { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Owner

Gets the owner of the actual DXF object.

Declaration
public Linetypes Owner { get; }
Property Value
Type Description
Linetypes
| Improve this Doc View Source

Segments

Gets the list of line type segments.

Declaration
public ObservableCollection<LinetypeSegment> Segments { get; }
Property Value
Type Description
ObservableCollection<LinetypeSegment>

Methods

| Improve this Doc View Source

Clone()

Creates a new Linetype that is a copy of the current instance.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A new Linetype that is a copy of this instance.

Overrides
TableObject.Clone()
| Improve this Doc View Source

Clone(String)

Creates a new Linetype that is a copy of the current instance.

Declaration
public override TableObject Clone(string newName)
Parameters
Type Name Description
System.String newName

Linetype name of the copy.

Returns
Type Description
TableObject

A new Linetype that is a copy of this instance.

Overrides
TableObject.Clone(String)
| Improve this Doc View Source

Length()

Gets the total length of the line type.

Declaration
public double Length()
Returns
Type Description
System.Double
| Improve this Doc View Source

Load(String, String)

Creates a new line type from the definition in a LIN file.

Declaration
public static Linetype Load(string file, string linetypeName)
Parameters
Type Name Description
System.String file

Lin file where the definition is located.

System.String linetypeName

Name of the line type definition to read (ignore case).

Returns
Type Description
Linetype

The linetype defined in the LIN file with the specified name, null if the linetype has not been found in the linetype definitions file.

| Improve this Doc View Source

NamesFromFile(String)

Gets the list of linetype names defined in a LIN file.

Declaration
public static List<string> NamesFromFile(string file)
Parameters
Type Name Description
System.String file

Linetype definitions file.

Returns
Type Description
System.Collections.Generic.List<System.String>

List of linetype names contained in the specified LIN file.

| Improve this Doc View Source

OnLinetypeSegmentAddedEvent(LinetypeSegment)

Declaration
protected virtual void OnLinetypeSegmentAddedEvent(LinetypeSegment item)
Parameters
Type Name Description
LinetypeSegment item
| Improve this Doc View Source

OnLinetypeSegmentRemovedEvent(LinetypeSegment)

Declaration
protected virtual void OnLinetypeSegmentRemovedEvent(LinetypeSegment item)
Parameters
Type Name Description
LinetypeSegment item
| Improve this Doc View Source

OnLinetypeTextSegmentStyleChangedEvent(TextStyle, TextStyle)

Declaration
protected virtual TextStyle OnLinetypeTextSegmentStyleChangedEvent(TextStyle oldTextStyle, TextStyle newTextStyle)
Parameters
Type Name Description
TextStyle oldTextStyle
TextStyle newTextStyle
Returns
Type Description
TextStyle
| Improve this Doc View Source

Save(String)

Saves the current linetype to the specified file, if the file does not exist it creates a new one.

Declaration
public void Save(string file)
Parameters
Type Name Description
System.String file

File where the current linetype will be saved.

Events

| Improve this Doc View Source

LinetypeSegmentAdded

Declaration
public event Linetype.LinetypeSegmentAddedEventHandler LinetypeSegmentAdded
Event Type
Type Description
Linetype.LinetypeSegmentAddedEventHandler
| Improve this Doc View Source

LinetypeSegmentRemoved

Declaration
public event Linetype.LinetypeSegmentRemovedEventHandler LinetypeSegmentRemoved
Event Type
Type Description
Linetype.LinetypeSegmentRemovedEventHandler
| Improve this Doc View Source

LinetypeTextSegmentStyleChanged

Declaration
public event Linetype.LinetypeTextSegmentStyleChangedEventHandler LinetypeTextSegmentStyleChanged
Event Type
Type Description
Linetype.LinetypeTextSegmentStyleChangedEventHandler

Implements

IHasXData
System.ICloneable
System.IComparable
System.IComparable<T>
System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX