Method SaveCopy
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
SaveCopy(string, string)
Writes a copy of the drawing as a DXF of a version, as AutoCAD's DXFOUT does: the drawing keeps its file, its
SaveVersion and whether it has changes not saved, and the copy is not the file it is known by.
The objects ISOLATEOBJECTS and HIDEOBJECTS hid for the session are written shown, as a save writes them, and the file is
written to a temporary file first and put in place when whole, with no .bak of the file it replaces.
public IReadOnlyList<string> SaveCopy(string path, string version)
Parameters
pathstringThe path of the copy.
versionstringThe version, as AC1024; null for the drawing's own.
Returns
- IReadOnlyList<string>
What the version could not hold, a sentence each, as Save(string, string) says it.
Exceptions
- ArgumentNullException
Thrown when the path is null.
- ArgumentException
Thrown when the version is none of those of a DXF.
- NotSupportedException
Thrown when the drawing is of R14 and the version is not its own.
- InvalidOperationException
Thrown when a group of edits is open.