Method Clone
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
Clone()
Gets a copy of the entity as it is, as AutoCAD's Clone gives one of an object: an entity of the same class
and look in no file, a DxfUnknownEntity among them, its records as the file has them but its handle,
owner, space, reactors and extension dictionary; a VERTEX the vertex class it is, an ATTRIB an attribute. It is added
to a drawing by AppendEntity(DxfEntity), as a copy from another drawing is: see
that method for the pointers it carries.
public DxfEntity Clone()
Returns
- DxfEntity
The copy.
Remarks
A copy of an annotative TEXT, attribute, MTEXT or INSERT carries the contexts of its original, as AutoCAD 2021's
Clone keeps them, and of each ATTRIB of an INSERT: in no file it is shown at the scales its original is
(HasContext(DxfObjectContext)), reads where its original is read, and is moved with every context; added to
its original's drawing, it is given an extension dictionary of those contexts, as AutoCAD writes its copy's (check
D35c). Added to another drawing, it keeps them on that drawing's scales of their names, a scale it lacks added, as
AppendEntity(DxfEntity) says (check D35d); to a drawing that holds no list of
scales, older than R2007, it leaves them behind, given the placing it is read at, its ATTRIBs read at their records.
Exceptions
- InvalidOperationException
Thrown when the entity is erased, as AutoCAD refuses an erased object.