User Attribute Text inside a block

I am having issues with Leaders and blocks.

When I create a leader inside a block and connect it to an objects user attribute text it shows up correctly

But when I close the block edit window the text is now XXXX

If I go back into the block edit view it is still XXXX even though the fx text is retained.

Can anyone help me to try and fix this?

Thanks

Hi Simon -

When an object is converted into a block definition, the user text is no longer on an object in the scene, but on the object that now only lives behind the scene in the document’s block table.

We have the feature request on the list as RH-57020 UserText: Retrieve attributes from a block definition

Recent related topic:

-wim

Ok thank you. So does that mean it currently not add leaders in blocks with Dynamic text?

Is it possible to do using a script?

Hi Simon -

In the thread I linked to, @scottd was looking for a way to do this with a script.

Note that you can script (with, Grasshopper, for example) adding leaders with text fields that refer to attributes of objects in a block definition. The leader is not part of the block definition, though.
-wim

Ah ok thank you. I don’t need the leader to be part of the block definition but I’d like to be able to try and reference an object inside a block.

Essentially, I’m trying to add leaders that show the material name eg. TL-01 on a drawing layout.

I’m just not very (at all) proficient in grasshopper :joy:

I have a title block that references Document User Text and Layout User Text from the file where it’s inserted. Could you use something like the Document User Text to implement this? Say, have a Key of “WidgetMaterialAbbr” and a Value of “TL-01”?

Then, in your leader inside the block, you would have the text:

%<DocumentText("WidgetMaterialAbbr")>%

Ah ok, this could work. I will give it a go tomorrow! Thank you

I tried this but I need the leader text to dynamically update if I change the material on the object. Not sure it’s going to be possible if the object ID keeps changing when I edit a block

Hi Simon -

If you are proficient in Python, I see that Scott added a script in that other link a few hours ago.

For a quick Grasshopper example:


→ Add Material Leader to Block Instances.3dm (2.1 MB)
→ Add Material Leader to Block Instances.gh (9.7 KB)

-wim

Ah your grasshopper solution looks great. I was just hoping you might be able to explain how I might be able to add additional objects into the block, with different material codes, and create new leaders? This would cover what I need.

Thank you

I managed to get some more blocks created with tags. However, when I added the third block the material code overwrote one of the other tags and I’m not sure how to create a second leader if I add a new object.

If you are able to help it would be great. Thank you

1 Like

Hi Mr Simon,

The idea here is that after changes are made you run the script, this will modify the previous iteration, removing and adding in new leaders as needed.

There is also a option to use a Named Content Cache, this would leave the previously named Cache Leaders alone if need be. There are also ways to ensure you are only getting the objects types you are looking to tag.

R8-Block-Leaders.gh (10.8 KB)
R8-Block-Leaders.3dm (389.6 KB)

1 Like

Ah this is great thank you.

I moved my interior design team from CAD for drawings with Rhino and Twinmotion for visuals over to Revit and Twinmotion for everything . We do highly detailed interiors with a lot of custom joinery and furniture, but we are struggling with the time it takes to model in Revit. Therefore, I’ve been exploring if we can bring Rhino back into the workflow to speed up our modelling process but also potentially do the drafting of Furniture and Joinery in Rhino.

@Japhy ideally we could model furniture, joinery and items like intricate wall panelling in Rhino and use Revit for drafting and I noticed on another forum about Rhino inside Revit, that you were discussing with a user about using Rhino for modelling and Revit for drafting. Do you envisage that this would be possible to do and send material info along with the geometry into Revit. I watched a few tutorials and I think :crossed_fingers: it should be ok but would be good to get your thought.

Managing materials/specificstion is a big issue for us as we sometimes have can have 100’s in a small project. We are using AirTable as a database for the design team to store and assign finishes to spec codes and my plan would be to have Rhino as the source of spec code truth connected to both AirTable (using a grasshopper plugin I found) and Revit.

Any thoughts you have would be great.

That is totally doable, let me know what we can do to help.

Ah great stuff. I will do some testing tomorrow and see how I get on.

@Japhy

I’ve successfully managed to add items to Revit using Rhino inside and send the materials and the Material code, which is great.

I was wondering if/how I might then send the texture map from Rhino as well?

I understand that I am just creating direct shapes in Revit rather than native geometry, but is there a way to create an actual extrusion in Revit as well so that when I section the item I can assign materials/hatches to it for my drawings?

Creating Family elements can have a Material assigned or even manually associated with a Material Parameter, this gives optimal control of an Instances Material.

The texture map can be added to a Revit Material by adding/modifying a Bitmap Asset to its Appearance Asset

HI, is there a way to automatically pass user text from the defining geometry objects to a block definition ? I understand how to apply user text to block instances but cannot seem to have them in the block definition so that every instance has them attached

I’m also curious about this..

I made this python script for rhino which creates a block from a source object with user text and passes the text to the block.
TRANSFER-USER-TEXT.py (1.4 KB)