Method GetObject
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
GetObject(string)
Gets the object of a handle, as AutoCAD's GetObjectId(false, handle, 0) gives its id: an entity of model space,
paper space or a block (a VERTEX of a POLYLINE and an ATTRIB of an INSERT among them), an object of the OBJECTS section,
a record of the layer, linetype, text style, dimension style or block table, or one of those five tables; letters of
either case the same. db.GetObject("2F") of a drawing whose layer steel has the handle 2F gives that
DxfLayerTableRecord.
public DxfDBObject GetObject(string handle)
Parameters
handlestringThe handle, as the file writes it, hexadecimal.
Returns
- DxfDBObject
The object.
Remarks
The library has no class for the other records that carry a handle, and finds none of them: the tables of applications (APPID), viewports (VPORT), views (VIEW) and coordinate systems (UCS) and their records, and the BLOCK and ENDBLK that open and close a block. The objects are found by handle in one walk of the drawing, kept until the drawing next changes, so that many questions between two changes cost one walk.
Exceptions
- ArgumentNullException
Thrown when the handle is null.
- KeyNotFoundException
Thrown when the drawing has no object of the handle, or it is erased, as AutoCAD answers eUnknownHandle.