set_positions
Assign new x,y positions to specific places or transitions in a Petri net canvas by ID. Use to layout new elements or reorganize a cluttered diagram without affecting other elements.
Instructions
Set canvas coordinates for places and transitions by ID.
Use after adding new elements or to clean up a cluttered layout. Typical workflow:
list_elements — note current x,y of existing elements
set_positions — assign new x,y for any subset of elements
Elements not listed keep their current positions.
Args: positions: List of {"id": "", "x": , "y": } Example: [{"id": "p1", "x": 100, "y": 200}, {"id": "t1", "x": 200, "y": 200}]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| positions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |