There is no way to plug a document into grasshopper’s user text component (which is what I usually use to see the .keys on model objects). The field expressions component only gives values for keys, it would be nice if I can also retrieve a list of all keys on the Document User Text.
Hi Jessesn, I am asking regarding User Attribute Text on the Document and not User Attribute Text on Model Objects. Are you saying that there is a way to connect the Document to the User Text component?
In Rhino run _ScriptEditor, add a new Python 3 script and paste this code:
#! python 3
import scriptcontext as sc
for i in range(sc.doc.Strings.DocumentUserTextCount):
print(sc.doc.Strings.GetKey(i), ":", sc.doc.Strings.GetValue(i))
This will print all keys and their values to the command-line and script editor terminal, including keys starting with a ..