Python Scripts in SIS

Python scripts allow you to automate tasks in Cadcorp SIS Desktop that might be time-consuming if carried out one task at a time.

SIS Desktop installation includes Python's Integrated DeveLopment Environment (IDLE) script editor. This is simply a text editor that allows you to write and execute Python code.

Note: Other Python script editors are available for download (for example PythonWin). Notepad can also be used to write scripts but you cannot run scripts from Notepad.

Python variants present in Cadcorp SIS

Python in SIS (PySIS) - this is Python embedded in SIS and has two variants:

  1. Developer Control Bar which provides a user UI similar to the regular Python console (>>>) and exposes the SIS API. This allows you to run SIS API calls or Python scripts as part of a SIS session.
  2. Python GisLink Engine - this enables you to write custom applications to be mounted on the Applications tab of the Ribbon. It is an alternative to using VB.net or C# for GisLink customisations.

SIS in Python (SISpy) - this is a regular standalone Python module intended for use with official Python distributions. This allows scripts to be run without having to start the SIS interface.

Using third party modules

To install third-party modules for use inside the Developer Control Bar (or in Python GisLink apps):

  • Run pip from C:\Program Files\Cadcorp SIS Desktop 9\Python
  • Do NOT modify `PYTHONPATH' (neither the SIS option nor via the environment variable.)

The Python embedded in SIS Desktop is not C:\Program Files\Python36, but C:\Program Files\Cadcorp SIS Desktop 9\Python. The former is exclusively used for SISpy (i.e. this is where DLLs\sis.runtime folder with SIS run-time is deployed).