The GET_DXF_OBJECTS function returns an IDLgrModel containing graphics from a given DXF file.
Result = GET_DXF_OBJECTS( Filename [, Blocktable] [, Layertable] [, /BYLAYER] [, IGNORED=array])
Returns an IDLgrModel object for the Model_Space block (the default block of the DXF file).
A string containing the full path to the DXF file.
A named variable that will contain an array of structures describing the blocks contained in the DXF file.
A named variable that will contain an array of structures describing the layers contained in the DXF file.
Set this keyword to read files by layer. By default, files are read by block.
Set this keyword to a named variable that will contain an array of 21 elements containing the counts of DXF entities that were ignored because of unimplemented DXF data types.
The tags for the structure passed by the BLOCKTABLE and LAYERTABLE keywords are as follows:
Structure Tag |
Type |
Description |
Name |
string |
Block/layer name or NULL for *Model_Space block |
Model |
object |
IDLgrModel object for this block/layer |
nEntries |
lonarr(21) |
Number of DXF entities in this block, indexed by DXF type |
ColorName |
string |
Entity’s color name |
Color |
bytarr(3) |
Entity’s color RGB |
ColorIndex |
int |
DXF color index |
Visible |
int |
Set if layer is visible |
filename = FILEPATH('heart.dxf', SUBDIR=['examples', 'data'])
oModel = GET_DXF_OBJECTS(filename)
XOBJVIEW, oModel
7.1 |
Introduced |