05 - Step-by-Step: Parameter Defaults and Cache
Practice managing sticky parameters and resetting your workspace.
1. Setting Defaults
- In your
Paramsclass, set a default value:public double Distance { get; set; } = 50.0;. - Save and verify the value appears in Paracore.
2. Test "Sticky" Persistence
- Change the value in the Paracore UI to 100.
- Select a different script in the Gallery, then switch back.
- Observe that the value remains 100.
3. Practice Hard-Reset
- In VS Code, change the code default to 200 and save.
- In Paracore, notice the UI value is still 100 (user override takes priority).
- Click the Hard-Reset (Reset icon) in the top-right of the Parameters tab.
- Verify the value reverts to the code default of 200.
4. Document-Aware Warning
- Switch your active project in Revit.
- Observe the Yellow Triangle Warning appearing on your selection parameters.
- Click Compute to refresh the data for the new document.
Next Exercise: 06 - Revit vs Paracore Selection