# π€ Claude Workflow Guide - Global Layouts
## Quick Reference for AI Assistants
### When User Mentions Layouts
**Trigger phrases:**
- "load layout"
- "show layouts"
- "available layouts"
- "open .lay file"
- "tabelle_report"
### Standard Response Pattern
```
User: "Load the global layout"
Claude:
1. π LIST: Call project_list_available_layouts
2. π€ ASK: "I found X layouts. Which one would you like to load?"
3. π¨ LOAD: Call project_load_global_layout with selected file
4. β
CONFIRM: "Layout loaded successfully!"
```
## JSON Command Templates
### Step 1: List Available Layouts
```json
{
"method": "tools/call",
"params": {
"name": "project_list_available_layouts",
"arguments": {
"projectId": "PROJECT_ID_HERE"
}
},
"jsonrpc": "2.0",
"id": 1
}
```
**Response Format:**
```
π Global Layout Files Disponibili
π Directory: H:\go\reports\Input
π Totale file .lay: 1
1. tabelle_report.lay
π Dimensione: 11.36 MB
π Path: H:\go\reports\Input\tabelle_report.lay
```
### Step 2: Load Selected Layout
```json
{
"method": "tools/call",
"params": {
"name": "project_load_global_layout",
"arguments": {
"projectId": "PROJECT_ID_HERE",
"layoutFile": "tabelle_report.lay"
}
},
"jsonrpc": "2.0",
"id": 2
}
```
**Success Response:**
```
β
Global Layout Caricato
π File: tabelle_report.lay
π Path: H:\go\reports\Input\tabelle_report.lay
π Dimensione: 11.36 MB
π¨ Il layout Γ¨ ora attivo nel progetto Visum.
```
## Conversation Examples
### Example 1: Standard Flow
```
User: "Show me available layouts and load one"
Claude:
β Calls: project_list_available_layouts
β Result: 1 file found (tabelle_report.lay, 11.36 MB)
Claude: "I found 1 layout available:
β’ tabelle_report.lay (11.36 MB)
Would you like to load this layout?"
User: "Yes"
Claude:
β Calls: project_load_global_layout("tabelle_report.lay")
β Result: SUCCESS
Claude: "β
Successfully loaded tabelle_report.lay (11.36 MB).
The layout is now active in your Visum project."
```
### Example 2: Direct Request
```
User: "Load tabelle_report layout"
Claude:
β Calls: project_load_global_layout("tabelle_report.lay")
β Result: SUCCESS
Claude: "β
Loaded tabelle_report.lay (11.36 MB) successfully.
The layout is now active."
```
### Example 3: File Not Found
```
User: "Load missing_layout.lay"
Claude:
β Calls: project_load_global_layout("missing_layout.lay")
β Result: FILE_NOT_FOUND
Claude: "β The file missing_layout.lay was not found.
Would you like me to show you available layouts?"
User: "Yes"
Claude:
β Calls: project_list_available_layouts
β Shows available files
```
## Important Notes for Claude
### β
DO:
- Always list layouts first before asking user to choose
- Use exact filename from list (case-sensitive)
- Mention file size when presenting options
- Confirm success with file details
- Suggest listing if file not found
### β DON'T:
- Don't use deprecated `project_list_global_layouts` tool
- Don't guess layout filenames
- Don't try to use COM API methods directly
- Don't forget to ask user which layout to load
## Technical Reference
### Working API:
```python
visum.LoadGlobalLayout(file_path) # β
Correct
```
### NOT Working:
```python
visum.IO.LoadGlobalLayout() # β Doesn't exist
visum.Graphics.AssociateGlobalLayoutFile() # β Doesn't exist
visum.Net.Project.GlobalLayouts # β Not accessible
```
## Performance Expectations
- **Listing:** Instant (~1-5ms)
- **Loading:** ~7 seconds for 11.9 MB file (inform user to wait)
## Error Handling
### File Not Found
β Suggest using `project_list_available_layouts`
### Path Error
β Try with just filename instead of full path
### Load Failed
β Check file size (corrupt if too small/large)
β Try different layout file
## Full Documentation
- **Complete Guide:** `GLOBAL_LAYOUTS_WORKFLOW.md`
- **Quick Reference:** `GLOBAL_LAYOUTS_README.md`
- **Copilot Instructions:** `.github/copilot-instructions.md`
---
**For Claude:** This is your quick reference. Follow the patterns above for consistent user experience.
**Status:** β
Production Ready
**Last Updated:** October 19, 2025