ADVANCED POSTING WITH CUSTOM FILES


Introduction

In addition to the ability to customize post processors, you can also create custom files to define a custom user interface. This custom user interface, the Advanced Posting page, is displayed in the CAM Wizards or the Current Settings dialog box. The Advanced Posting pages allow you to provide various program input, for example a check box to set a post variable, which is then output using the API scripting functions provided by BobCAD-CAM. This process can be handled using any text editor program to create the custom file and modify the post processor to handle the information from the Advanced Posting pages using VBScript.

 

Creating Custom Files

The file that you create to define the Advanced Posting page is a text file that must be named with the appropriate .Custom extension. This file is referred to as the custom file.

To create custom files:

      1. The first step is to confirm what post processor is used, for example, BC_3x_Mill.MillPst.  The name of the post processor must be used when you create the custom file.
      2.  The custom file must use the appropriate extension based on the operation type to which you are adding the parameters.   For example, to add an Advanced Posting page to a drill hole operation, you use the .CustomDrill extension.
      3.  In summary, to create an Advanced Posting page for drill hole operations using the BC_3x_Mill post processor, the complete custom file name is: BC_3x_Mill.CustomDrill
      4.  Write the code inside the custom file, using the syntax that is explained later in this topic, to define the custom options (or fields) that you want to use.
      5.  Place the custom file in the same folder as the post that you are modifying.   

The custom files that you create must be stored in the BobCAD-CAM Data\Posts\... folder with the post processor file that is being used. The default location is: C:\BobCAD-CAM Data\*(Current Version)*\Posts\Mill. Notice that this is the Mill Post folder, as is needed for this example. For Lathe, you use the Lathe Post folder.

      1. The next time that you create or edit a feature with the operation type for which you created the custom file, the Advanced Posting page is available in the wizard.

 Click the Advanced Posting tree item. The options that you added are now available for use.

      1.  The post processor itself must also be modified to define how the information from the custom page options/fields are handled and output in the posted NC program (G-Code). View the links to the Scripting Function Reference at the end of this topic.

 

 Example Summary

Create a .Custom file using the name of the post processor and the operation type. The post processor defines the name of the file, and the operation type (or dialog box) defines the extension of the custom file used as follows. The custom file must be stored in the posts folder with the post processor.

 Post Processor Name

Custom File Extension (Based on Operation Type)

BC_3x_Mill.MillPst

.CustomDrill

Complete Custom File Name

BC_3x_Mill.CustomDrill

 

Custom File Extensions for Advanced Posting

The following lists all of the custom extensions that are used to create custom pages. There is a unique custom extension for the Current Settings dialog box, one for each specific operation in the system, and a few shared extensions are listed at the end. The shared custom file displays the Advanced Posting page for all milling operations based on two groups: Mill Hole Drilling, and all other Mill operations (2-Axis, 3-Axis, 4-Axis, and Multiaxis). There all also shared custom files for lathe operations based on the groups: Lathe Hole Drilling, and Turning (for all non-hole drilling operations). The shared custom files were added as of V26.

 NOTE:  You can use the shared custom files at the same time as operation specific custom files, but only one Advanced Posting page can be displayed for any one operation. This means that an operation specific custom file overrides the shared custom file for that operation.

 

Custom File Extension

Description

The Current Settings Dialog Box

.CustomSettings

Current Settings

Shared Mill Operations

.CustomDrillCycles

All Mill Hole Drilling Operations

.CustomMilling

All non-hole Milling operations (2 Axis-through-Multiaxis)

Mill Hole Drilling Operations

.CustomCenterDrill

Center Drill

.CustomDrill

Hole

.CustomCounterbore

Counterbore Hole

.CustomProfile

Counterbore Mill

.CustomBoring

Boring

.CustomReam

Ream

.CustomTap

Tap, Rolled Tap, Counterbore Tap, Counterbore Rolled Tap

.CustomChamferDrill

Chamfer Drill

.CustomChamferMill

Chamfer Mill

Mill 2 Axis Operations

.CustomPocket

Pocket

.Custom2XPlungeRough

2D Plunge Rough

.CustomChamferMill

Chamfer Mill

.CustomProfile

Profile

.Custom2XEngraving

2 Axis Engrave

.CustomFaceMill

Facing

.CustomThreadMill

Threading

Mill 3 Axis Operations

.CustomPlanar

Planar

.CustomAdvPlanar

Advanced Planar

.Custom3XPlungeRough

3D Plunge Rough

.CustomRadial

Radial

.CustomSpiral

Spiral

.CustomTaperedPocket

Tapered Pocket

.CustomVCarve

V Carve

.Custom3XEngrave

3 Axis Engrave

.CustomZLevelFinish

Z Level Finish

.CustomAdvZLevelFinish

Advanced Z Level Finish

.CustomZLevelRough

Z Level Rough

.CustomAdvRough

Advanced Rough

.CustomEquidistant

Equidistant Offset

.CustomFlatlands

Flatland

.CustomProjectCurves

Project Curves

.CustomPencil

Pencil

Mill 4 Axis Rotary Operation

.Custom4XRotary

4 Axis Rotary

Mill Multiaxis Operations

.CustomMultiaxis

Multiaxis Toolpaths

Shared Lathe Operations

.CustomLatheDrillCycles

All Lathe Hole Drilling Operations

.CustomTurning

All non-hole Lathe Operations

Lathe Operations

.CustomLatheCenterDrill

Lathe Center Drill

.CustomLatheDrill

Lathe Drill

.CustomLatheChamfer

Lathe Chamfer

.CustomLatheBore

Lathe Bore

.CustomLatheReam

Lathe Ream

.CustomLatheTap

Lathe Tap, Lathe Rolling Tap

.CustomCutoff

Cutoff

.CustomRough

Rough

.CustomPatternRepeat

Pattern Repeat

.CustomFinish

Basic Finish

.CustomGroove

Groove

.CustomGrooveFinish

Groove Finish

.CustomThread

Thread

.CustomStockFeed

Stock Feed

Wire EDM Operations

.Custom2Axis

All 2 Axis Feature Operations

.Custom4Axis

All 4 Axis Feature Operations

 

About the Shared Custom Files

The shared files are used to add an Advanced Posting page to all operations in the group of operations defined by the custom file. The shared versions are only shown if there is not already an operation specific custom file for any of the included operations. For example, you can define a shared .CustomDrillCycles custom file for all Mill Hole Drilling operations. If you then define a .CustomDrill custom file, the shared file is used for all drill operations except the Drill operation. The Drill operation uses only the .CustomDrill file. So, in summary, only one Advanced Posting page can be displayed for any one operation.

 

Custom Files Hierarchy

As of version 26, the system checks for the name of custom files in the following order:

1      Check for specific V26 (and later) custom file name.

2      Check for specific V25 (and earlier) custom file name.

3      Check for (V26) shared custom file name.

 Older Custom File Naming

To view a comparison of the custom file extensions that changed from V25 to V26, view the Advanced Posting Map for Legacy Versions.

 

Creating Options (or Fields) for Advanced Posting

When you create a custom file, you define what options you want to display in the user interface in the custom file. All of the possible options or fields that are available to the custom posting pages are listed next.

There are 9 possible check boxes that can be displayed. There are also 25 edit boxes and 25 combo boxes that are arranged in an overlapping layout. There is one edit box on top of each combo box. For this reason, you can only use one field for each number (COMBO_BOX or EDIT_BOX) 1-through-25. The last 5 edit boxes and combo boxes are wider (COMBO_BOX and EDIT_BOX 21-through-25) than the first 20.

 

Field Declarations Examples

CHECK_BOX,1,Output Value

DEFAULT_CHECK,1,1

 

EDIT_BOX,1,REAL

TEXT_LABEL,1,Part Height

DEFAULT_REAL,1,25.4

 

COMBO_BOX,2,Choice 1,Choice 2,Choice 3,Choice 4,Choice 5

TEXT_LABEL,2,Pick One

DEFAULT_COMBO_INDEX,2,3

 

EDIT_BOX,3,INTEGER

TEXT_LABEL,3,Integer Value

DEFAULT_INTEGER,3,222

 

EDIT_BOX,4,STRING

TEXT_LABEL,4,String Value

DEFAULT_STRING,4,TESTING

 

Descriptions of Field Declarations

CHECK_BOX,1,Output Value

Activate check box #1, and use Output Value as the label.

 DEFAULT_CHECK,1,1

Set the default value for check box #1 to checked (0 = cleared, 1 = checked).

EDIT_BOX,1,REAL

Activate edit box #1, and set the edit data type to a real number.

TEXT_LABEL,1,Part Height

Set the text label for edit box #1 to Part Height.

DEFAULT_REAL,1,25.4

Set the default value for edit box #1 to 25.4.

COMBO_BOX,2,Choice 1,Choice 2,Choice 3,Choice 4,Choice 5

Activate combo box #2 and define 5 selection choices (Choice 1, Choice 2, Choice 3, Choice 4, Choice 5).

TEXT_LABEL,2,Pick One

Set the text label for combo box #2 to Pick One.

DEFAULT_COMBO_INDEX,2,3

Set the default selection for combo box #2 to index #3 (0 based index, so this is the 4th item).

EDIT_BOX,3,INTEGER

Activate edit box #3, and set the value data type to Integer.

TEXT_LABEL,3,Integer Value

Set the text label for edit box #3 to Integer Value.

DEFAULT_INTEGER,3,222

Set the default integer value for edit box #3 to 222.

EDIT_BOX,4,STRING

Activate edit box #4, and set the data type to String.

TEXT_LABEL,4,String Value

Set the text label for edit box #4 to String Value.

DEFAULT_STRING,4,TESTING

Set the default string value for edit box #4 to TESTING.