Add your own ribbon tab and buttons in Eplan Electric P8 (C#)

Once you have a few scripts, running each one from a file menu gets tedious. A script can add your own tab to the Eplan Electric P8 ribbon, with buttons that run your scripts in one click. The ribbon is the strip of tabs and buttons across the top of the Eplan window.

What you will build
A tab called Demo Tools with one group called Examples and two buttons, each with its own icon: Say hello and Show time. A matching remove script takes the tab away again, so you can undo the example cleanly.
What you will learn
Creating a tab, a group and buttons with RibbonBar, RibbonTab and RibbonCommandGroup
How a button starts a script: the command line ExecuteScript /ScriptFile
Giving a button an icon from an SVG file, plus a tooltip
Finding where a script is saved, with a Windows Open window as a backup
Making setup safe to run twice, with a matching remove script
Before you start
Eplan Electric P8 with scripting available (the example was run in 2026.0.3)
The download holds four scripts (RibbonSetup.cs, RibbonRemove.cs, ButtonHello.cs and ButtonTime.cs) and an icons folder
Put all of it in one folder, because the buttons need the full path of the scripts
No C# experience required, though basic programming ideas help; the files are commented
How it works
A ribbon is built in three levels: a tab, a group inside it, and buttons inside the group. The code follows them in that order.
The setup script needs to know where the button scripts are saved. In the 2026 test, Eplan did not tell a running script where its file is saved, so the setup tries a few ways to work it out. If none works, it opens the normal Windows Open window and asks you to select one of the files. The script then uses that file's folder. You can also type your folder into the ScriptFolder option at the top of RibbonSetup.cs to skip the question.
Run the setup once and the tab appears. If you run it again, the script asks before replacing the tab, so you do not end up with two.
When the setup finishes, a message confirms the tab was added and shows the scripts folder it found. If you do not see the tab, restart Eplan. Save any open work first.

The example keeps the two buttons simple on purpose. Say hello opens a small message.

Show time shows the current date and time.

Common mistakes
Moving or renaming the script files after setup, so the buttons no longer find them
Running the setup twice without checking for an existing tab
Forgetting to add a way to undo the change
Try it yourself
Download the example: https://github.com/justin-walzengineering/Eplan-Scripting-GUI-Examples/tree/main/examples/05-ribbon-tab
In Eplan: File > Extras > Interfaces > Run, then select RibbonSetup.cs.
Tested with Eplan Electric P8 2026.0.3: the setup, both buttons and the remove script were run in Eplan.
This changes Eplan's ribbon, so run RibbonRemove.cs if you want to undo it. It tells you when the tab is removed; if it is still visible, restart Eplan.

Ideas to extend
Challenge: add a third button that runs one of your own scripts
Make a second group with its own buttons
Pick better icons for each button
Key takeaways
Build the ribbon in order: tab, group, button
Give every button the full path of its script
Always provide a remove script
Community spotlight
Who or what: A post on showing the legacy menu in Eplan, by Johann Weiher (Suplanus): https://suplanus.de/eplan-legacy-menue-einblenden/
Why it is worth a look: If you like adjusting how Eplan's menus look and behave, this is a short read from someone who has written extensively about customizing Eplan.
Good to know: Takes it back to the old school ways of how Eplan use to function. The future of Ribbon tools and designs has changed the landscape of Eplan; for the better!
Repository with all examples: https://github.com/justin-walzengineering/Eplan-Scripting-GUI-Examples
Maintained by Justin Walz, Walz Engineering. Questions and ideas for future examples are always welcome, and if you would like help with a script of your own, feel free to get in touch.



Comments