SetName to a block definition


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

Thanks in advance,

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

Or by code!

Here it is :