pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.32k stars 335 forks source link

Icons for URL and Pushbuttons are not showing up #1994

Closed MButts29 closed 1 year ago

MButts29 commented 1 year ago

Describe the bug I have created my own toolbar that contains a Github url pushbutton and a stack of (3) pushbuttons that each run a Dyanmo script in Revit. I have icon.png images for each pushbutton but none of the icons are loading when I get into Revit. I have reloaded the custom extension directory, have restarted Revit, and have tried in multiple versions of Revit - to no avail.

The yaml files, url, and the Dynamo scripts work as intended, the icons are just not showing on the toolbar.

Screenshots The setup for the Github pushbutton: Screenshot 2023-11-08 162537

How the pushbutton looks in Revit (it should show the Github image icon): Screenshot 2023-11-08 162815

Desktop (please complete the following information):

==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.13.23182+2215" | Path: "C:\Users\mbuttimer\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "Autodesk Revit 2024" | Engine: IPY277 (277) | Path: "C:\Users\mbuttimer\AppData\Roaming\pyRevit-Master"
master | Product: "Autodesk Revit 2023" | Engine: IPY277 (277) | Path: "C:\Users\mbuttimer\AppData\Roaming\pyRevit-Master"
master | Product: "Autodesk Revit 2022" | Engine: IPY277 (277) | Path: "C:\Users\mbuttimer\AppData\Roaming\pyRevit-Master"
master | Product: "Autodesk Revit 2021" | Engine: IPY277 (277) | Path: "C:\Users\mbuttimer\AppData\Roaming\pyRevit-Master"
master | Product: "2020.2.0" | Engine: IPY277 (277) | Path: "C:\Users\mbuttimer\AppData\Roaming\pyRevit-Master"
master | Product: "2019.2.6" | Engine: IPY277 (277) | Path: "C:\Users\mbuttimer\AppData\Roaming\pyRevit-Master"
==> Installed Extensions
MyTool | Type: Unknown | Repo: "" | Installed: "F:\Revit Toolbar Tab\My Tools\MyTool.extension"
==> Default Extension Search Path
C:\Users\mbuttimer\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
F:\Revit Toolbar Tab\My Tools
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2024 | Version: 24.1.10.25 | Build: 20230830_0315(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
Autodesk Revit 2023 | Version: 23.1.30.97 | Build: 20230828_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
Autodesk Revit 2022 | Version: 22.1.50.17 | Build: 20230915_1530(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
Autodesk Revit 2021 | Version: 21.1.90.15 | Build: 20230907_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021\"
2020.2.0 | Version: 20.2.90.12 | Build: 20220517_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020\"
2019.2.6 | Version: 19.2.60.3 | Build: 20220224_1700(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2019\"
==> Running Revit Instances
Error: Object reference not set to an instance of an object.
Run with "--debug" option to see debug messages

Thanks.

jmcouffin commented 1 year ago

Please join the icon and yaml file

jmcouffin commented 1 year ago

Have you tried to copy the content of a pyrevit urlbutton tool in your own toolbar to figure out if it is a pyrevit issue or just a wrong syntax in the bundle file or a wrong image size or type for the icon

MButts29 commented 1 year ago

@jmcouffin

Thank you for your response. I copied the content of a urlbutton (the Icons8 one) from the pyrevit-master folder and placed it in my toolbar and that has worked (image is showing and the link is working).

I copied the bundle file (from the Icons8) to my Github urlbutton folder, without editing it, but with the Github image (96px and png) and the Github image shows:

Screenshot 2023-11-09 095222

However, when I edit the original bundle file, to update the info to be Github specific, the button title and tooltip info do not update:

Screenshot 2023-11-09 095332

Screenshot 2023-11-09 095435

You made a reference in your post about joining the icon and yaml files. What does that mean? I'm wondering if that may be what is causing my urlbutton info not to update.

Thanks.

jmcouffin commented 1 year ago

You made a reference in your post about joining the icon and yaml files. What does that mean? I'm wondering if that may be what is causing my urlbutton info not to update.

I meant attaching/joining the file in the issue so that I can test them

Anyway, when you change url button bundle file, you will need to restart revit to get your ui updated. The reload button won't work in that specific case.

jmcouffin commented 1 year ago

Max size for icons is 96*96 and icons8 is a good spot to get an icon.png

MButts29 commented 1 year ago

Ahh, OK. I restarted Revit (2023) and it still did not update the button. However, when I start Revit 2024, the button updated. After it updated in Revit 2024, I closed Revit 2023 and reopened, but it still did not update. I also just opened Revit 2022 and Revit 2021 and the button updated. I am going to restart my computer to see if I can get Revit 2023 to update the url button. It is strange.

MButts29 commented 1 year ago

@jmcouffin

The restart did not work, Revit 2023 does not have the updated url button (all other versions do). What can I attached that would help you debug this issue?

Thanks.

jmcouffin commented 1 year ago

What can I attached that would help you debug this issue?

no that's ok.

I suggest you close 2023 and delete the folder %appdata%\pyRevit\2023 then restart Revit

jmcouffin commented 1 year ago

for whatever reason the urlbutton bundle content seems to be cached and not touched by the reloading (the cache not being reconstructed)

MButts29 commented 1 year ago

Clearing the cache fixed everything. Thanks, @jmcouffin

jmcouffin commented 1 year ago

😃