AI commands
The AI assistant can execute specific commands to modify your diagram. Commands are extracted from natural language and presented as preview cards for your approval.
Command types
add-component:
- Creates new component on canvas
- Specifies type, position, and properties
modify-component:
- Changes properties of existing component
- Updates voltage, power, ratings, etc.
delete-component:
- Removes component from diagram
- Deletes associated connections
connect-components:
- Creates connection between two components
- Specifies source and target
rename-component:
- Changes component name
- Updates display label
disconnect-components:
- Removes connection between two components
- Specifies source and target
Import SLD from PDF or image
Upload a PDF or image of an existing electrical diagram and the AI extracts components and connections:
- Click the Import SLD button in the AI chat panel.
- Upload a PDF or image file containing an electrical single-line diagram.
- The AI analyzes the document and generates add/connect commands for detected components.
- Review the proposed commands in preview cards.
- Accept to build the diagram automatically.
This feature uses 20 AI credits per import. Accuracy depends on diagram clarity and standard notation.
Parse device settings from datasheets
Upload a protection device datasheet and the AI extracts trip settings:
- In the edit panel for a protection device, click Parse Settings.
- Upload a manufacturer PDF datasheet.
- The AI extracts settings for the device type (electronic trip unit, fuse, relay, overload relay, or HV breaker).
- Review extracted values and accept to apply.
This feature uses 10 AI credits per parsing operation.
Add component command
Creates a new component with specified properties.
Natural language examples:
- "Add a 1000 kVA transformer at position 200, 300"
- "Create a new bus with 480V rating"
- "Place a 100 HP motor below Bus 3"
Command JSON structure:
{
"type": "add-component",
"componentType": "bus",
"position": {"x": 200, "y": 300},
"properties": {
"ratedVoltageKv": 0.48,
"ratedAmperage": 1200,
"busType": "main_switchboard"
}
}Position specification:
- Absolute coordinates (x, y) in pixels
- Relative terms: "above Bus 1", "below Transformer 2"
- AI calculates positions from relative terms
Supported component types:
- bus, cable, transformer, load, motor
- generator, utility_feed
- hv_breaker, lv_breaker, fuse
Modify component command
Changes properties of an existing component.
Natural language examples:
- "Change Bus 2 voltage to 13.8 kV"
- "Set Transformer 1 rated kVA to 1500"
- "Update Motor 3 horsepower to 75 HP"
Command JSON structure:
{
"type": "modify-component",
"componentId": "bus_123",
"componentName": "Bus 2",
"properties": {
"ratedVoltageKv": 13.8
}
}Modifiable properties:
- Electrical ratings (voltage, current, power)
- Physical properties (length, size, material)
- Configuration settings (type, phase, power factor)
Component identification:
- AI uses component name ("Bus 2")
- Or component ID if name is ambiguous
- Asks for clarification if multiple matches
Delete component command
Removes a component and its connections.
Natural language examples:
- "Remove Load 5"
- "Delete the unused transformer"
- "Remove all orphaned components"
Command JSON structure:
{
"type": "delete-component",
"componentId": "load_456",
"componentName": "Load 5"
}Deletion behavior:
- Component removes from canvas
- All connections to/from component delete
- Undo available after deletion
- Permanent after saving project
Batch deletion:
- "Delete all loads" - Removes multiple components
- AI shows each deletion in command preview
- Accept or reject entire batch
Connect components command
Creates electrical connection between two components.
Natural language examples:
- "Connect Breaker 2 to Bus 5"
- "Link Generator 1 to the main bus"
- "Wire Transformer secondary to Bus 3"
Command JSON structure:
{
"type": "connect-components",
"sourceComponent": "breaker_789",
"sourceName": "Breaker 2",
"targetComponent": "bus_012",
"targetName": "Bus 5"
}Connection validation:
- AI checks electrical compatibility
- Warns if voltage mismatch
- Prevents invalid connections
- Suggests corrections if needed
Handle selection:
- AI determines appropriate handles automatically
- Top/bottom based on power flow direction
- Matches electrical conventions
Rename component command
Changes component display name.
Natural language examples:
- "Rename Bus 1 to Main Distribution"
- "Call Motor 3 'Chiller Pump Motor'"
- "Change Transformer 2 name to 'Service Transformer'"
Command JSON structure:
{
"type": "rename-component",
"componentId": "bus_345",
"oldName": "Bus 1",
"newName": "Main Distribution"
}Naming conventions:
- Names can include spaces
- Max 100 characters
- No special validation (any text allowed)
Component positioning
AI calculates component positions from relative terms:
Relative positioning:
- "above Bus 1" - Places component 100px above
- "below Transformer 2" - Places 100px below
- "left of Load 3" - Places 150px left
- "right of Motor 1" - Places 150px right
- "near Bus 4" - Places within proximity range
Absolute positioning:
- "at position (400, 200)" - Exact pixel coordinates
- "at coordinates 400, 200" - Same as above
Default spacing:
- Vertical: 100-150px between components
- Horizontal: 150-200px between components
- Maintains grid alignment (50px grid)
Error handling
Component not found:
- AI cannot identify component by name
- Asks for clarification
- Lists similar component names
- Requests component ID if needed
Invalid property value:
- Value outside valid range
- Wrong data type
- AI suggests valid values
- Allows correction
Connection validation failure:
- Incompatible component types
- Voltage mismatch
- Reverse polarity
- AI explains issue and suggests fix
Positioning conflicts:
- Component would overlap existing component
- AI adjusts position slightly
- Or asks for new position
Command limitations
AI commands cannot:
Run analysis:
- Cannot trigger power flow or short-circuit
- You must manually run calculations
Batch operations beyond deletion:
- Cannot bulk-modify properties
- Each modification is separate command
Access external data:
- Cannot import from external sources
- No database queries
- Limited to project scope
Complex topology:
- Cannot automatically route cables
- Cannot optimize layouts
- Positions components at requested locations only
Reviewing command previews
Before execution, command preview shows:
Command type:
- Add, modify, delete, connect, rename
Affected components:
- Component names and types
- Current vs new values for modifications
Preview information:
- Position coordinates for new components
- Property changes for modifications
- Connected components for connections
Actions:
- Accept - Execute the command
- Reject - Cancel without changes
Always review previews carefully before accepting.
Multi-command workflows
AI can propose multiple related commands:
Example: "Add a motor and connect it to Bus 3"
Command sequence:
- Add motor component
- Connect motor to Bus 3
Placeholders:
- First command creates component
- Second command references newly created component
- AI resolves placeholders automatically
Sequential execution:
- Commands execute in order
- Each depends on previous success
- Failure stops sequence
- Partial undo if needed
Command JSON structure reference
All commands share base structure:
{
"type": "command-type",
// command-specific fields
}Fields vary by command type - see individual command sections above for details.
Related topics
- Using AI chat - AI chat panel basics
- Components - Component types and properties