Method Rename
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Rename(CadDocument, string, string)
Renames a layer with every object on it, as the Layer manager's name cell and AutoCAD 2021's -RENAME do: the new
name with the spaces around it taken off, so that " T2 " names it T2, and letters of another case taken
(TEXT to text). Refused in AutoCAD 2021's words: layer 0, Cannot rename layer "0".; a name already used,
letters of either case the same, A layer named "DIM" already exists.; an empty name, one with a character a
layer name cannot hold (< > / \ " : ; ? * | , = `) and a layer of an external reference,
Invalid layer name. Defpoints is renamed, as AutoCAD renames it.
public static CadEditResult Rename(CadDocument document, string name, string newName)
Parameters
documentCadDocumentThe document.
namestringThe layer's name.
newNamestringThe new name.
Returns
- CadEditResult
What came of it; the name it has already is done with nothing written.