I’m looking for some massive help improving a Dynamo script that I’m hoping will save me hours and hours of time if I can get it working. I have created an Electrical Fixture power tap family which acts as a power tap. I place one of these at each piece of mechanical equipment, fill out the electrical parameters based on information provided to me by our mechanical team, and then connect it to my electrical panels. The power tap family is inspired by abulla’s solution here:
Right now, the script can automatically create the power taps and place them at each mechanical equipment, and transfer the Mark parameter as well. But if our mechanical department adds six new exhaust fans, re-running this script would create duplicate power taps at any existing equipment. Here’s sort of a high level idea of what I’d like the Dynamo routine to do:
- Store non-changing ID (can we access GUIDs?) of mechanical equipment as a parameter in the electrical fixture power tap
- If there’s already an electrical fixture with that ID, don’t create a new one.
- If there’s not an electrical fixture, with that ID, create a new one.
- In either case, update the parameters from the electrical fixture with matching parameters from the mechanical equipment. Including: “Requires Power”, “Electrical Load”, “Electrical Voltage”, “Electrical Poles”, “Motor HP”, “Mark”.
- Use the “Requires Power” boolean to determine the visibility of the electrical fixture icon (through the visibility settings of the electrical fixture family, sort of out of this scope) as well as the visibility in an electrical equipment fixture schedule.
- Ideally, there would also be some boolean toggles to control which information gets transferred. Two ideas come to mind here. One, a bool to determine if running the script will update the positions of any existing power taps. Two, an instance parameter bool called “Override Mechanical” which would prevent the routine from updating the load/poles/voltage parameters for that power tap.
- As if all of this isn’t difficult enough, it’s fairly likely that the mechanical department will load in a mechanical equipment family that is missing the required parameters, so the routine needs to somehow error trap these cases…
Edit: Here’s a copy of the power tap family as well:
EF Mechanical Equipment Power Tap.rfa (368 KB)