How to get load case name and host element of hosted area load

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


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.

For the host I tried with nodes from Clockwork and Archilab but they both don’t work. You can do it with a very simple Python script:

import clr

from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

elems = IN[0]
hosts = []

if not isinstance(elems,list):
    elems = UnwrapElement([elems])
    elems = UnwrapElement(elems)

for x in elems:
    host = x.HostElement

OUT = hosts
1 Like

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.

1 Like

Yes exactly, now I corrected the post :wink:

1 Like

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 :slight_smile:

1 Like