Tagging linked file elements using Dynamo

@LOESCH_PK,

I observed your graph. With the node Multi-Category Tag, you don’t need to cycle the views.

The python script inside the node is in english and you need to translate the terms “Rooms Tags”, “Space Tags”,… in polish if you use a polish version of Revit.

If you work with Revit 2017, use “Create Annotation Tag (Multi-Category)”.
The node “Create Independant Tag” works only with Revit 2018 and 2019.

@r.vanderscheur,

Can you give it a try without cycle yours views and with a single linked file to find the error ?
It is working perfectly for me with Revit 2018 and Dynamo 2.0.

@Alban_de_Chasteigner Could it really be a problem with the language? I didn’t observe it being an issue in any other situation. Dynamo seems to always understand what kind of element it works with, the drop down menus show polish “Pomieszczenia” but it reads them as “Room” though when I want to get or set a parameter I do have to type the polish name of it. Other custom nodes also seem to not have an issue with language. But OK, I’ll give it a try when I have a moment. I’ll probably struggle with that since I barely know Python.

Also the error seams to say it has a problem with the fact that it’s a linked file.

I don’t need to cycle the window, but is it a problem if I do? I need to tag precise rooms on precise views (4-8 rooms on 386 views). If I make him tag all rooms, on all views, that will be about 2900 rooms, on about 750 views. Not to optimal.

Hi,

The picture above is only a principle to show how the node works with a linked file !
Of course, do not tag all the rooms on all the views of a real project :slightly_smiling_face:

To use this node with a French version of Revit, I need to write the French categories in the python script.

1 Like

@Alban_de_Chasteigner I am pleased to say that you’re suggestion has moved my closer to resolving my problem. :slight_smile: The category names in the Python Script had to be changed to Polish. Butnow I got two more problems. The original “Create Annotation…” node returns that it has created the room tags, but they are nowhere to be found. Searching by ID can’t find views with those tags, but it lets me select them… The category is not turned off in the view. But the list shows exactly as many tags as intended, though I had toi input only one LinkInstance.

Using a modified “Create… (Multi-Category)” actually created the tags… over 28000 tags instead of 169. It created as many tags in one spot as rooms were given to that view, and as a bonus it tagged rooms that I didn’t want to tag, but were partially on the view… So it looks like it ignores the list of rooms and points I gave him, and just tags the shit out of every room of every view it gets, as many times as he gets the views.

OK, more about the “Create Annotation Tag” node. I can confirm that the Tag IS in the view it is supposed to be. I used the Revit lookup add-inn and it confirms, that the Tags exist in the views and exact locations that they should be. But they are invisible! I turned on show hidden element’s, and they are not there. What kind of sorcery is this?

Hi,

The Create Annotation Tag (Multi-Category) node from Genius Loci package works fine.
Just provide the list of views where you want tags to appear.
You have to adjust the View Range and the scope box on your views if you don’t want to see some rooms.

Well, probably yes, but a bit differently than the original one, doesn’t it? The original seams to to take one item from each list (On view A, tag element B, in location C), whilst your node seems to tag every given item on every given view (On view A, tag XYZ, on view B tag XYZ). The approach is fine, even preferable in some scenarios.

The problem is that for every hundred tags I need it created thousands of ones that I don’t need and that take up memory, not much probably, but still. For now I can turn on Annotation cutting which eliminates most of the tags I don’t need.

Is there any way to delete tags that are not visible at the moment?

If I don’t find any solution to the invisible tags from the original node I’ll probably use the one you provided anyway. :slight_smile:

I just tested with a definite list of rooms and it worked fine.

So nothing prevents your workflow from working well.

1 Like

Well the scale is a problem. I’ve got 386 views, and a total of about 2600 rooms on 8 levels to tag. If he checks all of those rooms, on every view he gets, he checks about a milion times instead of 2600 times. I’ve tried the node on a smaller portion of the project and it worked pretty ok. But now I’ve ran it for my whole project, and I’m waiting at least 20 minutes. :smiley: I mean It will probably still work, but it’s not the most optimal solution.

Ok got a solution. I just feed him 50 views and 50 rooms associated to those rooms at a time. Which dropped the time to below 5 mins. :smiley:

Still, due to the way the node makes the tags (He tags every room on the view regardless of view crop!) I ended up with over 135 000 tags (where the goal was around 2600), which increased the file size from 50 to 56 mb. :smiley:

EDIT The loading time of the file also noticeably increased.

@Alban_de_Chasteigner I owe you an apology. After wasting the whole last day trying to delete 133000 tags that are croped (and failing miserably) I decided to give your node another try and change the way I feed it data (via list levels). So now it gets one view, and a set of rooms/locations at a time, so it creates precisely the tags I need.

Working after a full nights sleep really makes a difference. :slight_smile:

@Alban_de_Chasteigner

Hello Alban,

Below a graph of the way we model. Different party’s combined make Model A. Model A, B, etc combined make the final model. Our output is made in this final model, this is also where the tag needs to be used.

Here is the full graph without cycling the views and linked files. Also i noticed the lacing to be shortest, which I changed now. I did use a similar approach without linked files which worked.

Hi,
Your picture isn’t readable.
Please link your .dyn file to not reinvent the wheel.
I’m not sure it’s possible to tag in the final model.

There you go! I tried tagging in the ‘Model A’ with the same note, but that didnt work.

Aanzichtentags v3.dyn (95.3 KB)

Any examples of Independent Tags working with family elements not Rooms/Spaces?

I tried it with Air Terminals in a link and an Air Terminal (single) tag but just got;
Error: ‘type’ object has no attribute ‘create’
on the line that includes;
tag = IndependentTag.Create(doc, views.Id, reference, False, TagMode.TM_ADDBY_CATEGORY, TagOrientation.Horizontal, location)

This is using revit 2018.2 and Dynamo 2.01
The inputs seem correct and this method is definitely in the 2018 API docs…

Multi Category tag also gives the same error

Hi,

You can use the Create independant Tag node in Genius Loci package to tag linked elements.
Thanks to @Konrad Sobon for the initial Python script.

Hello @Alban_de_Chasteigner & @josephpeel ,

At first
I’m allready using the Genius Loci package. Both of the Anno-tag notes give the same error: familyinstance is not iterable.

This is the line with the error: for i, j in zip(elements, locationPts):. I tried to trace back the familyinstance that wouldn’t be iterable. For some reason the elements imported can’t be found. My input for elements is a list of generic models (I also tried just 1 element).

Thought I found the error:
The elements were placed in file 1, which was linked into file 2, which was linked into file 3 (this is the way we work yay). On the next experiment I tried to run the script in file 2. Unfortiunally it gives me the same output…
image

My total input is 4 flattened lists:

Anyone out there that knows a solution?

Hi,

Can you provide a Revit test file, your dynamo graph and your Revit version ?
It’s not possible to help you with so little information.

Hello @Alban_de_Chasteigner,

The files are a too big to upload. Here’s a downloadlink: https://we.tl/t-do0xU9GXGG

Revit 2018.3.1.2
Dynamo Core: 2.0.1.5055
Dynamo Revit: 2.0.1.5065

Packs:

Thanks in advance for the help!