Tag Re-Run Deletion, Dynamo Owned?

Hi,

I made a little graph to tag elements in view which filters down the elements… The default Revit does every element of a category.

The only problem with the graph is that if i want to tag something else, the previously created tags are deleted.

I presume this is because the tags are still Dynamo owned and I need them to be Revit owned? The Tag node is OOTB so i can’t see what’s going on in there, I tried making a Python to convert it but got an error…

Any suggestions gratefully received!

Mark

TagCurrentView.dyn (42.6 KB)

import clr

# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

tag = UnwrapElement(IN[0])

OUT = [tag.ToDSType(True), #Not created in script, mark as Revit-owned

Hi :slight_smile:

I do not really know anything about Tags, but your Python Script may be bugging because you are missing a closing bracket at the end of the output

import clr

# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

tag = UnwrapElement(IN[0])

OUT = [tag.ToDSType(True)], #Not created in script, mark as Revit-owned

Hah, thanks!

I’ve updated and tweaked and it works! (So far)

Would you know how to get my output working? I can’t get my head around what tel is == to…
Mark

import clr

# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

tag = UnwrapElement(IN[0])
output = []
tel = []

for t in tag:
    tel = t.ToDSType(True), #Not created in script, mark as Revit-owned
    if tell == True:
        output ="Success"
    else:
        output = "Fail"

OUT = output, tel

Hi @Mark.Ackerley

Use archi-lab Create annotation tag instead you will feel the difference :slight_smile:

1 Like

Awesome, thanks, that’s an education!

Again, i do not know anything about tags, but that is my guess if you are trying to correct your Python Script :slight_smile:

import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

tag = UnwrapElement(IN[0])
output = []
tel = []

for t in tag:
	inter = t.ToDSType(True)
	tel.append(inter)
	if inter:
		output.append("Success")
	else:
		output.append("Fail")
OUT = output, tel
2 Likes

Boom! Thanks for that :slight_smile: