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…
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
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
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
Again, i do not know anything about tags, but that is my guess if you are trying to correct your Python Script
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