Table of Contents

Method CloseRefEdit

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

CloseRefEdit(bool)

Closes the in-place edit, as REFCLOSE: saved, each object of the working set written into the block as a new object put through the reference's transformation the other way and the object it came from erased (an object erased in the drawing leaves the block, one taken out of the set leaves it too), every reference of the block drawn anew; or discarded, the copies erased and the block as it was. The objects drawn in the drawing that were never added stay in it. The session's steps become one, "REFEDIT", which one undo takes back.

public CadEditResult CloseRefEdit(bool save)

Parameters

save bool

Whether the changes are saved; false discards them.

Returns

CadEditResult

What came of it: refused where no edit is open or a command's group of edits is, or where the file of an external reference cannot be written (** Failed to Saveback Xref file **); failed, the session still open, where an object cannot be put back through the reference's placing or the file cannot be written.

Remarks

An external reference saved is written to its file, whole and in the version the file had, DWG or DXF, and read again, so that every reference of it draws the change; the objects of the file that are not in the working set are written as they were. Once its file is written the session cannot be taken back by undo, as the file cannot, so undo stops where it closed. A file that is gone, read only, locked or changed on disk since it was read refuses the save, the session still open to be saved again or discarded.