Tagging a Legend in Revit

Hi All,

Has anyone developed a script that would allow you to tag legend components in Revit? The category in question we are trying to tag is doors. any help /tips would be greatly appreciated. Thanks.

Claire

@clairesimpson

Apologies but I have to remind you that this is a help forum and not a place to ask others to do your work. Please show some work, provide a sample file, provide images with any relevant errors etc. It will allow users here to better assist you.

Thank you,

1 Like

That’s fine if that is the purpose of the forum, I will keep that in mind for future posts. I am not asking anyone to do my work for me!

Please read this thread: http://forums.autodesk.com/t5/revit-architecture/tags-for-legend-components/td-p/3296519

Thanks, I came across that thread yesterday.

Hi Claire,

I had some success with this if you haven’t solved already (or anyone else who is curious or looking for a Dynamo workflow). The above solution is great, but tricky to implement for those who don’t keep all their doors nested in one master door family (master door family has many advantages btw). This workflow uses a Generic Annotation family in the legend view populated by Dynamo.

Legend Components behave a little differently to normal model elements. By selecting the legend components in Dynamo you can get the parameter “Component Type” and convert to a string. This is the full name you see in the little list when placing the legend components in the view. Using the string split node you can extract the name of the corresponding family type. You can also extract its geometry to get a rough placement location in the Legend, however I wasn’t able to find any nodes that can place elements in a legend view.

Once you have the name, you can select the real corresponding elements in the model using FamilyType.ByName and extract the desired parameter data. This data can then be pushed into the instance parameters of a generic annotation family which you’ll also need to create and place in the legend view. Using Geometry.DistanceTo I was able to make sure that the parameters were being pushed into the closest generic annotation to the legend component.

The only issue is that the user will need to run the script to make sure any updates in the door parameters are accounted for, but I prefer this to creating phases and phantom objects in the model as a work-around.

4 Likes

5 Likes

5 Likes

You will find useful tips on how to introduce a new request in the forum guidelines, please read them carefully…

This has helped a lot, thanks, I made a slight modification so that parameters in the annotation that start with TAG are populated with values from parameters of the component, so to add new parameters no code change is required, e.g. “TAG Type Name” gets the value of “Type Name”.

image

1 Like

Hi I was trying to use your script. It cannot get the list of door types out. I’ve attached the screenshot of the script for your reference.
We used generic annotations and door legend components. The parameter values being extracted are “Type Mark”, “Frame Material” and “Door Material”

let me know if anything wrong in the dynamo script attached. Thanks!

The lower Watch seems to have a category, not a family type. The node to the left of List.GetItemAtIndex should be List.LastItem and should have its lacing set to longest.

Hi Christopher and thanks for this useful script.
But I have a problem the Element.Curves gives me empty list

@christopher.rossetto need your help boss :slight_smile:

Hey Mahmoud,

Apologies for the slow reply, haven’t been on here for a while. It looks like columns behave differently than doors. I’m guessing that I can see curves in the door’s legend component because it has a 2D linework graphical representation that shows the door swing in plan, whereas the column is simply showing a cut of the geometry, a solid in this case. It’s still picking up the solid geometry though, so you should be able to use this to get a rough xy location of the column’s legend component to measure the distance to the tag.

Thanks for sharing your work, Christopher!
Here is the release without Master Family. (Script is still under construction, I’m trying to figure it out how to make multiple selection tagging, started use Python.)
By the way what is the Master Door Family? Any advantages?
Ti_Legend_Tags_Annotations(Dynamo1.3.3).dyn (45.1 KB)
Ti_Legend_Tags_Annotations(Dynamo2).dyn (101.4 KB)

Hello, I was trying to tag structural beams from a legend, could I use your script for that?. I select the elements in the lengend but I see that some of the lists are empty. It reports errors.

Any empty lists or null strings will produce errors in any script. Get rid of it.

Thanks, I solved it. I’ve added a set parameter at the mark to fill it with the name of the instance.

@christopher.rossetto, I’m having problem with the script.
If i select 1 Generic Annotation and 1 Legend Component, it works fine.

But say I have 5 doors, and 5 Generic Annot for each doors for the data to be filled in, i use a window selection to select them all, the data are all mixed up.

kindly assist