Select element by host

Hello,
I try to make a script that will select hosted element using host parameter value. The problem that I encounter is that I only managed to select all element (of all types) hosted on an element or only the last element placed. What I want is to select all element of a specified type. Below you could find my script at this moment.

@nedelea.rares ,

what do you mean by host ?

door in wall ?

panell in curtainwall ?

KR

Andreas

Hello @Draxl_Andreas,
By host I mean structural connection in walls (or parts as required), structural columns or structural framing. This hosted element have host parameter that is used to select them. element like structural rebar or fabric reinforcement could be ignored since it hot have a host parameter. Sometime I want to select all my lifting element from all walls (or parts) to replace them.
The script at the end is there only to allow Dynamo to highlight the elements.

get the hosted elements in this case the doors from the walls also keeps the indicies in case you want to insert information back to the object.

should be able to use the same setup for structual element (i dont really work with them so havnt tried it)

Hello stefan.gokstorp,
Looking at your script I can’t see where you tell it to select only some type of doors. What I’m looking is the ability to select only some types of hosted elements from all walls (or columns or structural framings). Researching a bit my scrip it seams that the problem is somewhere on the selection of element to be selected. It seams that data shapes package have a problem creating a list of multiple elements with same name, it works if I display element id listing every element separately.

ah missed that part you would have to add a node with get parameter value by name Code block/string with the Parameter you want to sort with. create one more code block add “x==y” in X you plug in the get parameter node and in Y you plug in the value you want to filter with., create filter by bool and plug in your list with doors in the first box and your list of bools from your Code block "X==Y should do it might have to change lacing