Click or drag to resize

netDxf Namespace

imbVeles Framework: imbSCI | imbACE | imbNLP | imbWEM | imbWBI

Base objects and hi-level classes for document load/save

Classes
  ClassDescription
Public classAciColor
Represents an ACI color (AutoCAD Color Index) that also supports true color.
Public classBoundingRectangle
Represents an axis aligned bounding rectangle.
Public classClippingBoundary
Represent a clipping boundary to display specific portions of an Image, an Underlay, or a Wipeout.
Public classDxfDocument
Represents a document to read and write DXF files.
Public classDxfObject
Represents the base class for all DXF objects.
Public classDxfObjectCode
Dxf string codes.
Public classMathHelper
Utility math functions and constants.
Public classStringEnum
Helper class for working with 'extended' enums using StringValueAttribute attributes.
Public classStringValueAttribute
Simple attribute class for storing String Values
Public classSymbols
Symbols for dxf text strings.
Public classTransparency
Represents the transparency of a layer or an entity.
Public classXData
Represents the extended data information of an entity.
Public classXDataRecord
Represents an entry in the extended data of an entity.
Structures
  StructureDescription
Public structureMatrix3
Represents a 3x3 double precision matrix.
Public structureVector2
Represent a two component vector of double precision.
Public structureVector3
Represent a three component vector of double precision.
Enumerations
  EnumerationDescription
Public enumerationClippingBoundaryType
Image clipping boundary type.
Public enumerationCoordinateSystem
Defines the coordinate system reference.
Public enumerationLineweight
Represents the line weight of a layer or an entity.
Public enumerationXDataCode
Defines the extended data code.
Remarks

The most relevant classes in the namespace

  • ClippingBoundary - Constructs from two or more 2D vectors Vector2, providing polygonal or rectangular clipping boundary for the drawing
  • XData - Extended data information of an entity. Main property is XDataRecord
Examples
Creating new document and loading existing DXF document
 1 public static void Main()
 2 {
 3    // your dxf file name
 4string file = "sample.dxf";
 5 // by default it will create an AutoCad2000 DXF version
 6 DxfDocument dxf = new DxfDocument();
 7 // an entity
 8 Line entity = new Line(new Vector2(5, 5), new Vector2(10, 5));
 9 // add your entities here
10 dxf.AddEntity(entity);
11 // save to file
12 dxf.Save(file);
13 bool isBinary;
14 // this check is optional but recommended before loading a DXF file
15 DxfVersion dxfVersion = DxfDocument.CheckDxfFileVersion(file, out isBinary);
16 // netDxf is only compatible with AutoCad2000 and higher DXF version
17 if (dxfVersion{DxfVersion.AutoCad2000}) return;
18 // load file
19  DxfDocument loaded = DxfDocument.Load(file);
20 }
See Also