RenameBlock

Renames an existing block definition.

Syntax

rhinocsriptsyntax.RenameBlock ( block_name, new_name)

rhinocsript.block.RenameBlock ( block_name, new_name)

Parameters

block_name

Required.  String.  The name of an existing block definition.

new_name

Required.  String.  The new block definition name.

Returns

String

The new block definition name if successful.

Example

import rhinoscriptsyntax as rs

strOldBlock = rs.GetString("Old block name")

if strOldBlock:

    strNewBlock = rs.GetString("New block name")

    if strNewBlock:

        rs.RenameBlock (strOldBlock, strNewBlock)

Also See

BlockNames

IsBlock