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 TsgCADImage | Description |
---|---|
BackgroundColor | The property specifies the background color of the drawing which TsgCADImage displays. |
Blocks | The property lists the blocks references of the drawing. |
BorderSize | The property specifies the size of the drawing’s border in global points or ratio. |
BorderType | The property sets the type of drawing’s border. |
CachingRasterMode | The property specifies the size of drawing’s border in global points or ratio. |
CBFormat | The property displays predefined clipboard format. |
ColorToLineWeight | The property specifies the line weight for entities by colors. |
Converter | The property contains information about the loaded CAD file. |
CurrentLayout | The property sets the current layout. |
DefaultColor | The property sets the color for elements which have white color in AutoCAD™ DXF/DWG |
DimensionsVisible | The property switches on or off dimension of the drawing. |
DrawingBox | The property defines drawing box. |
DrawMatrix | The property gets the matrix used for drawing. |
DrawMode | The property specifies the current color mode. |
Entities | The property lists all the entities of the CAD file. |
Extents | The property defines drawing's extents. |
FileName | The property gets and sets the name of the file from which the image is loaded. |
IsDraw3DAxes | The property gets and sets 3Daxes drawing mode. |
IsDrawingRotated | The property defines if the drawing is rotated. |
IsLoading | The property defines if the drawing is loading. |
IsPlotting | The property defines the destination source status. |
IsProcessMessages | The property defines the messages processing mode. |
IsShowBackground | The property can be used to show background. |
IsShowLineWeight | The property can be used to draw all entities with NullWidth pixel lineweights. |
IsWithoutBorder | The property can be used to draw the drawing without adding the empty space (borders). |
Layouts | The property gets the indexed layout. |
LayoutsCount | The property gets the number of layouts. |
LineWeightScale | The property gets and sets the line weight scale. |
Millimeters | The property can be used to change the drawing units (millimeters/inches) |
NullWidth | The property specifies the default line weight of entities with zero lineweight. |
OwnSource | The property indicates if data is loaded. |
PureExtents | The property defines the exact image field in world coordinates, with no empty space added. |
ResizeDisproportionateDrawing | The property points to layer, containing given primitive if this layer is given. |
Scale | The property returns scale factor of the image as TFPoint structure. |
ShowImages | The property gets and sets the raster image drawing mode. |
Stretch | The property indicates whether the CAD drawing should be changed so that it exactly fits the bounds of the image control. |
TextVisible | The property switches on or off texts of the CAD image. |
TTFMode | The property specifies the mode of the TTF fonts reflection. |
UseWinEllipse | The 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. |
ViewRectangle | For CAD Import VCL internal uses only. |
Methods
Methods | Description |
---|---|
Create | Creates and initializes a new TsgCADdxfImage object. |
LoadFromClipboardFormat | The method loads from clipboard. |
LoadFromStream | The method loads a CAD image from stream. |
SaveToClipboardFormat | The method saves to clipboard. |
Methods derived from TsgCADImage | Description |
---|---|
AbsHeight | The method returns the entire height of the CAD image. |
AbsWidth | The method returns the entire width of the CAD image. |
AddScaledDXF | The method adds a new drawing to the TsgCADImage object. |
AddScaledDXFEx | The method adds a new drawing to the TsgCADImage object. |
Assign | The method copies a CAD image object and increase reference to the Converter object. |
CommonToInternalUnits | The method converts CAD coordinates of an image to the coordinates of the inner drawing's coordinate system. |
Destroy | Destroys an instance of the TsgCADImage class. |
DrawRect | The method renders a part of a loaded drawing on a device context specified by DC. |
ExportToMetafile | The method exports a CAD drawing to a Windows Enhanced metafile |
GetCADCoords | The method returns coordinates of a point on a drawing. |
GetEntityColor | The method returns the entity's color. |
GetExtents | The method recalculates the drawing extents. |
GetObjectSnapMask | The method returns the object snap mode. |
GetPoint | The method converts point from the 3D coordinate system to the 2D coordinate system. |
GetPointUCS | The method converts the UCS coordinates to the screen coordinates. |
GetRealImagePoint | The method the real coordinates of the point. |
GetSnapData | The method returns the data structure that contains the closest entity to the argument point, and the node point. |
GetVisibleArea | The method returns the visible area. |
InternalToCommonUnits | The method converts the coordinates of the inner drawing's coordinate system to the CAD coordinates of an image. |
LoadFromFile | The method loads a CAD image from file. |
Measurement | The method returns the information about measurement system for linear and angular measures. |
RefreshCurrentLayout | The method refreshes sizes of the current layout. |
ResetDrawingBox | The method switches off the drawing box. |
Rotate | The method rotates the current image. |
RotDefault | The method rotates the image to the default view. |
RotToView | The method rotates the image by parameter defined in A3DView. |
SaveToFile | The method saves the image to the file. |
SaveToStream | The method saves the image to the stream. |
SetObjectSnapMask | The method sets the object snap mode. |
SetVisibleArea | The method sets an area for snap. |
StopLoading | The method stops loading the file and displays only the loaded data. |
Events
Events derived from TsgCADImage | Description |
---|---|
OnAfterRotate | The event occurs after a CAD image being rotated. |
OnBeforeRotate | The event occurs before a CAD image being rotated. |
OnLayoutChange | The event occurs when a current layout is being changed. |
Variables and constants
Variables and constants | Description |
---|---|
CF_DXF | Predefined clipboard format for use in the LoadFromClipboardFormat method. |