We use document user text to populate title blocks on drawings. One of our engineers noted recently that if document user text is edited in Options>Document User Text to empty or space [“ “], then the key gets deleted creating a #### error in the text object referencing that DUT. This does not happen when the DUT is edited with the Document User Text Panel. We have an easy workaround with the panel, but can you update the Options>DUT to not delete empty keys?
It’s currently not possible to have a collection of empty keys stored in the files document text due to how the documents dictionary depends on keys for uniqueness. The floating panel might make you think its doing something different but will update and clear the values the minute you modify the document and show the same state as Options > Document User Text after you click OK there.
Have you tried BlockAttributeText? It’s a better fit for this type of workflow.
Your response is somewhat counter to our experience. I’ve only used the panel to edit document text in the past and have never had an issue with empty or “ “ values until I tried editing in the options window. The document prints (text objects referencing blank values) and saves properly with blanks so long as values are edited in the panel, so I’m not sure what you mean. We could use BlockAttributeText, and that would work fine too. I prefer the document text as it is the file properties that should populate the title block, like “Title,” “Rev,” “Author,” etc. so that if a title block is copied from one drawing to another those values are document dependent.
I might be confused. Are you talking about empty keys or empty values? I read empty keys in your first post. Keys can never be blank since they must all be unique, values however can be a blank space “ “ but cant be completely empty or null. If the value is truly null, the keys are discarded. From what I can see here in the Options - Document Text. Adding a Key but no value does work as the UI slips in a “ “ holder for the value by default. So I’ll need more of a play by play to see what’s happening on your end.
File starts with a single DUT item: key:Key1, value:1 and a single text object in model space with contents “%<DocumentText(“Key1”)>%”
Enter Rhino Options>Document User Text
Edit the value for Key1 from “1” to “ “ [space, not null or empty]
Click outside the table to deselect the Key1 value, this row is still there. Click ‘OK’ to exit Rhino Options.
Text object shows “####”. Reopening Rhino options, you’ll find that the row for Key1 has been deleted.
So Rhino Options is deleting document user text Keys when their associated values are empty or have a space. The document user text panel does not do this.
Thanks. I struggled to repeat this issue but I added an additional check to the process to preserve empty values. It will go into the next major 8.x release RH-90302