Updating name of Element - Error: Cannot convert undefined or null to object

The name isn’t a property of the shape itself, therefore your approach doesn’t work.

You can use modeling.updateLabel(shape, 'foobar') for that purpose.

1 Like