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)
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)
I think what @PieterL_TM needs is:
The bare minimum you need is:
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
Tagging along on this one.
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! 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. And it seems to me that using “title:” in a .panel button is not supported?
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!
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)
This is a great yet simple first PR @Jonn.O !
Keep them coming!
It should be available as a WIP installer in 15min.
Thank you!
If I find something more to contribute in the future, I now know how to.