Ideate Automation provides Ideate Software customers with programmatic access to our solutions through scripting. In this topic the basics of script editing are covered. For more advanced scripting help please contact our support team via email at [email protected].
Ideate Automation includes several sample scripts that can be edited to fit your needs. The scripts are .xml based and can be edited with any text editor such as Notepad++. You can also change the location of your script library as described in Deploying Custom Content
Related topic: Additional Options
Unless noted otherwise, the following examples are using the AUT-Open_RVT_Files
script that is used in the Getting Started exercise.
The Task Name: is what displays within the Task List on the Home page. It is also used as the folder name for the log files. Having a unique and easily identifiable name makes a completed task easier to find and understand.
To help create unique task names, the Sample Content scripts have built-in variables that help create the task name. These variables can be customized but it’s important to first understand how they are constructed.
AUT-Open_RVT_Files
in this example.$ { selectionList : First : DirectorySafeString }
To help understand the purpose of each variable within the string, let’s break down our example script
selectionList | The name of the Revit file selected or the name of the list.txt file if the Revit File List: option is selected. |
First | Further filtering the selection to include only the first file listed in the task. |
DirectorySafeString | Any special characters i.e. $%&* etc. in the file name are removed. |
The Confirm Task Selections dialog is where the task name can be modified as the final action prior to selecting Save and Run.
This change will only affect the current task. If you would like to make this change permanent, the script can be edited to change the logic that determines the default task name as desired.
<taskName>
at the top.
In our example, the variable function named ${selectionList:First:DirectorySafeString} that was first examined, is configured to name the file differently depending on if the task performed is being run on a local model or a cloud model. Further down the script, you will find the <selectionList> variable definition that does this work.
In both cases, the Display Name is being pulled from the list of files that are stored in %localAppData%\Ideate\Ideate Software\CachedFileData.
There are separate .csv files located here for the different types of Revit models. The cloud model name will include the name of the hub and the model while the local model name will only include the name of the model. If you would like to remove the name of the hub, you can edit the script by replacing “Display Name” with “File Name:FileNameNoExtension”
When creating a task, the list of variables is displayed on the Task Script Variables dialog. In the example below, the first variable has the <displayName>
“Revit Files”. This variable also has a <description>
variable that applies to the tooltip to display “Pick one or more Revit file”. Both of these variables can be easily edited within the script.
To edit the display name and tooltip of a variable:
<variable_list>
to find the beginning of the variables.<revit_files>
.<displayName>=“RVT Files”
<description>
variable to ”Select Revit files”
We recommend saving new scripts here: C:\ProgramData\Ideate\Ideate Automation\Custom Scripts. Read more about how to Set the Content Pathing.
To improve the usability of your custom scripts you may want to hide or display certain variables. This can be achieved by using prompting= as part of each variable. The options are:
There are a few built-in variables with pre-defined names. The output on these can be formatted uniquely to meet your specific requirements.
${today.d} |
8/11/2020 - Dependent on the current Windows culture |
${today.dddd} |
Tuesday |
${today.yyyy-MM-dd} |
2020-08-11 |
${today.MMMM dd} |
August 11 |
${today.yyyy-MM-dd_HH-mm.ss} |
2024-04-15_14-37.00 |
A good example of a script that uses the Date/Time variable is AUT-Families-RFA shown below.
These functions use different logic than standard functions to manage the complexities of Revit files.
${Revit.Version} |
The Revit Release Year the file was last saved in. | 2024 |
${Revit.ProjectName} |
Returns the BIM 360 Project name. Only compatible with cloud hosted files. | ISW Example Project |
${Revit.FileName} |
Returns the display file name with the file extension. | example project.rvt |
${Revit.FileName.NoExtension} |
Returns the display file name without the file extension | example project |
These values are read from the parameters set in Project Information for the project. They all start with Revit.CurrentFile.ProjectInfo.
and end with the BuiltInParameter Key name.
Listed here are built-in parameters, but shared project parameters are also accessible, given they exist in all Revit projects that are being processed by the task.
BuiltInParameter Key | Display Name |
---|---|
PROJECT_NUMBER |
Project Number |
PROJECT_NAME |
Project Name |
PROJECT_ADDRESS |
Project Address |
CLIENT_NAME |
Client Name |
PROJECT_STATUS |
Project Status |
PROJECT_ISSUE_DATE |
Project Issue Date |
PROJECT_AUTHOR |
Author |
PROJECT_BUILDING_NAME |
Building Name |
PROJECT_ORGANIZATION_DESCRIPTION |
Organization Description |
PROJECT_ORGANIZATION_NAME |
Organization Name |
Here’s an example of a script that is using the PROJECT_NUMBER
key.
For more advanced scripting help please contact our support team via email at [email protected].