Project Setup
Configure your BIM development environment for optimal Cursor AI integration. This guide assumes you have already set up Cursor with the necessary prerequisites.
Project Structure Recommendations
For optimal Cursor performance with BIM projects, organize your workspace as follows:
Configure Cursor Indexing
Codebase Indexing and Documentation
Cursor automatically indexes your codebase to provide intelligent AI assistance:
Cursor's indexing and documentation features help provide better context for AI assistance by understanding your codebase structure
Control File Access and Indexing
Cursor provides two ignore files to control what the AI can access and index:
.cursorignore
- Blocks access to files from:
- Codebase indexing
- Tab, Agent, and Inline Edit features
- @ symbol references
.cursorindexingignore
- Excludes files from indexing only (files remain accessible to AI features but won't appear in codebase searches)
For BIM projects, use these patterns to optimize performance:
.cursorignore example:
# Block access to large BIM files completely
*.rvt
*.rfa
*.rte
*.rft
*.ifc
*.dwg
# Block access to sensitive files
config.json
secrets/
*.key
*.pem
.env*
# Block access to temporary files
temp/
**/*.tmp
**/*.bak
.cursorindexingignore example:
# Don't index but allow AI access when referenced
docs/archive/
legacy/
**/*.pdf
**/*.xlsx
large_datasets/
# Don't index build outputs
bin/
obj/
dist/
node_modules/
Configure Version Control
.gitignore for BIM Projects
Create a .gitignore
file:
# Build outputs
bin/
obj/
*.dll
*.exe
# Revit backup files
*.rvt.bak
*.rfa.bak
*.rte.bak
# IFC temporary files
*.ifczip
temp_*.ifc
# Python cache
__pycache__/
*.pyc
*.pyo
# IDE files
.vs/
.vscode/settings.json
*.suo
*.user
# Large model files (optional)
*.rvt
*.rfa
*.ifc
Language-Specific Setup
C# Revit API Projects
- Revit 2025 Marco: use the template created by Autodesk to start developing.
Python pyRevit Projects
- Start directly with pyRevit 5+: don't need to set up virtual environment, select interpreter and start developing.
- Set up virtual environment: if you want develop standalone IFC processing, you need to set up virtual environment.
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
- Create requirements.txt:
ifcopenshell
pandas
numpy
matplotlib
openpyxl
Test Your Setup
Quick Validation Test
Cursor Prompt: "Create a simple Revit external command that counts all walls in the active document and displays the result in a TaskDialog."
Expected result: Cursor should generate proper Revit API code with:
- Correct using statements
- Proper external command structure
- Transaction handling
- Error management
Performance Optimization
For projects with large code base, refer to the Control File Access and Indexing section above for proper .cursorignore
and .cursorindexingignore
configuration.
Modern Cursor Configuration
Setup .cursor/rules/ Directory
Cursor uses a structured rules system with .cursor/rules/
directory:
Example of a well-organized rules structure from a real project showing domain-specific organization
Basic Rules Setup:
your-project/
├── .cursor/rules/
│ ├── project-standards.mdc # Core team standards
│ └── bim-patterns.mdc # BIM-specific patterns
├── .cursorindexingignore # Exclude large files
└── your-project-files...
Essential Rule Example (.cursor/rules/project-standards.mdc
):
---
description: Core project development standards
alwaysApply: true
---
# Project Standards
## Code Quality
- Include comprehensive error handling
- Use descriptive names for functions and variables
- Add docstrings for all public functions
- Follow PEP 8 for Python, Microsoft conventions for C#
## BIM-Specific Guidelines
- Always use transactions for Revit model modifications
- Validate element existence before processing
- Handle large datasets efficiently
📚 Advanced Rules: For comprehensive DCMvn-specific rules, patterns, and team standards, see the Hands-On Examples
DCMvn Development Standards
Our team follows these standards across all projects:
- Modern Cursor Rules: Use
.cursor/rules/
directory structure - DCMvn Framework: Consistent imports and patterns
- Documentation: Inline documentation for all functions
- Version Control: Atomic commits with clear messages
- Testing: Unit tests for critical BIM operations
📚 Learning Resources
Official Documentation
- Cursor AI Documentation
- pyRevit Developer Docs
- Revit API Developer Guide
- Revit API Docs
- IfcOpenShell Documentation
Community Resources
Next Steps
With your environment configured, proceed to Your First Project to start developing with Cursor AI.
Configuration guide by DCMvn CO., Ltd - 98.3% digital, 100% pure