Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Format:
<id> = Parameter(<name>, <default value>, <type>[, <condition1>][, <condition2>]..);
Note

Panel

NOTE: The '<>' markers are used to designate elements in the expression, and the '[ ]' markers are used to indicate elements which are optional.


<name>

The name displayed in the user interface;

<default value>

The default value of the parameter;

<type>

Defines the parameter type. The following example values are possible:
LINEAR, means that the parameter is a linear value in the selected linear units of measure.
ANGULAR, means that the parameter is an angular value in the selected angular units of measure. (only degrees are available at this time)
TEXT, a text string;
FONT, a font name;
COLOR, an RGB color value;
MATERIAL, a material name;
CHECKBOX, a logical value, either ON or Off

<condition>

These are optional. They define possible restrictions imposed on parameters. Restrictions can be listed in arbitrary order and may take on the following forms:
Set(<value>,...) — a list of permissible values of the parameter Interval(<minvalue>, <maxvalue>) — sets the minimum and maximum values of the parameter; LessThan(<value>) — indicates that parameter value should be less than the specified value LessOrEqual(<value>) — indicates that parameter value should not be greater than the specified value GreaterThan(<value>) — indicates that parameter value should be greater than the specified value GreaterOrEqual(<value>) — indicates that parameter value should not be smaller than the specified value
Set(FolderList) --- particular case of Set operator, when a list of permissible values are defined by operator FolderList.
Restrictions should not contradict each other. For example, you cannot combine GreaterThan(5) with LessThan(2).
When specifying parameter restrictions, it is not allowed to use identifiers or expressions that directly or indirectly depend on other parameters, as arguments of the above-mentioned functions. Only constants or constant expressions can be used, for example: LessOrEqual(PI/2).

...

The Circle function is used to create circles

Format:
Circle(<radius>[, <cx>, <cy>]);

...

The Rectangle function is used to create rectangles.

Format:
Rectangle(<width>, <height>[, <cx>, <cy>]);

...

The Polyline function is used to create polylines consisting of straight line segments and arc segments.

Format:
Polyline(<list of arguments>);

...


A line segment is defined by 2 Points.
An arc segment is defined with a Fillet function or with an Arc0 or Arc1 function and two Points on the ends of the arc.
For polylines that contain only straight line segments, the <list of arguments> consists of only 2D points, defined using Point(x,y) function.

Format:
Point(<cx>,<cy>)

<cx>

Defines the x coordinates of the point

<cy>

Defines the y coordinates of the point

...

The Thickness function creates a 3D entity based on the 2D entity by adding thickness. It also allows you to change the thickness property of the 3D object.

Format:
Thickness(<Object>, <value>);

...

The Sweep function creates a 3D object by extruding a specified profile along a path, defined by a 2D polyline or circle. The profile is defined by a closed 2D polyline or circle.

Format:
Sweep(<profile>, <path>[,<rotation angle>]);

...

The Sphere function is used to create a 3D sphere.

Format:
Sphere(<radius>[,<cx1>,<cy1>,<cz1>]);

...

The Cone function is used to create a 3D cone.

Format:
Cone(<Height>,<baseradius>[,<topradius>]);

...

The Move function is used to move (shift) graphic objects.

Format:
Move(<Object>, <dx>, <dy> , <dz>[,count]);

...

The RotateX, RotateY. RotateZ functions are used to rotate graphic objects around the X, Y and Z axes, respectively.

Format:
RotateX(<Object>, <rotation angle>[, <cy>, <cz>[,<count>]]);
RotateY(<Object>, <rotation angle>[, <cx>, <cz>[, <count>]]);
RotateZ(<Object>, <rotation angle>[, <cx>, <cy>[, <count>]]);

...

The StaticSymbol function loads non-parametric symbols from external files. When the external symbol's filename is specified with no path information, the symbol is automatically assumed to reside in a sub-folder named Macro that is located in the ppm file's home folder.

Format:
StaticSymbol(<FileName>[,BlockName]);

...

To create a list of files in a folder, Set(FolderList(...)) is typically used as the Parameter restriction.

Format:
<id> = FolderList(<path> <mask> = "*.ppm");

...

The BooleanUnion function creates an object by adding the specified objects together.

Format:
BooleanUnion(<Object>, <Object>, ...);

...

The BooleanSubtract function creates an object by subtracting the secondary objects from the primary object.

Format:
BooleanSubtract(<PrimaryObject>, <SecondaryObject>, ...);

...

The BooleanIntersect function creates an object derived from the intersection of the primary and secondary objects.

Format:
BooleanIntersect(<Object>, <Object>)

...

The Fillet Edges function allows rounding one or multiple edges of 3D object.

Format:
G3Fillet(<Object>,<Edges>, <Radii>);

...

The Chamfer Edges function allows chamfering any edge or multiple edges of 3D object.

Format:
G3Chamfer(<Object>, <Edges>, <Offsets>);

...

The G3Offset function extends a solid face inward or outward.

Format:
G3Offset(<Object>, <Face>, <Offsets>);

...

The G3Shell function allows shelling the shape of solid object, leaving the selected face open. It creates a shell of a specified thickness from a single solid object. The new faces are created by offsetting existing faces inside or outside.

Format:
G3Shell(<Object>, <Face>, <Thickness>);

...

The G3Bend function is used for bending 3D objects.

Format:
G3Bend(<Object>, <Line>, <Angle>, <Radius>, <Depth> );

...

The SetProperties function is used to set the properties of objects.

Format:
SetProperties(<Object>, <PropertyName> = PropertyValue, <PropertyName> = PropertyValue, ...);

...

The Text function defines the text string itself and its characteristics, including fonts, style, effects, etc. Acceptable font values are dependent upon those installed on your machine.

Format:
Text(<Text object>, <Text Font>, <Text Style>);

...

The TextFont function sets the text font, size, and the angle of text line location.

Format:
TextFont(<mode>, <Height>, <Angle>, <font>);

...

The TextStyle function sets the text style including justification, text effects and styles.

Format:
TextStyle(<list of characteristics>);

...

The ParameterPoint function defines a parametric point with number and coordinates.

Format:
ParameterPoint (<N>,<xc>,<yc>,<zc>);

...

The PointX, PointY, PointZ are used to calculate the coordinates of parametrical point. The PointX function calculates X-coordinate of parametrical point. The PointY function calculates Y-coordinate of parametrical point. The PointZ function calculates Z-coordinate of parametrical point.

Format:
PointX (<point>);
PointY(<point>);.
PointZ(<point>);

...

The IF function allows various actions to be performed depending upon whether the specified condition is fulfilled or not fulfilled. It plays the role of a conditional operator, and can be used to create branches in the logic of building a parametric part.

Format:
IF(<Condition>, <ExprOnTRUE>, <ExprOnFALSE>);

...

The UNITS function defines the units that will be used in the script. It defines the System, Space Units and Scale of dimensions used while creating objects. This function allows loading parts correctly in drawings with different specified units.

Format:
Units(<N>[<units of dimension>]);

...

The RefPoint function sets the location of the Reference Point for the parametric part. When the Reference Point is one of the output values of a script, it is inserted in the drawing along with the part. This enables precise insertion of the parametric object into the drawing.

Format:
RefPoint(<Point>);

...

The Input and Output functions are used for inputting initial values or objects into the script and outputting result objects from the script.

Format:
Input(<list of variable identifiers, separated with commas>);
Output(<list of variable identifiers, separated with commas>);

...

The min and max functions are used for choosing the minimum or maximum values within a set of values.

Format:
min(<set of values>);
max(<set of values>);

...

The Mod function is used for finding the remainder of the integer division. For example, Mod(5,4) is 1, because 5/4 = 1, with a remainder of 1. Mod(7,4) is 3, because 7/4 = 1, with a remainder of 3. Mod(7,3) = 1, because 7/3 = 2, remainder 1.
Note: The Mod function is often used to determine if a number is odd or even, because Mod(AnyOddNumber, 2) = 1, while Mod(AnyEvenNumber, 2) = 0.

Format:
Mod(<value1, value2>);

...

The Div function is used to perform division.

Format:
Div(<value1>,<value2>);

...

The Array function defines an array of values, or an array of Points, by directly listing the elements of the array. In other words the Array function collects geometric objects or values into an Array object.

Format:
Array(<list of objects>)

...

The Group function collects multiple graphic objects into a group and assigns an identifier name to the result. It allows the script to work with multiple objects as if they were a single object. Also a Group can be the output value of a script. Groups of objects can take part in different operations: Move, Rotate, etc.

Format:
Group (<list of objects>);

...

PI

LINEAR

TEXT

ANGULAR

MATERIAL

FONT

COLOR

CHECKBOX

ITALIC

BOLD

UNDERLINE

BOX

ALLCAPS

STRICKETHROUGH

TOP

MIDDLE

BOTTOM

BASELINE

LEFT

CENTER

RIGHT

Call

Array

+

-

*

Div

Mod

/

-

sin

cos

tan

atan

min

max

**

=

==

!=

<

>

<=

>=

&

Solid

Extrude

UNIQUE

GraphicId

VertexId

 

Vertex

Face

Edge

Source

Bound

Intersect

OperationList

BlendArg

BlendParam

BlendType

BlendRadiusMode

BlendSetback

BlendRadiusBlendSmooth

BlendRadiusParam

BlendOffsetParam

BlendFaceEntity

BlendFaceEdge

BlendFaceVertex

BlendEdgeEdge

BlendEdgeVertex

BlendEdgeVertexMain

BlendEdgeVertexAux

ShellArg

ShellThickness

ShellFace

ShellEdge

FaceEditArg

Transform

ScaleX

ScaleY

ScaleZ

ShearXY

ShearXZ

ShearYZ

RotateX

RotateY

RotateZ

TranslateX

TranslateY

TranslateZ

Path

Profile

LateralFace

LateralEdge

CapFace

CapEdge

JointEdge

Profiles

HighLight

FaceMaterialArg

FaceMaterial

FaceOffsetArg

FaceHoleArg

FaceHole

BendId

BendRadius

BendAngle

BendNeutral

BendFlag

BendPosition

BendFlangeHeight

BendAxialDistance

BendAzimuthAngle

BendEdgeStartPosition

BendEdgeEndPosition

Face2FaceLoftArg

Face2FaceLoft

 

AssemblyAxis

Input

Output

Include

Units

StaticSymbol

FolderList

Macro

Parameters

Parameter

ParameterPoint

PointX

PointY

PointZ

Set

Interval

LessThan

GreaterThan

LessOrEquail

GreaterOrEqual

Circle

Rectangle

Polyline

Point

Arc0

Arc1

Fillet

IF

Move

Thickness

Sweep

Cone

BooleanUnion

BooleanSubtract

BooleanIntersect

G3Fillet

G3Chamfer

G3Shell

G3Offset

G3Slice

G3Bend

ExtentsX1

ExtentsX2

ExtentsY1

ExtentsY2

ExtentsZ1

ExtentsZ2

Text

TextFont

TextStyle

Group

SetProperties

PatternCopy