Set empty string with ObjectAttributes.SetUserString

Hi All,

I’d like to add a user text key without a value. While this is possible in Rhino, the API interprets an empty string as null (from help: value string associated with key. If null, the key will be removed) and does not add the user text.

I suppose the help could be changed to ‘If null or empty, the key will be removed’ but it would be nice to have this functionality.

thanks for reading, Peter

Can you set a single space and treat that as empty @peter.ciganek?

Hi CSykes - thanks for responding.
Well, in fact, that’s exactly what I’ve done - and added a ‘todo’ comment to revise if the API is changed.
It’s noticeable in the palette - but fine for now.