Local automation lets Python scripts and other programs running as you on this computer read and edit your open drawings. It is off by default. For users who automate repetitive work.
Before you start
- Only run scripts you trust. They run with your permissions and are not sandboxed.
Steps
- Click Plugins > Local automation….
- Tick Allow local automation. The dialog shows the status; the status bar shows AUTOMATION while it is on.
- Under Folders automation may open, save and export in:, click Add folder… for each folder scripts may use. Remove folder takes one off.
- Run your script. When you finish, untick Allow local automation.
What scripts can and cannot do
- Nothing listens on the network. Only programs on this computer, running as you, can connect.
- Scripts open, save and export only in the listed folders.
- Scripts cannot edit while you are in the middle of a command.
- Scripts and plugins can follow events (a drawing opens, closes or changes, the selection changes, a command starts or ends), but they change drawings only through commands, so Undo works as usual.
- A script can convert many
.stcadand.dxffiles in the listed folders in the background, with progress, a result for each file and a cancel. Files that cannot be read are reported and the rest carry on. The open drawings are not touched.
Troubleshooting
| Message or symptom | What it means and what to do |
|---|---|
| "Local automation could not start: …" | Read the reason. Close other Stratal CAD windows using automation and try again. |
| A script cannot save a file | The folder is not listed. Add it under the automation folders. |
Related
Related
- Buying and installing plugins
- Opening and saving DWG files
- Using the asset library
- Using plugins in a drawing
- Plugins in Stratal CAD
- Managing plugins
Still stuck? Open a support ticket or use Help, then Contact support in Stratal CAD.