PPM Scripting

The images have been deleted from this page.


The PPM Scripting language is a very simple geometric description language with keywords
to define geometry and parameters associated with the geometry.

To use the PPM Script editor, select Parametric Part Script Editor from the View menu.
Here is a simple example, for more detail go to the PPM Scripting Reference page:

// Here is a description of simple rectangle.
//Create a variable H and call it Height. The minimum value is 10, the maximum 100
H = Parameter("Height",   5, LINEAR, Interval(10, 100));
//Create a variable W and make it the golden ratio of H 
W =  H * 1.618;
//Create a variable Angle and call it Angle. The minimum value is 0, the maximum 360
Angle =  Parameter("Angle", 0, ANGULAR, Interval(0, 360));
//Create a new variable Rect1
Rect1 =  Rectangle(H, W);
Rect =  RotateZ(Rect1, Angle); 
Output(Rect);


Type the above into the editor window and click on the disk icon to save. You will notice
that the text is color coded. Black text indicates variables, brown indicates text and
blue indicates reserved words. Magenta text indicates an error. The status line of the
palette will indicate the reason for the error. In the example of the screen shot, it
is Undefined Identifier:ErrorLine

img/wiki_up//PPMEditor.png

Once it is saved you can click on the blue arrow to run the script. It will draw a rectangle
on the screen. If you select the rectangle and go to the Selection Info Palette, you will
see that you now have the two parameters: Width and Angle. If you change Width,
the rectangle's width will change and so will the height, according to the golden ratio.

img/wiki_up//PPMSelectionInfo.png





PPM Scripting Reference
Homepage
TurboCAD Tools



Contributors to this page: jrsollman and admin .
Page last modified on Monday 25 of July, 2011 04:15:05 PDT by jrsollman.