Change Level and host

Hello

I have created a script, where I can place electrical families all around the project automatical from an excel and a 2D symbol.

The issue is, when I place the objects, the object doesn’t have any level and the host is set to none.

If I place the same object manual I got an host and an level

I have tried to read the threads Level Parameter Bug - Read only and https://forum.dynamobim.com/t/change-family-host-level/6076, but cant get the python code to work.
<img src="//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/business6/uploads/dynamobim/original/3X/0/8/083693a74da4d0dd8df058b08bea73672c0c789d.png" width=“643”

/Simon
height=“500”>

Hello

I see you didnt get the last picture.
There is no reference level. Its called Level, but it is not on the object when I place the objects automatical. but even if I place it manual I cant change the level. as you can see on the picture below it say read only parameter. It is the same for the host

Hi again

I found the solution to change level, if I had manual modelling a object.
But my issue is, that I have created a script to place the object automatic, and then it seems like the parameter “Level” doesn’t exist.

Why not create the families using this node:

That way you can change the level afterwards by following the previously mentioned posts.

2 Likes

Thanks

that works. Didn’t see that node

1 Like

Hi. I’m refreshing the topic. I’ve got the same problem, with no option of setting new host after placing face based elements in a model using dynamo script. I used the node with a level, but that didn’t help. The Host parametr of such script-inserted element is read only and it’s value is “None”. Also, the “Pick New” icon is greyouted. Did anybody find a solution to that?

hey guys! I am also having the issue where I am using the FamilyInstance.ByPointAndLevel node to place Mass family instances, however, the host does not get associated properly with the inability to set it after the fact in Revit.
image
Any advice would be appreciated!

Hi @dana.defilippi

Try using Element.Host custom node from clockwork package.

1 Like


thanks @Kulkul for your reply!! however, no luck :frowning:

What type of host would you expect here? The level?

1 Like

Hmm…
@dana.defilippi Could you check first if element has host or not by this way:

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

#Inputs is stored in the IN variable
elements = list(UnwrapElement(IN[0]))

#Output with Check if element is Hosted
OUT = [(True if i.Host else False) for i in elements]

Make sure you flatten your list after FamilyInstance node.

Good Luck!