AnyLogic Design-Time Python API
The AnyLogic Design-Time Python API allows you to programmatically modify an AnyLogic model while it is open in the graphical editor.
It provides the Python runtime with access to the model structure, allowing you to generate space markup automatically.
This package communicates with the AnyLogic editor using the built-in Graphical Editor API Connector, available in AnyLogic 8.9.7+.
Features
- Connect to the AnyLogic editor using a secure one-time token
- Create and configure model elements programmatically
- Automatically generate data-driven layout structures
- Access wrapper classes for AnyLogic objects (for example,
Conveyor,Path,PointNode,TurnStation,Robot)
Installation
pip install anylogic_design_time_api
Requirements
- AnyLogic 8.9.7 or later
- Python 3.9+ (tested on Python 3.13)
- Open port for API connector running inside AnyLogic (configurable)
When you start the connector from the AnyLogic toolbar, a dialog displays a connection token. Use this token in your Python script to attach to the editor.
Basic usage
from anylogic_design_time_api import *
from anylogic_design_time_api.generated import *
# Connect to the running AnyLogic editor
ws = Workspace("paste-your-token-here")
# Open the model
model = ws.getModel("My model")
agent = model.getAgent("Main")
level = agent.getLevels()[0] # animation level where markup is created
# Create nodes
node1 = PointNode.create(level)
node2 = PointNode.create(level)
path = Path.create(level)
# Layout
node1.setX(100)
node1.setY(200)
node2.setX(300)
node2.setY(200)
path.setX(100)
path.setY(200)
# Define path geometry (relative to path position)
pathPoints = [0.0, 0.0, 0.0, 200.0, 0.0, 0.0]
pathPointList = Utils.createStraightPointsList(path, pathPoints)
path.setPointList(pathPointList)
# Connect network
path.setSource(node1)
path.setTarget(node2)
Documentation
Full documentation, including wrapper classes, raw functions, and an extended example, is available in the AnyLogic documentation.
License
© The AnyLogic Company.
Distributed for use with the AnyLogic simulation environment.
Metadata
Release files for anylogic-design-time-api 8.9.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anylogic_design_time_api-8.9.10.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anylogic_design_time_api-8.9.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.7 kB
Release files / anylogic_design_time_api-8.9.10.tar.gz
| Download URL | anylogic_design_time_api-8.9.10.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0cb159b6d21a66547585790c591cdc240f7e8bf2bdc86f212a5300ea6884bda
|
|
BLAKE2b-256 checksum How to use checksums |
83f327c8f28d5610d39034c8836b50035c92c293a6dab91af9c15b1eb7437505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.4
|
Release files / anylogic_design_time_api-8.9.10-py3-none-any.whl
| Download URL | anylogic_design_time_api-8.9.10-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
655014a71dc80c397ce25f2db0aed981c07b5247dad97a38ad233f2a7e759581
|
|
BLAKE2b-256 checksum How to use checksums |
d42bdfb7f5ad2998e2069961a0c2cbd335c1c315b74678139bb716ee9eda07a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.4
|