Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select Panel for Circuit

2 REPLIES 2
Reply
Message 1 of 3
eleeuwen
669 Views, 2 Replies

Select Panel for Circuit

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

2 REPLIES 2
Message 2 of 3
IbrahimNaeem
in reply to: eleeuwen

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 

Message 3 of 3
eleeuwen
in reply to: IbrahimNaeem

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community