[Artwork] / [QisMLib]

QisMScript

Welcome to the reference page for QisMScript, the scripting core of QisMLib, Artwork Conversion's CAD processing framework.

A script is a plain text file listing commands, one per line, that the framework carries out in order. QisMScript is the machinery behind that. It keeps a register of every command the framework and its add-ons know about, runs commands one at a time or from a file, and holds the named variables that let one command hand its results to the next. For people who write their own software, it also shows how to add new commands to the register and thereby customize the scripting system to their own functionality.

Alongside that plumbing, QisMScript supplies a set of general-purpose commands that every scripting-enabled application can use. They cover the everyday needs of a script: defining and testing variables, making decisions, looping over lists, reusing blocks of commands, converting units, and asking the computer about itself.

This page is the complete reference for the scripting interface. Here is what you will find, in the order it appears:

If you want to automate the framework without writing code, start with the script commands. If you are embedding scripting in your own application or adding commands to it, start with the C++ programming interface.


QisMScript C++ API (qismscript.h)

class QisMScriptUtil

A utility class available to any script handler for commonly used tasks

Version Control

Cast to a pointer of another version in the class hierarchy (base/derived)

Add_var()

Create a new variable to be referenced elswhere in the script (in other commands)

Get_var()

Get the value associated with a variable

Remove()

Delete a variable and it's value

Log_msg()

Write a log message (stdout / log file)

class QisMScript

Represents a script command handler

enum Status

Status codes returned by a command

Version Control

Cast to a pointer of another version in the class hierarchy (base/derived).

On_command()

Callback to handle a specific command registered to this handler

Get_last_error_msg()

Get error message if return status is CMD_ERROR or CMD_WARNING

class QisMScriptRegister

Represents the register of all scripting commands

Version Control

Cast to a pointer of another version in the class hierarchy (base/derived).

Register_command()

Associate a command with this handler

Get_script()

Get the handler associated with a command

class QisMScriptRunner

API to execute scripts and commands

Version Control

Cast to a pointer of another version in the class hierarchy (base/derived).

Add_var()

Create a new string variable to be referenced elswhere in the script (in other commands)

Get_var()

Get the value associated with a string variable

Run_script_command()

Run a command (arguments specified as one string)

Run_script_command_v()

Run a command (arguments specified as an array of strings)

Run_script_command_file()

Run a script (text) file containing a list of commands (one per line)

Get_script_help()

Get available command names and usage

Get_last_error_msg()

Get error message and code for the last error condition

class QisMScriptRunnerV2

Add_handle()

Create a new object variable to be referenced elswhere in the script (in other commands)

Get_handle()

Get the value associated with a object variable

Remove_var()

Remove a variable from the scripting sub-system

Basic (QisMScript) Commands

Various utility commands that aid in the development of a script Available to all applications using the QisMLib system with scripting enabled

script.procedure

script.end_procedure

script.call

script.push

script.pop

script.required

script.if

script.set

script.setif

script.ifset

script.substr

script.tokenize

script.parse

script.branch

script.capture

script.foreach

script.convert

script.rename

script.make_id

script.num_cpus

script.phys_mem_size

script.file_name

script.file_size

script.new_window_set

script.delete_window_set

script.window_set_to_file

script.window_set_to_string

script.print_vars


ARTWORK CONVERSION SOFTWARE, INC.
509 N. Sepulveda Blvd. Suite 201 Manhattan Beach, CA 90266  tel: 831.426.6163  email: info@artwork.surf