Klik op het logo voor hulp op afstand
  
 
 
 
 
 
 
 




JoPPS actions


Actions are JoPPS-Script macro's stored in the JoPPS action database table. There are three different kind of actions in JoPPS:
  1. Events: Actions being executed when specific predefined events occure.
  2. Errors:  Actions being triggered upon program errors. Can be used to deal with certain errors in a non-standard way.
  3. Decision rules: Actions implementing mainly machine related operations in order to interface machining centers. (MCs) 
Normally actions are executed in background, the JoPPS cursor changes in a "J" cursor during macro execution. When an error occures the JoPPS-Script macro editor opens and positions at the line causing the error. Actions can be forced to start manually (and run visually in the JoPPS-Script macro editor) for debugging purposes. Actions can also be enabled or disabled on an per action basis.
 
 

Events

Actions can be used to act upon specific events within the JoPPS program, eg. a project file being opened, a new project being created, etc.
 
 
Example:
Create a new action record and name it _AFTERDATABASEOPEN. Make it type 'Event' and enable the action. Enter the following JoPPS-Script ..

SetWallpaperSource(HTMLToString(Action.DBID + ": I am finally open !"));


Post the new record and reselect the database. Watch how the JoPPS wallpaper changes once the database reopens..

 

Trapping errors

Actions can be used to intercept error situations occuring within the JoPPS program.
We can run a JoPPS-Script macro to ignore errors or deal with errors in a non-standard way.
 
 
For example the standard errormessage error "-10027 : Project can not be read from disk"
(occuring when opening a projectfile fails) could easily be replaced by another message of our own.
 
 
For each errorcode we can provide an action record holding the macro code to be executed when the error occures. To add a macro for the -10027 error simply add a new action record and assign it the code _10027 (underscore instead of minus!)
 
The next time the error occures our code will be executed first, before the standard errorhandling kicks in.
 
Our _10027 action is called in the same way as if it is an event. Setting the action result value in our macrocode to TRUE disables the standard JoPPS errorhandling.
 

error event
Parameters passed through the action object
Fired..
_XXXXX
ERRCODE
ERRTYPE
TITLE
MESSAGE
ATOM
When the corresponding error occures.

 
Example:
 
/* macro code for error -10027 */
Beep();
SetWallPaper('exploding_granate.bmp');
MsgErr2(Action.Title,Action.Message);
Action.Result := TRUE;
/* returning True means error is handled, thus disables standard errorhandling */
 
Decision rules
 
Decision rules are used to interface machining centers. (MC) Decision rule actions are interpreted during the calculation phase when: 
  • the license includes the MC option,
  • the internal "EnableActions" flag is TRUE
  • decision rule actions are linked to the current database and/or the current project. (coded)
Decision rules are used to determine the operations and positions of machining operations to be performed by machining centers. The use and coding of decision rules is beyond the scope of this document, refer to the Interfacing MCs - an introduction document for more information on this topic.

 




 |  History  |
 
 

 
 
 
TECHWIN SOFTWARE
De Regenboog 11
B-2800 Mechelen
T +32(0)15 44 64 64
T +31(0)30 899 32 15 Nederland