Command Reference.

A comprehensive guide to interacting with Revit metadata using the Prompt CLI.

Selection & Inspection

> id

Quick return of selection ElementId to status bar.

Format id
Example id
> select

Selects elements within the Revit model via Category, Property values, or Element ID. Either Category or Property or both can be used.

Format select [category]
Example select walls
Format select [category] ["property=value"]
Example select walls "FireRating=90/90/90"
Format select [id] ["id"]
Example select id "123456"
> filter

Filters your current element selection using parameters. Either Category or Property or both can be used.

Format filter [category]
Example filter doors
Format filter ["parameter=Value"]
Example filter "Comments=remove"
> parameter-list

Lists all available parameters of the currently selected element.

Format parameter-list
Example parameter-list

Parameter Management

> parameter-set

Assigns a value to a parameter for all currently selected elements.

Format parameter-set ["ParameterName=Value"]
Example parameter-set "Mark=D12"
> parameter-set-auto

Assigns a value to a parameter for all currently selected elements, with the ability to incorporate parameters and automatic sequential numbering. Parameter values and sequetional numbering are placed inside curly brackets { }. For sequential numbering, use a sequence of zero's. The number of zero's will define the padding for the number length, e.g. "0000" will result in "0040"

Format parameter-set-auto ["ParameterName"] ["Value {Parameter}{Sequential Numbering}"]
Example parameter-set-auto "Mark" "Building C_{Level}_{0000}"
> parameter-clear

Clears parameter value for selected elements

Format parameter-clear ["ParameterName"]
Example parameter-clear "Mark"
> parameter-map

Remaps specific values of a given parameter to a new set of defined values en-masse.

Format parameter-map "ParameterName" "Original=New" ...
Example parameter-map "FireRating" "-/60/60=60/60/60" "1h=60"
> parameter-merge

Consolidates data by copying the value from a secondary parameter into a primary parameter when the primary has no value.

Format parameter-merge "Primary Parameter" "Secondary Parameter"
Example parameter-merge "Acoustic Rating" "STC_Rating"
> parameter-normalize

Removes errant formatting such as trim spaces and unicode characters.

Format parameter-normalize [lower|upper] ["ParameterName"]
Example parameter-normalize upper "Comments"
> parameter-normalize-uppercase

Removes errant formatting such as trim spaces, consistent casing and unicode characters.

Format parameter-normalize-uppercase ["ParameterName"]
Example parameter-normalize-uppercase "Comments"
> parameter-normalize-lowercase

Removes errant formatting such as trim spaces, consistent casing and unicode characters.

Format parameter-normalize-lowercase ["ParameterName"]
Example parameter-normalize-lowercase "Comments"

Quality Assurance & Compliance

> parameter-validate

Validates parameter values against a set format, allowing user to enter a number/letter/mask. The rules for the mask are as follows:
Letters - any letter in the mask translates to "accept any letter here"
Digits - any number in the mask translates to "accept any single digit number here"
Symbols - Spaces, dashes and other symbols are treated as literals (must match exactly).
Asterisk - Place asterisk immediately after something acts as a multiplier. E.g. A* means "any number of letters".
Dollar sign $ - Because letters and numbers trigger wildcard rules, prefixing a character with $ forces it to be evaluated literally, for example, $A means there must be an 'A' here.

Format parameter-validate [regex] "ParameterName" "Mask/List"
Example parameter-validate regex "Mark" "$D_00.A*
> preflight-types

Runs an audit on types across the project pinpointing unused variations and duplicate types.

Format preflight-types
Example preflight-types
> preflight-parameters

Runs an audit on types across the project pinpointing unused variations and duplicate types. Can take a given parameter, or will ask to load a text file of parameter names to check. Text file format is one paramter name per line.

Format preflight-parameters
Example preflight-parameters
Format preflight-parameters ["Parameter Name"]
Example preflight-parameters "Mark"

Change Management & State Recording

> snapshot

Exports all element metadata to an external "snapshot" file. This can be used to compare against a live model to see what has changed, or loaded back in replacing any changes. It does not update or modify geometry, only metadata.

Format snapshot
Example snapshot
Format snapshot [category]
Example snapshot walls
> snapshot-instance

As per "snapshot" but only records Instance parameters.

Format snapshot-instance [category]
Example snapshot-instance walls
> snapshot-type

As per "snapshot" but only records Type Parameters.

Format snapshot-type [category]
Example snapshot-type walls
> snapshot-load

Overwrites current model with data from a snapshot file. Shows comparison before proceeding.

Format snapshot-load [category]
Example snapshot-load walls

Admin and Utilities

> runscript

Loads and executes a series of commands saved as a text file.

Format runscript
Example runscript
> help

Displays a list of all available commands.

Format help
Example help
> privacy

Displays the privacy policy.

Format privacy
Example privacy
> eula

Displays the End User License Agreement.

Format eula
Example eula