Hello guys,
im trying to clash a family instace (window) with the rest of the HVAC/MEP parts. However if i try to get the elements of the system it return only “null”. My qeustiob is: is there a work around to adress all ducts/pipes/cabletrays and so on?`Also is there a way to tell my window that it is a “solid” or do i need to make a new family?
Hi @maldemu96 not 100 % sure but is something here you are after ?
Are the Element Classes custom nodes?
no ootb comes in 23 if i remember right, in older version just elementtype----all element of type
Hey, thanks you for your help so far. I got a question in advace. Like you can see in the picture im trying to get three different lists from my select.elements node. I first made it in another file and it worked perfectly fine bc it had all different element in one list. However now when i dont have them in one list i get this error. I know its because the “List.GetItemAtIndex” node cant find and index that is not there due to no elements in that list. So i think i need a better way to seperate my list or just stop the script after not finding any of the missing elements. Do you have a suggestion to my problem?
You’re right, having empty lists where you’re trying to read parameters is going to cause problems. One option would be to do this in python where you can make a conditional for the list of parameters to return. If you’re not comfortable with python, I’d suggest looking into dictionaries. You could create a dictionary of parameters for each category and then get the category of each element in your model. This would give you a list of parameters to match the list of elements instead of having separate branches.
Hey Nick,
im not very familiar with python but i did get a script done. Unfortunately it doesnt work like i want it to. Any suggestions?
What are you feeding it? The node on the left is a list of lists and contains empty lists. You haven’t accounted for either of those conditions in your python code and are checking the object against a string.
The benefit of using python (or a dictionary) is that you don’t need a structured list. You can flatten everything and not worry about empties. Try flattening your input first and then check the elements’ categories. You’ll need to use the API for this. If you’re not familiar with the API, a dictionary with nodes will be much easier.