Introduction to Quantrix Scripting

Scripting allows sophisticated users to author small programs that run within the context of a Quantrix model.

Quantrix offers scripting capabilities that let you automate tasks and expand Quantrix's built-in facilities. For example, you could create a script to update a series of Data Imports in a prescribed order.  You could also build various scripts inside a model, and, once you have all the scripts as you want them, you could save the model as a template. Creating a model based on that template would result in your having all the scripts available in the new model. Click to see the reference resource for global variables and methods, and for Modeler objects, properties and methods (actions) that are available in Quantrix scripting.

You can re-use scripts using the Libraries feature within Scripting, or you can click and drag scripts from one model to another (simply open both models, open the Script Manager in both, and click and drag the script from one Script Manager pane to the other). To share scripts with other models using the Scripting Library feature, right-click on a Script Library and Export (to the Script Library repository), or Export to File (to the file system rather than to the Quantrix repository). To access exported scripts, use the Script Manager Library's Import features (to import from the Quantrix repository or the file system)

The scripting help topics explain what scripting is, how it works in Quantrix and how to create scripts. The Quantrix Ask a Question forum is a rich source for scripting ideas and advice.  

Intended Audience

Quantrix scripting is meant to be accessible to anyone who uses Quantrix regularly and wants to leverage the benefits scripting provides. You need not be a “professional” programmer to use scripting. Application of scripting does involve some programming, but only at a basic level. With mastery of just a few fundamentals, anyone can learn to write scripts.

This guide is written for both novice and experienced programmers. It does assume that you are reasonably familiar with Quantrix, and it focuses on explaining scripting techniques while skipping detailed instructions for routine Quantrix tasks. It also assumes that you are familiar with the basics of the Groovy programming language, so if you have yet to learn Groovy, read on for advice on where to start.

If You Have Programmed Before

If you already know Java or a similar language, it will be easy to learn Groovy. If you are used to Visual Basic, you will find that Groovy code looks a little different but uses the same concepts. You may find it helpful to google "Groovy getting started" and " groovy" to find Groovy resources.

If You Haven’t Programmed Before

Quantrix scripting is designed to be intuitive, and assumes minimal technical background.

However, scripts are programs, so you cannot write scripts without learning at least the basics of programming. An introductory book about the Java language will teach you almost everything you need to know. Even though Quantrix scripting actually uses Groovy, Groovy is built on top of Java so learning Groovy consists of learning Java and then picking up a handful of new features.

Overview of Scripting