10 - Step-by-Step: Paracore REPL
Practice interactive C# exploration and action chains in the Revit environment.
1. Preparation
- In Revit, Select at least one element (e.g., a Wall or Room) in the active view.
2. Using the Single-Line REPL
- In Paracore, navigate to the Console tab.
- If the workshop is open, click the Collapse button.
- Click the REPL input bar.
- Type
Selection[0].Idand press Enter to execute. - Use the Up/Down arrow keys to cycle through your command history.
3. Using the Multi-Line Workshop
- Click the Expand button on the right to open the multi-line Workshop.
- Type:
var walls = GetElements<Wall>();
Println($"Found {walls.Count} walls"); - Press CTRL + ENTER to execute.
- Click Collapse and type
walls.Countin the single-line REPL to verify persistent state.
4. Extension Method Power
- Action Chains: In the REPL, type:
GetElements<Room>().Table().Select().Zoom(); - Batch Actions: Type
GetElements<Wall>().Hide();and observe Revit.
5. Saving Snippets
- Click the Save or Save As icons in the Workshop header.
- Name your snippet and save it as a
.csfile.
Congratulations! You've finished the Fundamentals series.