Table of Contents

Method Rename

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Rename(CadDocument, string, string)

Renames a block with every reference to it, as -RENAME Block does: each INSERT, dimension and table that draws it, its dynamic and attribute definitions with it. Refused for a block of a layout, an external reference or one AutoCAD names itself, Cannot find block "X".; for a name AutoCAD does not take, Invalid block name.; and for the name of another block, letters of either case the same, Block "X" already exists.

public static CadEditResult Rename(CadDocument document, string name, string newName)

Parameters

document CadDocument

The document.

name string

The block's name, letters of either case the same.

newName string

The new name.

Returns

CadEditResult

What came of it; the name it has already is done with nothing written.

Exceptions

ArgumentNullException

Thrown when the document is null.