Show / Hide Table of Contents

Class Linetypes

Represents a collection of line types.

Inheritance
System.Object
DxfObject
TableObjects<Linetype>
Linetypes
Implements
System.Collections.Generic.IEnumerable<Linetype>
System.Collections.IEnumerable
Inherited Members
TableObjects<Linetype>.list
TableObjects<Linetype>.references
TableObjects<Linetype>.Item[String]
TableObjects<Linetype>.Items
TableObjects<Linetype>.Names
TableObjects<Linetype>.Count
TableObjects<Linetype>.MaxCapacity
TableObjects<Linetype>.Owner
TableObjects<Linetype>.GetReferences(String)
TableObjects<Linetype>.GetReferences(Linetype)
TableObjects<Linetype>.Contains(String)
TableObjects<Linetype>.Contains(Linetype)
TableObjects<Linetype>.TryGetValue(String, Linetype)
TableObjects<Linetype>.Add(Linetype)
TableObjects<Linetype>.Clear()
TableObjects<Linetype>.GetEnumerator()
TableObjects<Linetype>.IEnumerable.GetEnumerator()
DxfObject.CodeName
DxfObject.Handle
DxfObject.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf.Collections
Assembly: CADability.dll
Syntax
public sealed class Linetypes : TableObjects<Linetype>, IEnumerable<Linetype>, IEnumerable

Methods

| Improve this Doc View Source

AddFromFile(String, Boolean)

Adds all linetypes to the list from the definition in a LIN file.

Declaration
public void AddFromFile(string file, bool reload)
Parameters
Type Name Description
System.String file

File where the definition is located.

System.Boolean reload

Specifies if the linetype definitions of the file will overwrite the existing ones, in case another with the same name exists in the file.

Remarks

If the file is not found in the specified folder, it will try to find them in the list of supported folders defined in the DxfDocument.
Any text style or shape present in the linetype definition must be previously defined in the DxfDocument, if not an exception will be generated.

| Improve this Doc View Source

AddFromFile(String, String, Boolean)

Adds a linetype to the list from the definition in a LIN file.

Declaration
public bool AddFromFile(string file, string linetypeName, bool reload)
Parameters
Type Name Description
System.String file

File where the definition is located.

System.String linetypeName

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

System.Boolean reload

Specifies if the linetype definition of the file will overwrite the existing one, in case another with the same name exists in the file.

Returns
Type Description
System.Boolean

True if the linetype has been added from the linetype definitions LIN file; false otherwise. It will return false if the linetype is present in the file and the reload argument is false.

Remarks

If the file is not found in the specified folder, it will try to find them in the list of supported folders defined in the DxfDocument.
Any text style or shape present in the linetype definition must be previously defined in the DxfDocument, if not an exception will be generated.

| Improve this Doc View Source

NamesFromFile(String)

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

Declaration
public 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.

Remarks

If the file is not found in the specified folder, it will try to find them in the list of supported folders defined in the DxfDocument.

| Improve this Doc View Source

Remove(Linetype)

Removes a line type.

Declaration
public override bool Remove(Linetype item)
Parameters
Type Name Description
Linetype item

Linetype to remove from the document.

Returns
Type Description
System.Boolean

True if the line type has been successfully removed, or false otherwise.

Overrides
netDxf.Collections.TableObjects<netDxf.Tables.Linetype>.Remove(netDxf.Tables.Linetype)
Remarks

Reserved line types or any other referenced by objects cannot be removed.

| Improve this Doc View Source

Remove(String)

Removes a line type.

Declaration
public override bool Remove(string name)
Parameters
Type Name Description
System.String name

Linetype name to remove from the document.

Returns
Type Description
System.Boolean

True if the line type has been successfully removed, or false otherwise.

Overrides
netDxf.Collections.TableObjects<netDxf.Tables.Linetype>.Remove(System.String)
Remarks

Reserved line types or any other referenced by objects cannot be removed.

| Improve this Doc View Source

Save(String, Boolean)

Saves all linetype definitions to a LIN file.

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

File where the linetype definitions will be saved.

System.Boolean overwrite

Defines if the file will be overwritten in case exits another one.

Remarks

Only non reserved linetypes will be saved, therefore Continuous, ByLayer, and ByBlock will be excluded.

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX