Event Scripts

Top  Next

EVENTS~1_img1

Event Scripts

 

Event Scripts is a feature available in all our spatial products where you can create scripts of your own for various events that can happen to a layer. Each time the event occurs in the layer, the script is then run. This uses JavaScript. It is found in the Layer Properties box:

 

EVENTS~1_img2

 

There are four different kinds of event scripts that can be created: Row Changed Script, which will run the script whenever a row is changed in the layer data; New Row Script which will run the script whenever a new row is added to the layer data; Before Edit Script which runs a script before editing of the layer data is allowed to happen; and Load Filter Script which will run a script that will filter the data when data is loaded into the layer from an external source like an Excel sheet so that only the data you want to look at is loaded and no more :

 

clip0001

 

Above these tabs are buttons that can be used for the scripts. Check Syntax will do a check of the syntax of your script and if all good it will let you know. Insert Column allows you to insert a column from your layer data into the script and Insert Calculation allows you to insert various calculations for your script:

 

EVENTS~1_img4

 

EVENTS~1_img5

 

EVENTS~1_img6

 

 Scripts can be saved out and opened using the context menu that comes up when right clicking:

 

clip0005

 

Furthermore the scripting area can be popped out into its own Script Editor window by selecting Pop out from the context menu. This can also be done by ctrl P:

 

clip0006

 

 Full intelligent code completion is available in all these scripting areas with error highlighting.