Hi Everyone,
When I'm using the UI and I select an Element which has a circuit the Ribbon Tab "Electrical Circuits" appear, in this Tab I can click the button "Select Panel" or I can use the drop-down list which shows all the compatible panels.
I want to make a similar function in the API and I already have some code that mimics the "Select Panel" button, but I'm wondering how I can get a list off all the compatible panels for a certain circuit.
I need this, because the drop-down that is shown in the Ribbon only shows the Panel Names and I need more information, because sometimes a panel name isn't unique.
Is there a way I can get all the compatible panels for a circuit through the API?
Regards,
Erez
use filtered Element Collector to collect all panels then iterate between them in a loop and select depending on a parameter value you wish. Technical Question, I'm not an Electrical Engineer but supporting my mates here so I know that they do name every panel with unique name,am I wrong?
Thanks, Ibrahim Naeem
Hi Ibrahim Naeem,
Starting with the second part of your question, no not every panel name is always unique. If that were the case, then I could just tell people to use the drop down that Revit provides. When you have a very big Revit project and there are loads of panels and the panel names aren't unique, then you need more information then just the panel name to find the right panel. And because it's a very big project it's difficult to use the select panel button, because finding and selecting the panel within all the components proves to be difficult.
I could indeed use the FilteredElement collector to get all the Electrical Equipment in the document and then try and filter that to get a shorter list, but there seem to be loads off different parameters and settings that define whether a specific circuit can be connected to a specific electrical equipment.
For a power system this seems to be linked to, the "Panel Configuration", the "Part Type", whether there is a connector, and a number of connector parameters like the "System Type", the "Number of Poles", the "Voltage", and the connector values specify what distribution system can be attached.
This is to much to check and there are to many different variations, that is not something you would want to program.
Hence the question how does the Revit UI do this? And more specific, how can I get the same list from trough the API.
Kind Regards,
Erez