5.9 Appendix Prompting Reference

Overview

This appendix provides quick-reference materials that support all previous sections in Chapter 5.
Use these materials as cheat sheets, training aids, internal documentation inserts, or quick guidance tools for users who need fast, reliable prompting assistance without reading the full chapter.

This section includes:

  • A cheat sheet of high-performing prompt structures
  • Known prompt failure modes
  • Prompt-to-code mapping examples that help users understand how Maestro AI interprets instructions

5.9.1 Sample Prompts Cheat Sheet

Purpose

Give users a concise, ready-to-use list of effective prompt patterns that consistently generate high-quality Revit automation scripts.


Category A — Parameter Editing

Modify One Parameter for Selected Elements

Write a Python script for Revit.  
Take the user's current selection and filter it to <CATEGORY>.  
Set the parameter "<PARAMETER>" to "<VALUE>".  
Skip elements if the parameter is missing or read-only.  
Wrap all changes in one transaction and print a summary.

Copy One Parameter to Another

Collect all <CATEGORY> elements.  
For each element, copy the value of "<SOURCE_PARAM>" into "<TARGET_PARAM>".  
Skip if the source parameter is empty or missing.  
Add a summary printout.

Category B — View & Sheet Operations

Duplicate Views

Duplicate all selected views using "<DUPLICATION_METHOD>".  
Append "<SUFFIX>" to each duplicated view name.  
Skip unsupported view types.

Create Sheets From a List

Create sheets using the title block "<TITLEBLOCK>".  
Use this list of sheet numbers and names: <LIST>.  
Print all created sheets.

Category C — QA / Validation Checks

Find Missing Parameters

Collect all <CATEGORY> elements.  
Identify which ones are missing the "<PARAMETER>" value.  
Print IDs and names only; do not modify the model.

Highlight Problem Elements

Find all <CATEGORY> elements where "<PARAMETER>" is empty.  
Select these elements in the Revit UI.  
Print total count.

Category D — Export Scripts

Export All Sheets as PDFs

Export all sheets to PDF.  
Use the sheet number as the filename.  
Save to "<OUTPUT_PATH>".  
Create the folder if it does not exist.

Category E — Cleanup Scripts

Identify Unused Views

Find all <VIEW_TYPE> views that are not placed on sheets.  
List them with element ID and view name.  
Do not delete them.

5.9.2 Prompt Failure Modes

Overview

This section describes the most common ways prompts fail, why they fail, and how users can adjust their input to correct the issue.


Failure Mode 1 — Vague Scope

Example

“Fix my views.”

Why It Fails

  • AI has no idea what “fix” means
  • No category, action, or naming rule provided

How to Fix

Add specifics:

Duplicate selected floor plan views and append "-CD" to the name.

Failure Mode 2 — Multi-Objective Prompts

Example

“Duplicate views and sheets, rename everything, export PDFs, and clean the model.”

Why It Fails

Too many unrelated steps confuse the model.

How to Fix

Split into smaller prompts:

  • Prompt 1: Duplicate views
  • Prompt 2: Rename views
  • Prompt 3: Export sheets
  • Prompt 4: Cleanup views

Failure Mode 3 — Missing Parameter Names

Example

“Set the fire rating.”

Why It Fails

AI cannot determine:

  • The parameter name
  • Whether it’s instance or type

How to Fix

Specify:

Set the 'Fire Rating' parameter on selected doors to '1 HR'.

Failure Mode 4 — Undefined Naming Logic

Example

“Rename these views logically.”

Why It Fails

“Logically” has no explicit meaning for AI.

How to Fix

Provide explicit rules:

Rename each view using this format: <ORIGINAL_NAME> + " - FLS".

Failure Mode 5 — Ambiguous Element Types

Example

“Fix structural elements.”

Why It Fails

“Structural elements” could mean:

  • Columns
  • Beams
  • Braces
  • Foundations

How to Fix

Identify the category:

Collect all Structural Columns and update the 'Comments' parameter.

5.9.3 Prompt-to-Code Mapping Examples

Overview

These examples show how Maestro AI interprets specific instructions and transforms them into Revit API code.
Understanding this mapping helps users write prompts that yield predictable scripts.


Example 1 — Parameter Assignment

Prompt

Set the 'Comments' parameter for all selected Doors to 'Review Needed'.

Code Behavior AI Will Produce

doors = [...]
for d in doors:
    p = d.LookupParameter("Comments")
    if p and not p.IsReadOnly:
        p.Set("Review Needed")

Interpretation

  • AI detects instance parameter assignment
  • Includes read-only check
  • Loops element-by-element

Example 2 — View Duplication

Prompt

Duplicate selected views with detailing and append '-CD' to each duplicated view name.

Code Behavior AI Will Produce

new_id = view.Duplicate(ViewDuplicateOption.WithDetailing)
new_view = doc.GetElement(new_id)
new_view.Name = view.Name + "-CD"

Interpretation

  • AI selects correct duplication mode
  • AI understands sequence: duplicate → rename

Example 3 — Filtering by Parameter

Prompt

Find all walls on Level 2 where the 'Comments' parameter is empty.

Code Behavior AI Will Produce

if wall.LookupParameter("Comments").AsString() in (None, ""):
    matching.append(wall)

Interpretation

  • AI identifies empty string conditions
  • AI creates a filtered list

Example 4 — Reporting Without Modification

Prompt

List all unused floor plan views without modifying anything.

Code Behavior AI Will Produce

if not view.IsOnSheet:
    print(view.Name, view.Id)

Interpretation

  • AI switches to non-destructive reporting mode

Summary

This appendix serves as a fast-access reference for:

  • Prompt templates
  • Common failure patterns
  • How prompts translate to real code

These materials help standardize user behavior, reduce troubleshooting time, and provide the foundation for internal Maestro training programs.