Schedule Door Tags - Doors in Linked Model (BIM 360)

Wondering if anyone has a solution to this problem:

I need to schedule all the Door Tags in a model using a parameter from the door which the tag is linked to. Issue is Door tags are not schedule-able in Revit.

So I was thinking to use dynamo for all the back end, my plan was the following:

  1. Give a “dummy” element the parameters I need to schedule

  2. Collect all the linked doors using the information found here

  3. I want to use the Element.IsTagged node (from SteamNodes) but I cant collect the door tags with “All element of Category” - that node breaks every time

  4. I tried to use the solution shown here - however I cant get the tag host element or tagtext after using this node. The node outputs the tag as an element not a tag and thus I can not use it in any tag node thereafter.

Any Ideas on how I can get the text from the tag and schedule it?

Have you tried BimorphNodes for option 3?

Can you show me what you have tried for option 4?

Hope this helps,

1 Like

Hi Steven,

To clarify: The doors are located in the linked model and the tags are in my model. I am not having an issue collecting all the doors from the linked model.

I am trying to get all the Door tags from my model and their label text. The standard “All elements of Category” breaks every time, see image: image

Collecting all the tags with option 4 gives me all the door tags but as elements so I cant get the tag info.

Any other idea on how to get the label text out of tag?

Whats the warning? does it output anything?

The error does not output anything. It says the following:
“Warning: ElementQueries.OfCategory operation failed.
An internal error has occurred.”

It may be an version issue between Revit and/or Dynamo. Could you use filtered element collector in python to collect the elements and see if that works? You may also search the forums for other people whom have had similar issues to see if they have determined a cause.

import System
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
import Autodesk

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

cat = IN[0]

bic = System.Enum.ToObject(BuiltInCategory,cat.Id)
tags = FilteredElementCollector(doc).OfCategory(bic).WhereElementIsNotElementType().ToElements()

OUT = tags

Hi @SeanP

Thanks for the advice but I am still getting the same error. The model I am working on is in Autodesk360 I wonder if that is the issue.

Do you have any advice on how I can schedule door tags with their label text?

_"Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. _
An internal error has occurred."

Well, it appears it has to do with the tag from a linked model element. I have been able to recreate the results you are seeing. I can’t even “select” the tag without it breaking.

That has all the hallmarks of a bug - probably best to post this on the GitHub and see what the Dynmao team have to say about it.

It looks like the error occurs when Dynamo attempts to wrap the IndependentTag element. In the RevitNodes library there’s no wrapper class for it, but typically, such classes will normally get wrapped in the UnknownElement wrapper and this seems to be failing.

The alternative is to not output the elements directly - perform the necessary actions within the script and return something other than the tags.

2 Likes

Interesting thanks for the explanation - Would you be able to help me write the code?

I need to pull the label text and family type from the tag, but I dont know how to write it into the code.

Thanks,

It is already there… and over a year old… However it does provide a solution, although it is Python related.

1 Like

Thanks @SeanP and @Thomas_Mahon
The code given in that link solves the problem of collecting all the tags, However I still cant get the Tagged Element (ie the door). The code finds all the door tags but I cant pull out the label text.

Anyone know a way to get the label text of a tag?
(the tag text is the mark value of the tagged element)

This is not the best way but a way. First thing that popped into my head.

It grabs the tags and gets the BBox min and max points then check to see if one or the other are in the doors BBox. It does require that the Tags be within the doors BBox in Revit.

This might help get you there or at least a starting point. From what I read on Github that workaround will let you select them but all down stream nodes will fail because of the same problem.

Need to say Thank you to @john_pierson for help writing this bit of code.

import clr
import math

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

tag = UnwrapElement(IN[0])
view = UnwrapElement(IN[1])
list = []
	
for i in tag:

	bbox = (i.BoundingBox[view])
	pt = (bbox.Min.ToPoint(),bbox.Max.ToPoint())
	list.append(pt)
	
TransactionManager.Instance.TransactionTaskDone()

OUT = list
2 Likes

Thanks @Steven your code is really helpful,

However is it possible to feed the script a list of views and a list of door tags? Or just a list of door tags and get their locations?

Right I have to run the script for each floor that I have tags. I would like to be able to run it for a selection of floor plans. I have a script that I use to select the floor plans but then I cant input it into your code.

Thanks

I tried to edit the python but I am not very good at it yet. This new method will give a single point at the center of the tag so you will need to make sure that is within the doors Bbox. I origanaly went with the min and max point to increase the chances but this should be fine.

See Bounding Box of Tag for the python code.

Let me know how it does,
Steven

Thank you for your response,

I was able to implement the original code for a bounding box of a tag and feed it multiple views using List.Map. However this is not a proper method to successfully gather all the doors that are tagged as the door bounding boxes are large and pick up multiple tags.

I will have to continue researching this topic to schedule the door tags from a linked model.

thanks,