0
Completed

PIRevit custom tasks setup

For PI-Revit we would like to have the ability to setup custom tasks. Similar to the functionality that currently exists for Dynamo where scripts are placed in a central location these which are then available as a custom task in Clarity. This will allow us to setup global generic PIRevit tasks which can easily be added to projects. On top of this allows to mitigate the security risks that come with the currently available PI Revit tasks.

3 replies

Ewoud-

we will register this request.

From the security perspective, note that you can use the Security Rules to make it so that you can only run PyRevit tasks from certain trusted locations.

matt

HB
 Hi Matt, I'm interested in using the pyRevit task, but I haven't been able to figure out how. Could you share any resources or guidance that might help?

Hakim - 
I feel like there's some documentation around for this, but I can't seem to find it. We'll make sure that some gets into the upcoming Clarity 2025.1 documentation.

What I can tell you is that:

- You put the PyRevit script into the configured "Script Folder" for a task server.

- If there is an additional XML file with the same name as the PyRevit script in the script folder as well, we will read configuration information out of the XML file. The XML file follows the format of regular Clarity Custom Task API configuration, which is documented here.

- After the task gets registered, you should be able to see the configuration options.

- At runtime for the task, every task parameter will be setup as an environment variable, which will be readable by the PyRevit script.

Best Regards,

Matt