Solids Builder - VB (Visual Basic) Expressions
All activity property fields that require Visual Basic expressions to be evaluated must be written in the syntax rules of this programming language.
Examples:
- Width + Wall
Assuming they are two variables or parameters
- Line.StartPoint
assuming that Line is an Curve
- Math.Cos(Angle)
Assuming that Angle is a variable that contains an angle given in radians
- True
Assuming the type is a Boolean
- A*X^2+B*X*C
Equations must be well written!
(the above equation is different from: A*x² + B*x + C)
- Math.PI - (to get the PI number)
Note: to use mathematical functions such as SIN (sine), COS (cosine), Abs (absolute value), etc, you need to add the name Math, as in the examples
Naming rules
It is good practice to assign meaningful names to activities.
However, note that activities can be used as arguments for other activities.
Therefore, your name
need to respect some rules in order to be able to be called as if they were a variable.
The rules are as follows:
- The names are alphanumeric (accept letters and numbers)
- Must not contain special characters
- Must start with a letter
- Cannot contain spaces
- The use of uppercase or lowercase letters does not affect anything, so "NAME" is the same as "name" or "Name"
- Names cannot be duplicated
- Names cannot be the same as pre-existing property names (eg Name, Description)
- Names cannot be VB reserved words (Dim, As, True, While ...)
- The names cannot be the same as the names of the section properties.
So, if you added the property
called Width, you cannot name a tool with this name and vice versa
If the above rules are violated, the program will rename the activity/property.
If the execution engine does not work, it will show errors in the "Execution Log" frame