💻Scripting

Flying Logic includes a powerful scripting system based on the Python™ programming language.

Flying Logic includes a powerful scripting system based on the Python™ programming language. Scripts can be used to create or manipulate Flying Logic documents, and create importers and exporters that allow foreign file types to be loaded and saved directly from within Flying Logic.

Most of the details of how the built-in Python interpreter interacts with Flying Logic are detailed in the Flying Logic Scripting Guide. This section describes only the basic scripting features and commands.

Currently Flying Logic has no integrated code editor for scripting. Therefore, you will write your script files (ending with the “.py” extension) using an external text editor or programming environment, and then provide them to Flying Logic for execution.

Running a General-Purpose Script

To run a general-purpose script that either creates a new Flying Logic document or performs operations on the frontmost open document, use the Edit ➡ Run Script ➡ Open Script… command. For your convenience, the last four scripts run are remembered in the Run Script submenu.

Importing via Script

To convert a foreign file format to a Flying Logic document via a script-based importer, use the File ➡ Import ➡ Import Via Script ➡ Open Script… command. For your convenience, the last four importers run are remembered in the Import Via Script submenu.

Exporting via Script

To convert the frontmost Flying Logic document to a foreign file format via a script-based exporter, use the File ➡ Export ➡ Export Via Script ➡ Open Script… command. For your convenience, the last four exporters run are remembered in the Export Via Script submenu.

User-Defined Attributes

The User-Defined Attributes Inspector is used manage custom name-value pairs in any Flying Logic document element or in the document itself. This data can be accessed or modified directly from scripts.

Last updated