InStep - Help

Macros

The InStep application has a limited Macro/Scripting functionality built in as of V2.3.3. Macro files only have very limited functionality, aimed mostly at working with large batches of files where little manual input is required.

Since Macro files allow access to advanced file manipulation, it is only available for the Design and FE licenses.

Macro files can be run from within the application through the Menu>ToolBox>Run Macro option (which brings up a dialog box asking for the macro file) or directly from the command line as described below. Default macro files have the .IMC extension (InStep Macro Commands) but plain text files can also be selected. The contents of macro files is plain text and uses commands given in the following table. Note that the Commands are case-insensitive. Commands with a ( ) added to the end required a parameter.

Command Parameter Function
Load() File Name (between " ") Loads the given file(s) that match the string expression. The file name may contain * characters as wild cards. Clears all data before loading new data.
Append() File Name Adds the file(s) to any already loaded geometry.
LoadSave(,) File Name, export extension. Loads a file then immediately proceeds to export the loaded data before loading any other files that match the File Name expression
Save() File Name Exports all loaded data to the given file name. The extension must match a valid format.
SaveSeparate() File Name Exports all loaded data, generating separate files for each body.
SaveMessages() File Name Saves any messages that the application has produced to this point.
ClearErrors N/A Clears the Error indicator.
IfError_SaveMsg() File Name Saves the Messages if errors have occurred.
IfNotError_SaveMsg() File Name Saves the Messages if no errors have occurred
IfNotError_ClearMsg N/A Clears the Messages if no errors have occurred
ClearMsg N/A Clears Messages
Combine() [Body index] Combines planar features of the body index (zero based). If no parameter is provided, runs it for all bodies.
Round() Decimal Rounds the vertices to the given value.
NoGUI N/A Hides the visual elements during manipulation
Exit N/A Closes out of the application.
     

 

Comments can be added at will for an entire line. Comments must start the line with a hash (#). The remainder of the line is ignored.

Command Line exectution of the application is not yet fully tested but works for the majority of cases. The intent is to allow 3rd party applications to interact with the InStep application in a simple way without requiring the user to enter the InStep environment and learn a new tool. The application can be accessed through a few different ways:

C:\Program Files (x86)\Solveering LLC\InStep V2.3\InStep.exe C:\Temp\inFile.stl C:\Temp\outFile.stp

This represents the simplest case where the application is launched, the 'inFile' loaded and exported to 'outFile'. For practical reasons, this may not be the best option, but rather a modified approach should be used that incorporates all or most of the following syntax:

C:\Program Files (x86)\Solveering LLC\InStep V2.3\InStep.exe C:\Temp\inFile.stl C:\Temp\outFile.stp -L -CFG C:\Temp\config.cfg -T 0.001 -COMB -X

In this case there are additional switches that get activated (they can be lower case, they are in upper case here only as an example).
The -L switch indicates that the local directory should be checked for a Lic.Dat file that contains a license key. If the file exist and increments the current license, it is automatically activated (if it is invalid, the application will pause for 10 seconds so the -L option should be used sparingly).
The -CFG switch, followed by a path to a configuration file, allows custom configurations to be loaded as part of the import/export process (so that mm<->inch conversion can be modified as well as any of the other options available for the configuration). It is recommended that the configuration file is not manually generated, but rather modified within the InStep application and then copied from its default location (this location is given in the About dialog box from within the application).
The -T switch followed by a valid decimal number sets a vertex rounding tolerance (all vertices are shifted to an integer multiple of this value).
The -COMB switch initiates the planar combination feature tool which will reduce the data size of the items loaded.
Lastly, the -X switch tells the application to exit once the process is complete.

An alternative to the above syntax, and more powerful, is to replace the input/output options with a macro file and call the application through the syntax

C:\Program Files (x86)\Solveering LLC\InStep V2.3\InStep.exe -M C:\Temp\macro.txt

This will launch the application and execute the macro file located in the provided file location. Issues may occur if the macro file contains errors.

Some of these functions require further testing for cases where the installation is not in the default location or the file contains special characters or formats so following the default naming convention is recommended as is a methodology whereby increasingly complex samples are tested rather than directly experimenting with large and complex scenarios.

 

Macro File Examples:

## InStep Macro
## Loads a single Body,exports it and closes the application
load("C:\temp\body.stl")
save("C:\temp\output.stp")
exit

 

## Load and Save all STL files in the Temp Directory to STP files
loadsave("C:\temp\*.stl,stp")

 

## Load a single body, round the vertex locations, combine and export
load("C:\temp\cube.stl")
round(0.001)
combine
save("C:\temp\out.stp")
exit