Syntax
[C/C++:]
void gGetDXFFile(GFILE *fp, int mode, char *layer);
[F90:]
subroutine gGetDXFFile(unit, mode, layer)
integer, intent(in) :: unit,mode
character*(*), intent(in) :: layer
Arguments
fp
GINO-C file pointer
unit
Fortran 90 file unit
mode
Interpretation mode:
|
= 0, |
Ignore any active view in metafile |
|
= 1, |
Interpret and apply active viewport in metafile header |
layer
Layer name or blank for all layers
Description
The routine gGetDXFFile() interprets one or all the layers of a DXF metafile onto the current output device. The file must be opened using the routine gFopen() in order to obtain the file pointer/unit to pass in fp/unit.
The argument
mode is used to determine whether any active viewport contained within the DXF file header is ignored or applied before interpeting the metafile. Where no viewport exists within the file or if it is not relevant, an appropriate viewport may be applied by first enquiring the extents of the metatfile using gEnqDXFLimits() and the setting up of a 2D or 3D viewport using gSetViewport2D() or gSetViewport3D().
A DXF file will usually contain several 'layers' representing different parts of a drawing. Using the argument
layer, one layer may be selected to be interpreted whilst ignoring all other layers within the file. Alternatively, all layers may be interpreted by setting the
layer argument to a blank or NULL string. The list of layer names contained within a DXF file may be obtained using the routine gEnqDXFLayers().
Note that with performance in mind, dashed/broken line definitions may not be interpreted precisely according to their DXF specification. If a precise interpretation is required, it may be necessary to switch to software broken lines using the routine gSetBrokenLineMode(GSOFT).
See Also
gGetDXFFile UsagegEnqDXFLayersgEnqDXFLimitsgFopengSetBrokenLineMode