The AX Code IDE provides a task system. This system makes it possible to add entries to the "F1 command palette". Once configured, this provides a shortcut for performing tasks without typing the whole command every time.
- Open AX Code local
- Press 'F1' key
- Enter "Tasks: Configure Task"
- Select "Create tasks.json file from template" from the dropdown menu
- Select "Others"
A file called "tasks.json" opens. This file is located in the project in a new .vscode folder.
Adapt the file so that it looks like this:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation regarding the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Download to PLC",
"type": "shell",
"command": "apax sld load --target 192.168.0.1 --password aSecurePassword --certificate ./cert.cer --restart --accept-security-disclaimer",
}
]
}
There is now a task configured in AX Code local. To run this task:
- Press 'F1' key
- Enter "Tasks: Run Task"
- Select "Download to PLC"
- Select "Never scan the task output for this task"
The download operation is executed. The result can be seen in the terminal that opens.
The tasks.json file can hold more than one task. Each task has the same format as the one above. All tasks must be separated with commas.