Hi all,
I want to get the load case name of an hosted area load in Revit but the result is loadcase Id instead. I also use the element.Host from Clockwork to get the host id but it didn’t work. Can you guys help me on this? Thanks
Hi all,
I want to get the load case name of an hosted area load in Revit but the result is loadcase Id instead. I also use the element.Host from Clockwork to get the host id but it didn’t work. Can you guys help me on this? Thanks
Hi,
To get the name you can simply use Element.Name. Usually I also check the parameter of the element with Element.Parameters and then select them by name.
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
elems = IN[0]
hosts = []
if not isinstance(elems,list):
elems = UnwrapElement([elems])
else:
elems = UnwrapElement(elems)
for x in elems:
host = x.HostElement
hosts.append(host)
OUT = hosts
Hi Luca,
Thanks a lot. but the python node didn’t work for me. Pls take a look at the warning. I don’t know python so I cannot understand the warning.
It’s a typo in the code. Correct the spelling of “Autodesk” and you should be good.
Yes exactly, now I corrected the post
Hi luca. there’s a typo in the line 11 as well. should be elems instead of elem. Thanks
Thank you! With my version of dynamo I cannot use Ctrl+C/Ctrl-V, it’s a known bug but I didn’t have the opportunity so far to udpate it. So that’s why there were a couple of typos, I had to manually rewrite here the script.
Now it should be fine