Batch Rename Blocks in Rhino with Python
Technical Details
Core Functions
rs.BlockNames()
: Returns a list of all block names in current documentrs.RenameBlock()
: Renames a block from old name to new namestring.replace()
: Python string method for text replacement
Code Example
#coding=utf-8
import rhinoscriptsyntax as rs
def replace_block_names(old_text, new_text):