Basic Scripting

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 on this page.

Topics in this Section

Unless noted otherwise, the following examples are using the AUT-Open_RVT_Files script that is used in the Getting Started exercise.

Edit the Task Name     

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.

$ { 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.

Edit the default task name within a script:

  1. Open the script with Notepad++ or Notepad.
    • The scripts are stored here by default: C:\Program Files\Ideate\Ideate Automation\en-US\Samples.
  2. Look for the <taskName> at the top.
    • Do not modify the variable function that is shown boxed in green.
    • The highlighted text in the image below first shows the unmodified script followed by an example of how the name can be customized to reflect the purpose more accurately.
  3. Save as… to make a copy of your script.
    • We recommend saving new scripts here: C:\ProgramData\Ideate\Ideate Automation\Custom Scripts. Read more about how to Set the Content Pathing.

Edit variable functions in the <taskName>     

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”

Edit Display Name and Tooltip     

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:

  1. Open the script with Notepad++ or Notepad.
    • The scripts are stored here by default: C:\Program Files\Ideate\Ideate Automation\en-US\Samples.
  2. Search for <variable_list> to find the beginning of the variables.
  3. In the example above, the first variable is called <revit_files>.
  4. Change the value of the variable by editing the text between the quotes to show <displayName>=“RVT Files”
  5. Change the value of the <description> variable to ”Select Revit files”
  6. Save as… to make a copy of your script.

We recommend saving new scripts here: C:\ProgramData\Ideate\Ideate Automation\Custom Scripts. Read more about how to Set the Content Pathing.

Display or Hide Variables     

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:

The sample script called IBL-Export_NWC_Dynamic, shown below, has a variable for the Open Workset condition which is set to prompting=advanced, so it only displays when the small + is selected in the upper right hand corner.

Built-In Variables     

There are a few built-in variables with pre-defined names. The output on these can be formatted uniquely to meet your specific requirements.

Date / Time

This variable starts with either ‘today’ or ‘todayUTC’, depending on whether the value should be local time or the comparable UTC time zone.

${today.t} 11:15 AM <!-- Pacific time in this example -->
${todayUTC.t} 6:15 PM

The variable then has a '.' followed by the date/time format that will be used for the current date and time. The supported formats are the standard and custom Windows datetime formats.

Note that not all formats will be safe to use in file paths.

Examples

${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

A good example of a script that uses the Date/Time variable is AUT-Families-RFA shown below.

Revit File Functions

These functions use different logic than standard functions to manage the complexities of Revit files.

Examples

${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

 

Project Information

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.

  Top of Page ▲

For more advanced scripting help please contact our support team via email at [email protected].

Submit feature or issue request for Ideate Software

Thank you for taking time to inform us about a bug or feature request.

By entering your data above and clicking ‘SUBMIT’ you are consenting to the collection and use of that data to respond to your comments and inquires, as described in our Privacy Policy. We may also transfer the data you submit in the ‘Email Us’ form to our VAR partners for the limited purpose of a sales follow-up. Please review our Privacy Policy for more details on how and when we collect data and what we use it for.