I’m trying to add a few air terminals to a Mechanical System by using the ‘Add’ method for systems. The problem I’m running into though is that by calling the ‘Add’ method is that python uses the standard ‘Add’ method for lists, so it just returns a list instead of adding the terminals to the system.
I know there’s a way to import modules by using the ‘as’ keyword to define a custom name for it, but is it also possible to do this with a single method from a module? Or is there any other way I can force the MEPSystem.Add method over the default Add method?
Turns out nothing was wrong with python’s selection of the method (as I should’ve known). There were actually 2 mistakes I made:
- I fed it a list instead of a system (a list with only 1 item: something you can quickly overlook)
- It turns out Dynamo doesn’t understand ConnectorSets. Input IN was supposed to take in ConnectorSets that were coming from another python node, but Dynamo just turned this into connectors.
I fixed the code by getting the ConnectorSets in the same node, like this:
Thanks Taco, this works great.
(I know its in your nodes too but I havent updated for a while…)
EDIT: If you feed this elements that are connected to each other (Eg. Air teriminal and Duct) then it gives the error that the second connector is already in use and the node fails.
So… only set one element in a connected network and revit will do the rest automatically.