SetName to a block definition

Hello,

How can I change a block definition name ?
I try to do this by code, but InstanceDefinition name attribute is readonly.

Thanks in advance,
JLH

Via Grasshopper? I don’t think that’s possible. You would have to rebake with a new name.

Or by code!

Here it is :

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_DocObjects_Tables_InstanceDefinitionTable_Modify.htm