Click or drag to resize

DxfDocument Class

Represents a document to read and write dxf files.
Inheritance Hierarchy

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax
public sealed class DxfDocument : DxfObject

The DxfDocument type exposes the following members.

Constructors
  NameDescription
Public methodDxfDocument
Initializes a new instance of the DxfDocument class.
Public methodDxfDocument(DxfVersion)
Initializes a new instance of the DxfDocument class.
Public methodDxfDocument(HeaderVariables)
Initializes a new instance of the DxfDocument class.
Top
Properties
  NameDescription
Public propertyAcadProxyEntities
Gets the acad proxy entities list.
Public propertyAcadTables
Gets the texts list.
Public propertyAcdsRecords
Gets the acds records list.
Public propertyAcdsSchemas
Gets the acds schemas list.
Public propertyActiveLayout
Gets or sets the name of the active layout.
Public propertyApplicationRegistries
Gets the application registries collection.
Public propertyArcs
Gets the arcs list.
Public propertyAttributeDefinitions
Gets the attribute definitions list.
Public propertyBlockRecords
Gets the block records collection.
Public propertyBlocks
Gets the block collection.
Public propertyBodies
Gets the bodies list.
Public propertyCircles
Gets the circles list.
Public propertyClasses
Gets the classes collection.
Public propertyCodeName
Gets the dxf entity type string.
(Inherited from DxfObject.)
Public propertyComments
Gets or sets DXF file comment lines.
Public propertyCurrentColor
Returns/sets the current entity color number: 0 = ByBlock; 256 = ByLayer.
Public propertyCurrentElevation
Returns/sets the current entity thickness.
Public propertyCurrentLayer
Returns/sets the current layer name.
Public propertyCurrentLineTypeName
Returns/sets the current line type name.
Public propertyCurrentLineTypeScale
Returns/sets the current entity linetype scale.
Public propertyCurrentTextSize
Returns/sets the default text height.
Public propertyCurrentTextStyle
Returns/sets the current layer name.
Public propertyCurrentThickness
Returns/sets the current entity thickness.
Public propertyDateCreated
Returns/sets the date/time of drawing creation.
Public propertyDateLastEdited
Returns/sets the date/time of last drawing update.
Public propertyDimensions
Gets the dimensions list.
Public propertyDimensionStyles
Gets the dimension style collection.
Public propertyDrawingVariables
Gets the dxf drawing variables.
Public propertyEllipses
Gets the ellipses list.
Public propertyEntities
Gets all entities list of the active layout.
Public propertyFaces3d
Gets the 3d faces list.
Public propertyGroups
Gets the groups collection.
Public propertyHandle
Gets the handle assigned to the dxf object.
(Inherited from DxfObject.)
Public propertyHatches
Gets the hatches list.
Public propertyHelixes
Gets the helixes list.
Public propertyImageDefinitions
Gets the image definitions collection.
Public propertyImages
Gets the images list.
Public propertyInserts
Gets the inserts list.
Public propertyIsBinary
Returns/sets if the DXF file is in binary form.
Public propertyLayers
Gets the layers collection.
Public propertyLayouts
Gets the layouts collection.
Public propertyLeaders
Gets the leader list.
Public propertyLines
Gets the lines list.
Public propertyLinetypes
Gets the line type collection.
Public propertyLwPolylines
Gets the light weight polylines list.
Public propertyMeshes
Gets the mesh list.
Public propertyMLines
Gets the multilines list.
Public propertyMlineStyles
Gets the MLine styles collection.
Public propertyModified
Gets or sets if the document has been modified.
Public propertyMTexts
Gets the multiline texts list.
Public propertyName
Gets or sets the name of the document.
Public propertyOle2Frames
Gets the Ole2Frames list.
Public propertyOleFrames
Gets the OleFrames list.
Public propertyOwner
Gets the owner of the actual dxf object.
(Inherited from DxfObject.)
Public propertyPoints
Gets the points list.
Public propertyPolyfaceMeshes
Gets the polyface meshes list.
Public propertyPolylines
Gets the polylines list.
Public propertyRasterVariables
Gets or sets the raster variables applied to image entities.
Public propertyRays
Gets the rays list.
Public propertyRegions
Gets the regions list.
Public propertySelectedEntities
Gets the selected entities list entities list.
Public propertySolids
Gets the solids list.
Public propertySolids3D
Gets the solids3D list.
Public propertySplines
Gets the splines list.
Public propertySurfaces
Gets the surfaces list.
Public propertyTexts
Gets the texts list.
Public propertyTextStyles
Gets the text style collection.
Public propertyThumbnailImage
Gets or sets the thumbnail image of the drawing.
Public propertyTolerances
Gets the tolerance list.
Public propertyTotalEditTime
Returns/sets the cumulative editing time for the drawing.
Public propertyTotalEditTimeDays
Returns/sets the cumulative editing days for the drawing.
Public propertyTraces
Gets the traces list.
Public propertyUCSs
Gets the User coordinate system collection.
Public propertyUnderlayDgnDefinitions
Gets the dgn underlay definitions collection.
Public propertyUnderlayDwfDefinitions
Gets the dwf underlay definitions collection.
Public propertyUnderlayPdfDefinitions
Gets the pdf underlay definitions collection.
Public propertyUnderlays
Gets the underlay list.
Public propertyUserTimer
Returns/sets the user elapsed time.
Public propertyUserTimerDays
Returns/sets user elapsed days.
Public propertyViewport
Gets the document viewport.
Public propertyViewports
Gets the viewports list.
Public propertyViews
Gets the views collection.
Public propertyVPorts
Gets the viewports collection.
Public propertyWipeouts
Gets the wipeouts list.
Public propertyXLines
Gets the extension lines list.
Top
Methods
  NameDescription
Public methodAddEntities
Adds a list of entities to the document.
Public methodAddEntity
Adds an entity to the document.
Public methodFromString
Returns a DxfDocument from a string containing a DXF file.
Public methodGetEntityByHandle
Gets a dxf entity by its handle.
Public methodGetObjectByHandle
Gets a dxf object by its handle.
Public methodCode exampleLoad(Stream)
Loads a dxf file.
Public methodLoad(String)
Loads a dxf file.
Public methodModifyEntities(IEnumerable, NullableVector2, NullableVector2, Double, Double, NullableInt16, String, String)
Modifies the position, rotation and scaling of a list of entities in 2D.
Public methodModifyEntities(IEnumerable, NullableVector3, NullableVector3, NullableVector3, NullableVector3, NullableInt16, String, String)
Modifies the position, rotation and scaling of a list of entities.
Public methodModifyEntity(EntityObject, NullableVector2, NullableVector2, Double, Double, NullableInt16, String, String)
Modifies the position, rotation and scaling of an entity in 2D.
Public methodModifyEntity(EntityObject, NullableVector3, NullableVector3, NullableVector3, NullableVector3, NullableInt16, String, String)
Modifies the position, rotation and scaling of an entity.
Public methodRemoveBlock
Removes a block from the document.
Public methodRemoveEntities
Removes a list of entities from the document.
Public methodRemoveEntity
Removes an entity from the document.
Public methodRemoveObject(String)
Removes an object from the document by handle.
Public methodRemoveObject(String)
Removes all document objects which handles ar listed in Handles array.
Public methodRotateEntitiesAboutAxis
Rotate a list of entities about an arbitrary axis.
Public methodRotateEntityAboutAxis
Rotate an entity about an arbitrary axis.
Public methodSave(Stream)
Saves the database of the actual DxfDocument to a text stream.
Public methodSave(String)
Saves the database of the actual DxfDocument to a text dxf file.
Public methodSave(Stream, Boolean)
Saves the database of the actual DxfDocument to a stream.
Public methodSave(String, Boolean)
Saves the database of the actual DxfDocument to a dxf file.
Public methodToFormattedAngle
Returns a string representing an angle in radians formatted according to angle units format.
Public methodToFormattedUnit
Returns a string representing a number formatted according to linear units format.
Public methodToString
Obtains a string containing the dxf file.
(Overrides DxfObjectToString.)
Top
Examples
You can use the this class, for example, to merge the contents of two DXF files as showed below:
[C#]

DxfDocument dxf1 = new DxfDocument();
DxfDocument dxf2 = new DxfDocument();

dxf1 = dxf1.Load("SuperQuadric1.dxf");
dxf2 = dxf2.Load("SuperQuadric2.dxf");

dxf1.AddEntities(new List<EntityObject>(dxf2.Entities));

dxf1.Save("SuperQuadricMerge.dxf");
[Visual Basic]

Dim dxf1 As New DxfDocument()
Dim dxf2 As New DxfDocument()

dxf1 = dxf1.Load("SuperQuadric1.dxf")
dxf2 = dxf2.Load("SuperQuadric2.dxf")

dxf1.AddEntities(New List(Of EntityObject)(dxf2.Entities))

dxf1.Save("SuperQuadricMerge.dxf")
See Also