Invoking .dlls from extenal locations

Hi :wave:
I’ve been super stoked to see this invokebutton bundle as shown in pyRevitDevTools debug here and was curious if it is possible to add an external folder location in the execution path, such as:


Could this be added on the script of an extension? I notice it only searches the /bin folder in an extension folder right now.

In addition, I’m wondering if it’s possible to add any custom extension variables to the .yaml file such as author in the example shown? I’m looking to add the Revit version build number in the assembly name.

@GooseG I’m not sure if I exactly follow what you are trying to do. Are you wanting to load extra dlls from a path?! The invoke bundle files provide a location for an already compiled Revit dll and can run the externalcommand defined in that dll

@eirannejad I am trying to invoke already compiled .dlls that are developed by other teams (not using pyRevit) and deployed to users to a folder in %localappdata%. I would like to integrate some of these external commands in our pyRevit extensions. These .dlls are organized by version as such:

---> SpaceCreator.2018.dll
---> SpaceCreator.2019.dll
---> SpaceCreator.2020.dll
---> SpaceCreator.2021.dll

I have already sucessfully been able to invoke them if I copy such a .dll in the extension /bin folder and hardcode the version in the invokebutton assembly name. But these .dlls are regularly updated in this %localappdata% folder and it is strongly preffered to point to these in our case. The solution could either be something in the direction of:

  • Adding an additional search path .dlls for the invokebutton in the script
  • Adding a variable in the .yaml (such as the {{author}} ) for the Revit version number. For this one, it would be helpful to understand how/where the .yaml is being parsed.

Apologies for not being able to explain it better.