Add beam tag to structural plan

hello, i am trying to add beam tags to structural plans that match each beam’s reference level accordingly.
As far as i know, built in revit adding annotation tags can only add tags to current view, is that correct?
If so, i want to add beam tags to all beam just by one click
As shown in the image, each list in the Curve.PointAtParameter and List.GroupByKey node contains all beams in the level and i want to add tags to the corresponded index of structural view in List.GetItemAtIndex node
For now, it works fine within reasonable time when only one level is selected, but takes ridiculously long when multiple levels are selected. Is there anything i did wrong?

I’m new to dynamo, please let me know if there’s workaround to allow such tasks. thanks in advance

Hi @brian3814

Can you show the "Element" entry from "FilterMask". Note that each point must be connected to 1 element. If not, you can resolve this problem with "ListOfRepeatedItem". If your problem is not resolved please share the file.

Durmus

@Durmus_Cesur Thank you for your reply! I have been working on this for quite a long time, if you can show me the path to solve the problem, i will be very grateful. Unfortunately, i’ new user and can’t upload dyn file, so i posted a screenshot instead.

The issue that confuses me is that the beam annotation function within the revit seems to run efficiently when tagging current view with hundreds of elements, but could be quite annoying when there are plenty structural plans to add. But my dynamo takes extremely long time to run through this script even when relatively less elements are selected.

Please let me know if there are other approaches in dynamo or there are ootb function in revit, i can’t find any related posts on the forum.

Thanks in advance!

Is the code you’re working on running smoothly and just complaining about the length of the process?

I would say the code do works, but compared to the beam annotation function, the process is oddly long, like revit does it within seconds and mine takes minutes for the same amount of elements. I’m new to dynamo and definitely not a techie guy, so i can’t tell is it because my code was written in a redundant and illogical way?or it is normal when dealing with such tasks with dynamo. i thought it was the code problem so i was hoping someone might help me to refine it.

This is my first post on the forum, if i asked something silly or did something appropriate, I apologize in advance

I’m glad the code works.

Regarding performance issues,
1- You can start simplifying the code. Use fewer nodes and, if possible, work with Python.
2- Delete all packages that you used in Dynamo, restart the computer and reload it with the current version. Maybe there may be conflicts.
3- If your files are opened on any network, this will slow you down. // Low Probability
4- Keep Revit up to date.

By the way, you can ask anything in this forum without hesitation. None of us are guru. //Except for several people :slight_smile:

1 Like

Sorry for the late reply, i revised the code accordingly but the process is still slow, it seems like it’s still adding tag to the first structural plan after 10 minutes (i do have lots of elements though), perhaps that’s the way it is if using ootb nodes?
I’ll give python or API a try, thank you for your advice.

Hi,

I’m not using Ootb nodes. I believe Python will be the solution to your problem.
Also, if you do not completely remove the packages and install them as current, your problem may continue.

Hi Brain,

Tried to modify your script a little bit so suit my requirement but in the process i found that when a list of views is given as input for the Create Annotation tag node it fails to create tags for all and ends up with just the number of tags equivalent to number of views. Tried to dig deeper into the python code and found views, elements and TagLocations are in same for loop which was causing this issue. Modified the code as below (Line 121 to Line 127)

I tried the script on small model with 2 levels and works like magic. Will update here in case it lags when i run it on a big model with large number of beams.

Create Annotation tab node python code -
image

Modified Python code -
image

Final script -

Regards,
Malthesh