Help needed: Get BlockAttribute keys with RhinoCommon

Hi there,

I insert a BlockDefinition from file, that has a TextObject with dynamic text field (block attribute) like this:
%<UserText(“block”,“tnm_grid_bubble_key”,“tnm_grid_bubble_key”,“X”)>%

Is it possible to get a list of all available Block attribute Text Field keys (e.g. [“tnm_grid_bubble_key”, …]), from all TextObjects that are inside the InstanceDefinition using RhinoCommon?

(n.b.: regex search on r'%<UserText\("block","([^"]+)"' only works when attribute value has never been set on any blockinstance)

Thanks,
Tim

@timcastelijn
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.instancedefinitiongeometry/getuserstring#(string)

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.instancedefinitiongeometry/setuserstring#(string,string)

This should do the job…

Hi @tobias.stoltmann,

thanks for your response
However, I’m not looking for the UserStrings set to the BlockInstance. I am looking for text fields that are available on TextObjects inside the blockDefinition.

I’ll update my original post, because I see that I could have formulated my question more explicit.

Thanks,
Tim

@timcastelijn
What about these?