Code Editing with VSCode
Paracore integrates seamlessly with Visual Studio Code, allowing you to edit scripts with full IntelliSense, syntax highlighting, and modern IDE features.
Opening Scripts in VSCode
- Select a Script in the Script Gallery
- View the Code by clicking the toggle button (far right of "Run Script" button) in the Parameters tab to open the Floating Code Viewer
- Click "Edit in VSCode" button (bottom-right of the Floating Code Viewer)
The Floating Code Viewer is read-only. To edit, you must use the "Edit in VSCode" button.
Workspace Generation
When you click "Edit in VSCode", Paracore automatically:
- Generates a temporary workspace for the script
- Scaffolds the project with all necessary dependencies
- Restores NuGet packages (creates
binandobjfolders) - Opens VSCode with full IntelliSense support
[!IMPORTANT] Wait for Generation to Complete
The workspace generation process takes a few seconds. Do NOT close VSCode until you see both
binandobjfolders in the workspace. Closing VSCode prematurely will corrupt the script.
[!CAUTION] Critical: Backup Your Scripts
If you accidentally close VSCode during workspace generation (before
binandobjfolders appear), your script may be corrupted. Always maintain backups of important scripts.
Workspace Persistence
- First Time: A new temporary workspace is generated
- Subsequent Edits: The same workspace is reused (faster opening)
- File Watchers: Changes saved in VSCode automatically update the original script
- Auto-Save: Enable VSCode auto-save for seamless updates
Workspace Cleanup
Temporary workspaces are automatically deleted when:
- Revit is closed - All generated workspaces are cleared to free disk space
- Original scripts remain - Only the temporary copies are deleted
This automatic cleanup prevents disk clutter from accumulating many temporary workspaces.
Editing Workflow
- Click "Edit in VSCode" from the Floating Code Viewer
- Wait for
binandobjfolders to appear (generation complete) - Edit your script with full IntelliSense
- Save changes (or enable auto-save)
- Close VSCode when finished (safe after generation completes)
- Changes are reflected in Paracore immediately
Best Practices
- ✅ Enable Auto-Save in VSCode (
File > Auto Save) - ✅ Wait for generation before editing or closing
- ✅ Maintain backups of critical scripts
- ✅ Use Git for version control of important scripts
- ⚠️ Never close VSCode during workspace generation
Troubleshooting
Script appears corrupted after editing:
- Likely closed VSCode during generation
- Restore from backup or Git history
- Re-create the script if no backup exists
IntelliSense not working:
- Ensure
binandobjfolders exist - Reload VSCode window (
Ctrl+Shift+P→ "Reload Window") - Check that Revit is running with Paracore.Addin active