________________________________________

OMAX Scripting and Plugins

Scripting is a powerful language supported by both LAYOUT and MAKE for advanced programmers

OMAX Scripting was used to create the above Offset Selected Entities function in LAYOUT.

 

OMAX Scripting is a way to extend OMAX applications (in particular LAYOUT ) with custom capabilities. OMAX Scripting is a programming language. Scripts can be run by themselves in LAYOUT , or bundled for easy distribution and installation by anyone as "plugins", and can also be used to create stand-alone applications, and more.

Most users will not worry so much about scripting, but instead deal with plugins created by other people who have learned to use scripting to make custom features. Advanced users, on the other hand, can create their own scripts and plugins.

To give you some sense of what scripting can do, it's worth noting that OMAX Scripting is used inside the OMAX software in many places. For example, the Move Lead, Swap Lead and Sprocket commands were written using OMAX Scripting, as well as some dialogs. Although OMAX Scripting is most valuable to those who know how to program (or want to learn to program), there are still many demo scripts that may be of use, even if you are not a programmer.

The adventurous may wish to explore these to find useful tools that might not otherwise be available in LAYOUT . There are a few demo scripts to illustrate the point in the "…\Scripts\" sample file folders. In time, we will be adding many sample scripts to cover obscure requests that may be inappropriate to expose directly into LAYOUT , but may still be of great value and use to some, and to possibly you.

For those less adventurous, but would like a few new commands for LAYOUT , some of these scripts are available as plugins in pre-packaged, ready-to-install .omaxplugin files.

If you are interested in an early start in using OMAX Scripting, email scripting@omax.com for more information.

For additional information, refer to the OMAX Scripting Manual, which you can also find in LAYOUT.

To view the OMAX Scripting Manual:

1. Open LAYOUT.

2. Launch the Scripting Editor from the Scripts and Plugins pull-down menu:

3. Click the Help menu option in the scripting editor:



Key Scripting Points

Plugins are easy to install:

1. Anyone can install and remove plugins easily, without special skills.

2. Plugins are files you can use to give LAYOUT new commands or functionality.

3. Advanced users can make plugins for themselves, or distribute them to others, using OMAX Scripting.

 

Scripting is supported in the following scenarios:

1. Making new commands for LAYOUT

2. Hooking to events in MAKE (run scripts when certain things happen)

3. Creating file open filters for LAYOUT and/or MAKE

4. Running in the Script Editor

5. Creating stand-alone utilities

 

OMAX Scripting:

1. Scripting is an advanced feature for programmers.

2. OMAX Scripting is a general purpose programming language that has been modified to work with the OMAX software with high level CAD and similar commands. It can be used to make stand-alone applications or plugins for LAYOUT , or other purposes.

Anyone can run scripts and plugins:

There are no special skills required to run scripts and plugins – only to make them.

 

To Install a Plugin

1. Use the "Scripts and Plugins" menu at the top of LAYOUT , and choose "Install a plugin…" OR

2. From outside the OMAX software, double click on an ".omaxplugin" file. The .omaxplugin extension is registered to open in LAYOUT , so if you double-click it, LAYOUT will automatically run and install the script. OR

3. Drag and drop an ".omaxplugin" file into LAYOUT , or onto LAYOUT 's desktop icon.

 

NOTE: 

There are some plugins already available that are distributed with the software in the C:\Users\Public\OMAX_Corporation\AllUserData\Scripts\AvailablePlugins\ folder.

 

To Install a Script

Scripts can be installed just like plugins, but one must use the "Install a plugin…" menu item in LAYOUT . Simply navigate to the .omaxscript file you want to install, and it will install it for you. (Behind the scenes, it will copy and rename the script, to make it a plugin.)

 

NOTE: 

Not all scripts are appropriate to run in LAYOUT , or in this manner, but many of them are.

 

To Assign a Script to a Function Key

1. From LAYOUT , click the "Scripts and Plugins" menu and choose, "Assign Function Keys." (This opens the standard dialog to assign any LAYOUT command to a function key.)

2. Choose which Function key you wish to assign to run the script.

3. For the "Command to Execute" choose, "Run Script"|

4. Click the folder icon to choose the file name of the omaxscript file to run.