Understanding the OFFSETPOLYLINE Spreadsheet Function

Understanding the OFFSETPOLYLINE Spreadsheet Function

The OFFSETPOLYLINE Spreadsheet Function allows for vector points to be entered, from a polyline token, for example, and the function then returns the vector coordinates offset by the desired amount.

The OFFSETPOLYLINE function is formatted as such:

  =OFFSETPOLYLINE(<Original Route>,<Bulge Amount>,<Offset Amount>,<Lead-In>,<Lead-Out>,<Parameter 6>,<Parameter 7>,<Parameter 8>)
  1. Original Route – The coordinates of the route to offset. These coordinates must match the polyline token vectors format (ex. x;y;z|x;y;z).
  2. Bulge Amount – The bulge list of the route. The list must match the polyline token format. In order to get the function to work properly on polylines that have arcs within them, there must be a 0 after the bulge value. This additional 0 must be added manually in most cases. (Ex: Original Polyline Bulge = 0;0;0.25, OFFSETPOLYLINE Bulge = 0;0;0.25;0)
  3. Offset Amount – The amount to offset the route.
  4. If the route is counter-clockwise, a positive value offsets to the inside while a negative value offsets to the outside.
  5. Lead-In – The lead-in coordinates of the route. These coordinates are offset and appended to the beginning of the return value.
  6. Lead-Out – The lead-out coordinates of the route. These coordinates are offset and appended to the end of the return value.
  7. Parameter 6 – Enter a value of 0 to return the new polyline's vectors. Enter a value of 1 to produce the new polyline's bulge values.
  8. Parameters 7 and 8 – Parameter 7 and 8 work together to find and replace z depths in the vector polyline. Enter a value in Parameter 7, and it is used to find values in the vector locations. The value in Parameter 8 is the new value used for the z depths in the output vector.
  9. Parameters 6, 7, and 8 are optional and can be ignored unless specifically required to return a new polyline's bulge values or find and replace z depths.

Example Tutorial:

There are a couple of different ways to go about utilizing the OFFSETPOLYLINE function. In this example, the Edit Design Data interface is used to demonstrate the process, but the function can be just as easily used through Part Properties.

Skip to the bottom of this page for a video demonstrating this process.

Start with the Misc. Starter Part and add a Polyline Token with a Lead-In and Lead-Out.


Fig. 01 – Misc. Starter Part with Polyline Token Added

Select Edit Design Data  > select the Misc. Starter Part > select the Prompts tab. 

Create a new Prompt named "Offset Route." For more information on adding prompts, see Tutorial: Add a Custom Prompt. After the prompt has been added and the name is defined, right-click in the Value cell of the new prompt and select Insert Function.


Fig. 02 – Insert Function…

Select OFFSETPOLYLINE from the Function List.


Fig. 03 – OFFSETPOLYLINE

From this window, all of the necessary parameters for the OFFSETPOLYLINE function can be entered. For more information on working in the Function Arguments window, see Using Formula Editor. The OFFSETPOLYLINE function can be entered manually in the cell if preferred.

For the demonstration's sake, some of the parameters in Figure 04 were added as prompts previously, so local prompts could be used to populate the parameters. Parameter 2, the Bulge Value, is entered as an empty pair of quotation marks because no bulge is being offset, DO NOT leave this parameter blank.

Fig. 04 – Function Arguments Window

This function looks like:

=OFFSETPOLYLINE(Original_Route,””,1,Lead_In,Lead_Out)

If done correctly, the Offset Route prompt's value should now be seen as a red (formula-driven) set of vectors.


Fig. 05 – Offset Route Prompt with the OFFSETPOLYLINE Function Applied to the Value Column

Return to the CutParts tab of the Edit Design Data window > scroll to your PLINE5 Machine Token 1 > copy the token, ensuring that all of the parameters are selected, and paste it into the blank Machine Token 2 cell.


Fig. 06 – Copying Machine Token 1 to Machine Token 2

Change Parameter 1 of Machine Token 2 to:

=Offset_Route

This change replaces the original vectors with the offset vectors. If everything has been done correctly, a new set of red vectors are displayed in Parameter 1 of Machine Token 2. Comparing these vectors with the original vectors in Machine Token 1 reveals that the Y value has been offset by 1, the amount entered for the Offset Value parameter in Figure 04 above.

Select Save, Close, & Redraw and the Misc. Starter Part is redrawn with the new offset route added.


Fig. 07 – Offset Route Added to Misc. Starter Part

Return to the Edit Design Data interface. Change the second option of the Parameter 4 column from "0" to "1" for both machine tokens. This change identifies each rectangular polyline section as a "Region," which is pocketed.

Return to the Prompts Tab. Edit the Offset Route prompt's value (the OFFSETPOLYLINE Function). This time, enter "0" for Parameter 6. Enter the z depth used in the vectors of the original PLINE for Parameter 7. Enter a new, deeper depth for Parameter 8.


Fig. 08 – All Parameters Utilized in the OFFSETPOLYLINE Function

Save, Close, & Redraw. Observe the two pockets. The first pocket remains the same depth, equal to the value entered in Parameter 7 above. The pocket offset from the first has a new depth equal to the value of Parameter 8.


Fig. 09 – Nested Pockets

Parameter 6 is used when there is a bulge added to the Polyline. Add a bulge to the original PLINE and create a new prompt named "Offset Bulge Values." Copy the OFFSETPOLYLINE function from the Offset Route prompt, and paste it into the Value cell of the new prompt. Change Parameter 6 to "1" and enter the original PLINE's new bulge values for Parameter 2.

The Bulge Values are still entered inside quotation marks, as this is a text component.

Fig. 10 – Function Arguments for Returning Offset Bulge Values

Back in the CutParts tab, enter the following into Parameter 2 of the Offset PLINE:

=Offset_Bulge_Values

Save, Close, & Redraw. The result should look something like Figure 11.


Fig. 11 – Offset Bulge



    • Related Articles

    • Understanding the Edit Design Data Interface

      The Edit Design Data interface is a spreadsheet editor, similar to Microsoft Excel.  The interface includes tools located at the top of the window. Below the tool icons is a drop-down list of defined names that can be used to locate the cell’s ...
    • Using Formula Editor

      The Formula Editor is a handy tool for reading and writing formulas. To access the Formula Editor, select a cell and press the F2 key. Large Text – Checking the box will make all the text larger. Find and Replace – Launches the find and replace. Name ...
    • Accessing the Edit Design Data Interface

      Accessing the Edit Design Data InterfaceThere are several ways to access the Edit Design Data interface: When drawing products (Draw > Draw Products), you can right-click in the product list, expand the “More” list at the bottom of the menu, and ...
    • Working Within the Subassemblies Tab

      Working Within the Subassemblies Tab The Subassemblies tab is where the subassemblies for the product are located. The majority of library products contain subassemblies. Subassemblies are products within products. Subassemblies can be added manually ...
    • Overview & Tutorials: Face Frame Images 3 (Customizing in the Spreadsheet)

      This is the third article in the series giving an overview of how to configure the custom face frame images in the default Microvellum shipping libraries of build 046.2 and higher. The first articles in the series discussed how to use the default ...
    • Recent Articles

    • Toolbox Release Notes | Build 24.1.1206.641

      The following release notes apply to Toolbox build 24.1.1206.641 MV Server Nesting Fix There was a reported issue occurring when users attempted to remotely process work orders using a nesting station on MV Server. When attempting to process the work ...
    • Microvellum Foundation Library Release Notes | Build 24.1127

      The following release notes apply to Microvellum Foundation Library build 24.1127. Additions Added a new Soffit product to the Upper Cabinet Accessories category. Added the Top Filler (Ceiling Scribe) option to Upper and Tall cabinets. (Corner ...
    • Toolbox Release Notes | Build 24.1.1125.641

      The following release notes apply to Toolbox build 24.1.1125.641. IRIB Setmill Location Fix Fig. 1: Setmill being moved to the start of the route (top) rather than at the center of a straight line, as intended (bottom). There was an issue reportedly ...
    • Toolbox Release Notes | Build 24.1.1105.641

      The following release notes apply to Toolbox build 24.1.1105.641 Nesting Fix Fig. 1: The fatal error that would occur during processing. There was reportedly an issue that occurred when clients attempted to process a work order using the nesting ...
    • Microvellum Foundation Library Release Notes | Build 24.1025

      The following release notes apply to Microvellum Foundation Library build 24.1025. Additions Added new global variable “Remove Stop Dado On Bottom Edge” for wood drawer boxes. Check this option to run the dado through at the bottom of the sub front ...