Polyline Vector Formula Syntax
Points to Remember:
Any value, name or character that does not need to evaluate must be surrounded by quotes ("")
Example: =IF(VariableA=1,"TEXT",VariableB)
- NOTE: If VariableA does equal 1 then the answer will be what is between quotes: TEXT. Otherwise if VariableA does not equal 1, then the answer will be whatever VariableB evaluates to.
Syntax used for polyline vector formulas are:
; Semi-colon
| Pipe (usually above the ENTER key - hold SHIFT)
" Quotes
& Ampersands
Vector points are always entered in the same order: X;Y;Z
X, Y and Z are always separated by a semi-colon (;)
Each vector location is separated by a pipe (|)
Using this logic, a formula with hard values would simply read 12;3;.76|12;4;.76
However, in a formula string using defined names, the "semicolon" and "pipe" symbol are illegal characters - they need to be enclosed in quotes. In order to tie the formula string together, an ampersand needs to begin and end each point.
Example formula:
=Height-Route_Distance&";"&Route_Distance&";"&Route_Depth&"|"& Height-Route_Distance&";"&Width-Route_Distance&";"&Route_Depth
In the example above,
"Height-Route_Distance" is the X value
"Route _Distance" is the Y value
"Route_Depth" is the Z value
Lastly, there may be situations where you need to have both hard values and defined names. There are two ways of doing this. Here is the original example formula:
=Height-Route_Distance&";"&Route_Distance&";"&Route_Depth&"|"& Height-Route_Distance&";"&Width-Route_Distance&";"&Route_Depth
One way is by simply replacing a defined name with a hard value, while leaving all the ampersand, quotes, etc unedited. This is the quickest way to replace defined names with hard values. Example:
=Height-Route_Distance&";"&Route_Distance&";"&.76&"|"& Height-Route_Distance&";"&Width-Route_Distance&";"&.76
Notice the Route_Depth was exchanged with the hard value of .76.
In most situations this will work. But, there are unnecessary characters still being used in this formula. The standard syntax for including hard values with defined names would look like this:
=Height-Route_Distance&";"&Route_Distance&";.76|"& Height-Route_Distance&";"&Width-Route_Distance&";.76"
Notice that we here treat the hard value as one of the characters and group them all together with the quotes surrounding them.
REMEMBER: Everything enclosed by quotes will return exactly as the way you see it here.
Either method will work, but if you are in a situation where you are concerned about the length of the formula, the second option will be shorter.
NEW for MICROVELLUM 67
One of the (many) new features with MV67 is the ability to create a polyline token using the VECTORS(PNT function. This simplifies the process involved in creating parametric vector points, doing away with the need to manage a cumbersome syntax routine.
The formula requires X,Y,andZ vector points separated by commas, and each of these point "sets" are enclosed in parentheses.( ) . A comma is needed to separate the first set from the second set, the second set of points is prefaced with (PNT. The formula will end with two closed parentheses )).
The formula syntax reads as follows =VECTORS(PNT(X,Y,Z),PNT(X,Y,Z),PNT(X,Y,Z))
The X, Y and Z values can be hard numbers or defined names
So the formula we used as the example would read: =VECTORS(PNT(Height-Route_Distance,Route_Distance,Route_Depth),PNT(Height-Route_Distance,Width-Route_Distance,Route_Depth))