Skip to main content

TsgCADdxfImage

Unit: DXF

Description

The main TsgCADdxfImage class is a descendant of TsgCADImage (which is a descendant of TGraphic) and overrides its methods. You can use the TsgCADdxfImage objects in the TImage control for displaying and navigation AutoCAD™ DXF drawings.

Learn more about DXF

DXF is an acronym for Drawing eXchange Format. DXF is a widely used file format for exchanging 2D and 3D CAD data. It's not an open format but owned by AutoDesk Inc. who used it for their program AutoCAD. With every new version of AutoCAD the definition of DXF is changed but nevertheless there are many of programs which are capable of reading and writing some form of DXF. DXF is an ASCII replication of the contents of a drawing file enabling the interchange of files from one CAD system to another program. DXF import/export is supported by a wide variety of applications, ranging from CAD products to word processors, desktop publishing and illustration tools. The DXF CAD format has become the de facto standard in PC based CAD industry with many other CAD systems able to read and write this format too.

Syntax

TsgCADdxfImage = class(TsgCADImage)

Properties

Properties derived from TsgCADImageDescription
BackgroundColorThe property specifies the background color of the drawing which TsgCADImage displays.
BlocksThe property lists the blocks references of the drawing.
BorderSizeThe property specifies the size of the drawing’s border in global points or ratio.
BorderTypeThe property sets the type of drawing’s border.
CachingRasterModeThe property specifies the size of drawing’s border in global points or ratio.
CBFormatThe property displays predefined clipboard format.
ColorToLineWeightThe property specifies the line weight for entities by colors.
ConverterThe property contains information about the loaded CAD file.
CurrentLayoutThe property sets the current layout.
DefaultColorThe property sets the color for elements which have white color in AutoCAD™ DXF/DWG
DimensionsVisibleThe property switches on or off dimension of the drawing.
DrawingBoxThe property defines drawing box.
DrawMatrixThe property gets the matrix used for drawing.
DrawModeThe property specifies the current color mode.
EntitiesThe property lists all the entities of the CAD file.
ExtentsThe property defines drawing's extents.
FileNameThe property gets and sets the name of the file from which the image is loaded.
IsDraw3DAxesThe property gets and sets 3Daxes drawing mode.
IsDrawingRotatedThe property defines if the drawing is rotated.
IsLoadingThe property defines if the drawing is loading.
IsPlottingThe property defines the destination source status.
IsProcessMessagesThe property defines the messages processing mode.
IsShowBackgroundThe property can be used to show background.
IsShowLineWeightThe property can be used to draw all entities with NullWidth pixel lineweights.
IsWithoutBorderThe property can be used to draw the drawing without adding the empty space (borders).
LayoutsThe property gets the indexed layout.
LayoutsCountThe property gets the number of layouts.
LineWeightScaleThe property gets and sets the line weight scale.
MillimetersThe property can be used to change the drawing units (millimeters/inches)
NullWidthThe property specifies the default line weight of entities with zero lineweight.
OwnSourceThe property indicates if data is loaded.
PureExtentsThe property defines the exact image field in world coordinates, with no empty space added.
ResizeDisproportionateDrawingThe property points to layer, containing given primitive if this layer is given.
ScaleThe property returns scale factor of the image as TFPoint structure.
ShowImagesThe property gets and sets the raster image drawing mode.
StretchThe property indicates whether the CAD drawing should be changed so that it exactly fits the bounds of the image control.
TextVisibleThe property switches on or off texts of the CAD image.
TTFModeThe property specifies the mode of the TTF fonts reflection.
UseWinEllipseThe property can be used for drawing most of the arcs and circles in the image using GDI Windows functions such as Ellipse, Arc, etc., not linearized.
ViewRectangleFor CAD Import VCL internal uses only.

Methods

MethodsDescription
CreateCreates and initializes a new TsgCADdxfImage object.
LoadFromClipboardFormatThe method loads from clipboard.
LoadFromStreamThe method loads a CAD image from stream.
SaveToClipboardFormatThe method saves to clipboard.
Methods derived from TsgCADImageDescription
AbsHeightThe method returns the entire height of the CAD image.
AbsWidthThe method returns the entire width of the CAD image.
AddScaledDXFThe method adds a new drawing to the TsgCADImage object.
AddScaledDXFExThe method adds a new drawing to the TsgCADImage object.
AssignThe method copies a CAD image object and increase reference to the Converter object.
CommonToInternalUnitsThe method converts CAD coordinates of an image to the coordinates of the inner drawing's coordinate system.
DestroyDestroys an instance of the TsgCADImage class.
DrawRectThe method renders a part of a loaded drawing on a device context specified by DC.
ExportToMetafileThe method exports a CAD drawing to a Windows Enhanced metafile
GetCADCoordsThe method returns coordinates of a point on a drawing.
GetEntityColorThe method returns the entity's color.
GetExtentsThe method recalculates the drawing extents.
GetObjectSnapMaskThe method returns the object snap mode.
GetPointThe method converts point from the 3D coordinate system to the 2D coordinate system.
GetPointUCSThe method converts the UCS coordinates to the screen coordinates.
GetRealImagePointThe method the real coordinates of the point.
GetSnapDataThe method returns the data structure that contains the closest entity to the argument point, and the node point.
GetVisibleAreaThe method returns the visible area.
InternalToCommonUnitsThe method converts the coordinates of the inner drawing's coordinate system to the CAD coordinates of an image.
LoadFromFileThe method loads a CAD image from file.
MeasurementThe method returns the information about measurement system for linear and angular measures.
RefreshCurrentLayoutThe method refreshes sizes of the current layout.
ResetDrawingBoxThe method switches off the drawing box.
RotateThe method rotates the current image.
RotDefaultThe method rotates the image to the default view.
RotToViewThe method rotates the image by parameter defined in A3DView.
SaveToFileThe method saves the image to the file.
SaveToStreamThe method saves the image to the stream.
SetObjectSnapMaskThe method sets the object snap mode.
SetVisibleAreaThe method sets an area for snap.
StopLoadingThe method stops loading the file and displays only the loaded data.

Events

Events derived from TsgCADImageDescription
OnAfterRotateThe event occurs after a CAD image being rotated.
OnBeforeRotateThe event occurs before a CAD image being rotated.
OnLayoutChangeThe event occurs when a current layout is being changed.

Variables and constants

Variables and constantsDescription
CF_DXFPredefined clipboard format for use in the LoadFromClipboardFormat method.