How to get file path of a invokebutton?

Hello everyone, is there a way to get the file path of a invokebutton? I tried using ExecParams as the example on pyrevit’s documentation page to get it, but I got the error as shown below.


image

Hi @Luffy11

Please add some more info: what version of pyRevit are you running, on what version of Revit?

Can you show us what’s inside “see details”?

That being said, we fixed some things in the WIP version, if you’re on 4.8.x you could try that to see if it works

hi @sanzoghenzo , you’re right, it’s because I was using pyRevit version 5.0. After changing to version 4.8.x, it works well. Thanks for your response. But I have an extra question: because pyRevit 5.0 is a WIP version, I can’t use this method for Revit 2025. So is there a way to get the result without using any external packages?

Sorry, what I was trying to say is that we fixed the execparams thing for pyRevit 5 last week, so you have to upgrade to the latest WIP installer :wink:

If it still gives you error, please report the content of the “see details” section of the message box you’ll get.

ah sorry for the misunderstanding, I just installed the pyRevit version 5 on the pyRevitLabs again. And the error still exists, here’s the detail of the error
image

I’m not at my pc to verify, but did you uninstall the previous version? It seems that it still loads something related to version 4.8.16.

Yes I uninstalled the previous version in control panel. Perhaps it is not completely uninstalled? Do I need to do anything else?

You should not have to
But just in case, uninstall from control panel, remove all pyrevit related folders in appdata and program files folders and then install one of the wip installers

hi @Jean-Marc I have followed what you instructed. Then I recognized that the module pyRevitLabs.PyRevit.Runtime.Shared.dll does not exist in the bin folder of the pyRevit-Master anymore. Has it been changed to something else?

fix: make c# scripts work by sanzoghenzo · Pull Request #2502 · pyrevitlabs/pyRevit · GitHub +
@sanzoghenzo

The files are now in the netcore (for revit 2025) and netfx (for older versions)

Just tried with the latest installer and files are there
https://github.com/pyrevitlabs/pyRevit/actions/runs/12789778360/artifacts/2434821496

Running the Text c# script from the pyRevitDevTools extensions works as expected

It worked well. Thanks a lot for your support @sanzoghenzo , @Jean-Marc .

1 Like