Noticed that there is no "Current Project" environment variable for geoprocessing. I like to create script tools to streamline workflows and a useful one for me would be to use the current project. I've made a fair number of script tools that need to reference a project and more often than not, the user will want to use it on their current project. If there was a "Current Project" environment variable then the default for a parameter could be set to that.
Some examples for script tools I've made that would use this.
- Export all layouts in a project as a certain format (.pagx, .pdf, .jpg, .aix)
- Change all data sources in a project to new one.
Image including some of the current environment variables