MAJOR IMPROVEMENT: Single source of truth for all system paths
Now to change NX version or Python environment, edit ONE file (config.py):
NX_VERSION = "2412" # Change this for NX updates
PYTHON_ENV_NAME = "atomizer" # Change this for env updates
All code automatically uses new paths - no manual file hunting!
New Central Configuration (config.py):
- NX_VERSION: Automatically updates all NX paths
- NX_INSTALLATION_DIR: Derived from version
- NX_RUN_JOURNAL: Path to run_journal.exe
- NX_MATERIAL_LIBRARY: Path to physicalmateriallibrary.xml
- NX_PYTHON_STUBS: Path to Python stubs for intellisense
- PYTHON_ENV_NAME: Python environment name
- PROJECT_ROOT: Auto-detected project root
- Helper functions: get_nx_journal_command(), validate_config(), print_config()
Updated Files to Use Config:
- optimization_engine/nx_updater.py: Uses NX_RUN_JOURNAL from config
- dashboard/api/app.py: Uses NX_RUN_JOURNAL from config
- Both have fallbacks if config unavailable
Benefits:
1. Change NX version in 1 place, not 10+ files
2. Automatic validation of paths on import
3. Helper functions for common operations
4. Clear error messages if paths missing
5. Easy to add new Simcenter versions
Future NX Update Process:
1. Edit config.py: NX_VERSION = "2506"
2. Run: python config.py (verify paths)
3. Done! All code uses NX 2506
Migration Scripts Included:
- migrate_to_config.py: Full migration with documentation
- apply_config_migration.py: Applied to update dashboard
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added full study configuration UI:
- Create studies with isolated folder structure (sim/, results/, config.json)
- File management: users drop .sim/.prt files into study's sim folder
- NX expression extraction: journal script to explore .sim file
- Configuration UI for design variables, objectives, and constraints
- Save/load study configurations through API
- Step-by-step workflow: create → add files → explore → configure → run
Backend API (app.py):
- POST /api/study/create - Create new study with folder structure
- GET /api/study/<name>/sim/files - List files in sim folder
- POST /api/study/<name>/explore - Extract expressions from .sim file
- GET/POST /api/study/<name>/config - Load/save study configuration
Frontend:
- New study configuration view with 5-step wizard
- Modal for creating new studies
- Expression explorer with clickable selection
- Dynamic forms for variables/objectives/constraints
- Professional styling with config cards
NX Integration:
- extract_expressions.py journal script
- Scans .sim and all loaded .prt files
- Identifies potential design variable candidates
- Exports expressions with values, formulas, units
Each study is self-contained with its own geometry files and config.
- Update Flask server to run on port 8080 instead of 5000
- Update frontend API_BASE URL to http://localhost:8080/api
- Update launcher script to open browser at port 8080
- Update README documentation with new port number
This resolves the port conflict with Siemens documentation server.