The documentation of SetUserText says that if the optional strValue parameter is omitted, the UserText’s key & value is deleted. That means that a call like this should delete it:
Call Rhino.SetUserText strID, “MyKey”
So far so good. But if I include the optional strValue it should not delete it. Therefore neither of the following calls should delete it because the optional parameter is not omitted:
Call Rhino.SetUserText strID, “MyKey”, “Some Text”
Call Rhino.SetUserText strID, “MyKey”, “”
The second call above DOES delete the key/value contrary to the documentation.
The reason this is a problem is because having a blank in a usertext is legal. I can use Rhino’s property tab to set a Usertext to blank, and it lives on that way. I cannot set it to blank ("") from RhinoScript though, and I need to be able to do that. So how do I set UserText to blank from Rhinoscript without deleting the key?