Change Panel Title through bundle

With pushbuttons it is possible to change the title through the bundle.yaml file.

Is it possible to do the same thing with panels. (so the title doesn’t have to be the same as the folder name)

1 Like

@PieterL_TM

YES


grafik
KR
Andreas

I think what @PieterL_TM needs is:
image

The bare minimum you need is:

  • bundle.yaml file inside the folder you want to rename
  • title: YourNewName

and if translations are required:

title:
  fr_fr: Mon Nouveau Nom
  en_us: My New Name

and if you need to reorder the layout of button, just use the layout entry and list the folder names in the right order as shown by @andreasd811

Yeah, that’s what I thought, but I must be doing something incorrectly:

image

Tagging along on this one. :sweat_smile:
I have the same problem with both .panel and .pulldown bundles that I want to rename.

Spesifically for the .pulldown I want to add a “\n” to dysplay the button text on two lines.

It seems to me that using “title:” is not supported for those bundles?

Same principle:
Is it possible in the Revit UI?
No,
Then this is the reason why it does not work in the code.

User error! :man_facepalming: Turns out I had an error in my yaml file for the .pulldown. Using “title:” works for .pulldown!

I knew other add-ins (made in C#) have break lines (two text lines) for the pulldown title, so could not understand why I could not get it to work until I saw that the “-” under layout was red. There was a space and not a tab before of it.

I understand that two lines in the Ribbon Panel title is probably not allowed by API. :blush::+1: And it seems to me that using “title:” in a .panel button is not supported?

1 Like

try
title: "First line\nSecond line"

Tested in both .pulldown and .panel bundles:

.pulldown = Working
.panel = Not Working

That’s what I expected, so all good! :slight_smile:

1 Like

Bumping this thread to see if anyone found resolution to this, currently renaming the .panel folder to be the name I want it to appear as since having the title: param in bundle.yaml isn’t doing anything

Did some digging in the code, now that I have a better understanding of the code.

In uimaker.py if the lines 572-573 is changed from:

        parent_ui_tab.create_ribbon_panel(panel.name, update_if_exists=True)
        panel_ui = parent_ui_tab.ribbon_panel(panel.name)

to:

        parent_ui_tab.create_ribbon_panel(panel.ui_title, update_if_exists=True)
        panel_ui = parent_ui_tab.ribbon_panel(panel.ui_title)

Then it lets me define title: PanelName in the bundle.yaml and the panel name can be controlled.
I’m not set up to commit a change to pyrevit repo, could anyone else update this?

EDIT:
Managed to set up a PR for it (my first one) :slight_smile:

3 Likes

This is a great yet simple first PR @Jonn.O !

Keep them coming!

It should be available as a WIP installer in 15min.

1 Like

Thank you! :pray:
If I find something more to contribute in the future, I now know how to.

3 Likes