FeatureCAM Addins

FeatureCAM Version 9 and above comes with the ability customize and enhance the software to your particular requirements.  Some sample addins come with FeatureCAM right out of the box, and you'll find them in Program Files\FeatureCAM\Addins.  But there are additional addins that you can download from this web page.  Some of these addins are simple examples to help you learn how to program FeatureCAM yourself.  Others are useful in their own right.

Please send email to support@featurecam.com with any comments you might have.  If there is a particular educational example that you'd like us to write for you, then let us know.  If you have an addin you'd like to contribute, then send that along as well.

Writing Your Own Addins

You can learn to write your own FeatureCAM applications by consulting the FeatureCAM API help file that comes with V9.3 and later.

Installing Addins

You can install addins using the Addin menu item in the Options menu of FeatureCAM.  Choose the Add-Ins menu item in the Options menu.  This brings up the Add-ins dialog that lists the add-ins available to you.  The add-ins you see in the screen grab below are the ones that are installed with FeatureCAM.  These are the .bas files that are installed in the C:\Program Files\FeatureCAM\ADDINS folder (there may be more of these since this screen grab was taken).  In order to install an addin that you've downloaded from our website, you need to press the folder icon just to the left of the OK button.  The folder icon will allow you to browse your hard drive in order to find the addin that you downloaded.  If you don't remember where you put the file, then download it again paying special attention to where you are putting the file so that you can find it later when you visit the Addins dialog box.

Macro Addins Window

Important Note

Click here to view larger 'Saving Addin' imageNOTE: If you simply click on the following links, then the Basic code may be displayed in your browser instead of downloaded to your hard disk.  What you'd really like is to download the file to your hard disk.  Do this by right clicking on the link and choosing "Save Target As...", as shown in the image at the right.  (Click for larger view).  Once you've got the file on your hard disk, then you can add it as an addin using the Addin menu item in the Options menu of FeatureCAM.

Useful Applications and Utilities


Addin Required FeatureCAM Version
Reverse_Boring.bas is a 2.5D user defined feature (Applications). This will give you the ability to make a back spot face feature, using “user defined features”. This link will take you to a tech tip that explains the use of this API. 

v14.0.1 and above
SavePostwithDoc.bas is a macro that will save the post processor path with the active document. The path to the active post is saved as a document attribute when NC code is generated. The macro will set the active post to this path when this document is opened or switched to from another document. Works with all FeatureCAM document types (Milling, Multiple fixture, Tombstone, Turning, Wire EDM). v14.3.0.21 and above
DisplayMultiTurretNCCodeInHTMLFormat.bas is a macro that allows user to view nc code for multiple turrets in parallel. The nc code for multiple turrets is aligned by sync codes (lower and upper bounds of sync numbers are integer values specified by the user) and displayed In html file.
Remark: the document must be opened and cnc file has to be loaded prior to the macro execution.
v14.2.0.16 and above
Backplotter.bas is a macro that reads in a nc-file and tries to backplot the moves described in it. Add this script to the list of add-ins. Run this basic macro from the view menu. A file open dialog will be presented. Use it to locate and open the nc-file. The script will parse the nc-file and create a number of toolpath edit features. Assign a tool to each of the feature and it is ready to be simulated. Detailed descriptions on using the back-plotter are available here. v13.1.0.46 and above
AddThread.bas This macro lets the user to maintain his/her own list of standard threads. The personal thread database is stored in a csv file (can be opened in excel) in the same directory as the macro resides under the name std_thread_database.csv. When this macro is executed a dialog appears from where the user can choose his standard thread from a list. Threads and Taps can be created using this macro. An example database is included as in the file std_thread_database.csv which can be edited by the user to add or remove entries. The user can add metric thread standards by specifying mm in the dimensions colum of the csv file. IMPORTANT: For metric threads the pitch must be specified and not the TPI. Posted 9/11/06 V13.1.0.46 and Above.
CustomViews.bas  This macro shows how you can manipulate the view using the SetViewVector method.  This macro creates a "Views" toolbar and populates it with buttons.  Requires 9.2.0.06.  Posted 1/10/03 9.2.0.06 and Above
HorizontalViews.bas  This macro set views (left, right, isometric, top, front) as if viewed on a horizontal spindle machine. Creates a toolbar and buttons.  Requires 9.2.0.06.  Posted 10/20/04
Add stock and tool info to NC code.bas -- Automatically adds the stock information and tool list to the beginning of the NC code.  This link will take you to a tech tip that explains the use of this API.  Requires V9.3.0.16.  Posted 1/7/03  9.3.0.16 and Above
Setup notes.bas --  Adds setup notes to NC code. Each setup has its own dialog to enter notes. Each line input into the dialog is inserted as a line in the NC code. NOTE: this macro uses the same technique as the "add tool list" macro, and uses the pseudo reserved word "Setup-Info" in the post. (See "add tool list" macro above for post specifics).  Default comments can be specified or changed by editing the macro. Look for a comment "modify this section for default setup info" for the place to make the change.  Creates "setup notes" toolbar and button. Click button to access setup dialog.          Posted 2/15/05
Volume and cg of solids.bas -- Returns volume and center of gravity for each solid in the .fm document. Requires V9.3.0.16 or greater.  Posted 1/6/03 9.3.0.16 and Above
DrillRetractGougeCheck.bas -- Automatically run through all the operations of a part, using the simulation to figure out which operations need to lift up to the retract plane and which ones can stay down low at the plunge clearance.  Posted 8/22/02. 9.2.0.09 and Above
FindShortestExposedLength.bas -- For every operation, search through the entire tool database looking for the tool with the shortest exposed length that does not cause a tool holder gouge.  Updated 2/06/03. 11.0.0.04 and Above
PostToAgie.bas, AGIE-DIE.CNC & AGIE-ISO.CNC -- Create NC output files (ISO, SBR, SBL) that can be sent directly Agie Wire machines. 9.2.0.04 and Above
FadalMacroTopOfFile.bas -- Uses the Application_PostNCCreate hook to save macros at the top of the file for Fadal style posts (and others).  You need this example post: Fadal with subroutines.cnc Lasted tested with 10.3.0.07
SaveAndSend.bas -- Save the NC code and then send it to HyperTerminal, all in one button click.  Here is a sample HyperTerminal configuration file. 9.3.0.14 and Above
CenterIndexedStock.bas -- Center the stock about the stock axis for purpose of indexing.  Located in the Addins folder of your FeatureCAM installation. 9.0.2.11 and Above
MakeHexagon.bas -- Make lines that form a hexagon around the selected arc or circle.  Located in the Addins folder of your FeatureCAM installation. 9.0.2.11 and Above
MakeStockGeometry.bas -- Make geometry (lines) that coincide with the stock.  Located in the Addins folder of your FeatureCAM installation. 9.0.2.11 and Above
MoveSetupToUL.bas -- Move the setup to the upper left corner of the stock (against the hard jaw).  Located in the Addins folder of your FeatureCAM installation. 9.0.2.11 and Above
NewDocumentLayers.bas -- Automate shop practice by initializing a new document with particular layers.  Located in the Addins folder of your FeatureCAM installation. 9.0.2.11 and Above
SelectHeight.bas -- Select surfaces and faces at a height that matches a selected object.  Located in the Addins folder of your FeatureCAM installation. 9.0.2.11 and Above
WordSheet.bas -- Create a custom operations sheet using Microsoft Word. (Updated 10/26/07) 9.3 and Above
Lathe Tool Details.bas -- Creates a custom tool list for turning setups using Microsoft Word. Details include tool name, tool slot, insert angle, tip radius, setup name, program name, date and part file name.
SetupSheet.bas -- Create a custom operations sheet and custom tool sheet using HTML. 9.3 and Above
lineFromPoint2YWithAngle.bas -- A geometry constructor.  Allow user to create a line from a point to a Y coordinate with an angle. 10.0.3.01 and Above
Cincinnati Probing.bas -- Probing cycles.  Also requires special posts 850probe.cnc, 850SXTProbe.CNC, ac2100Probe.cnc. 10.1.0.06 and Above
Time Sheet.bas -- Track the time spent working on a part.  Created 8/11/2003, posted 10/13/2003. 10.2.1.03 and Above
SetHoleToZRapid.bas -- This macro is intended to be run on a part that has holes that have "combine holes in macro" checked. By default, when you check this, all of the holes retract to the plunge clearance (G99). This macro will set all hole operations to retract to the initial plane (G98 - Z rapid). Creates a toolbar and button when loaded. Button/bar will be removed when macro is unloaded.  Created 5/1/03. 9.3.0.24 and Above
DeleteAllDimensions.bas -- This macro iterates through each model object and if it is a dimension, selects it. After all dimensions are selected, The selected items are deleted. Creates a CAD toolbar if one does not exist and populates it with a DeleteDimensions button. Removes button/deletes bar if empty when macro is unloaded.  Created 10/21/03.  
ConvertSelectedHolesToThreaded.bas -- Convert the selected plain holes to be tapped or threaded features. A dialog box comes up that asks you what you want to do.  Created 12/12/04.  
post crib sim config mat chooser.bas -- This macro gives the user the ability to switch between post options, tool cribs, simulation options, machining configfurations and materials by visiting just one place.  Works with both milling and turning. Updated 5/4/2006.  
LineExtendToAnotherLine.bas -- A geometry constructor.  First you pick two lines.  Then you call this macro.  This macro extends the first line to the intersection of the two lines.  If the lines don't actually intersect, then it extends the first line to the imaginary intersection.  Created 1/27/04. Developed & Tested in 10.4.0.05, but probably works in earlier versions.
LoadConfigForMaterial.bas -- When the material is changed, the macro looks for a matching configuration file. These files must be created by the user for each material. The files are loaded from the FeatureCAM directory structure, typically "C:\Program Files\FeatureCAM\Configurations.  
CopyMyConfiguration.bas -- This macro copies the "My Configuration" configuration to the current document.  
tapped hole recognition by tap drill diameter .bas -- Creates tapped hole features during hole feature recognition if the recognized diameter is a tap drill size. Also sets TPI based on tap drill size. Inch threads only at this time 10.4.0.01 and Above
BlamNCCode.bas -- Ever get tired of clicking Show Centerline and then the NC Code tab just to get the code? This macro runs the show centerline under the covers and displays the code in the NC Results Window with a single click. Note: You'll have to put up your own button and assign the macro to it. (see "How to Run The Examples" in the FeatureCAM API Help) Posted 2/15/2005  
Remove all tool slot overrides in the current crib -- This macro will remove any tool slot assignments for all tools in the current crib. With the introduction of V2005 tool mapping changes a quick method of unsetting all overrides was needed.  This macro satisfies that need.  Creates a toolbar and button when activated 11.2.0.23  May work in earlier versions.

User Defined Features (UDFs)

User Defined Features and User Defined Operations (UDFs and UDOs) may be programmed using FeatureCAM.  They require version 10.  User Defined Features can be found here.

Visual Basic Examples

These examples require Microsoft VB6.

Addin Required FeatureCAM Version
PartMakerExample.zip -- A simple turnkey part maker program.  Make a rectangular plate family-of-parts. 10.0.3.01 and Above
Project1.zip -- A simple DLL addin example.  This project compiles into a DLL.  And then you can add it as an addin into FeatureCAM.  It was written to test V11's new capability to add DLLs as addins. 11.3.0.00 and Above

Educational Examples


Addin Required FeatureCAM Version
ReadNumbersFromTextFile.bas -- An example that shows how to read a comma-separated list of doubles from a text file.
SampleNumbers.txt -- A sample data file for ReadNumbersFromTextFile.bas.
9.0.2.11 and Above
RotateFeatures.bas - An example that illustrates how to program the transform functions.  This example rotates all of the features in the part by 135 degrees. 9.1.0.03 and Above
FS.bas -- A small example that illustrates how to use the MillFeedSpeed hook to compute custom feed/speed values.  In this example the hook queries a Microsoft Access database.  By using the feed-speed hook, you can create any feed-speed calculation that you desire.
FSdrilldata.mdb -- A sample Microsoft Access database for FS.bas.
FSExcel.bas -- A connection string for connecting to Excel instead of Access.
FSdrilldata.xls -- A sample Microsoft Excel spreadsheet for FS.bas and FSExcel.bas
This version has been tested with 10.4.0.01
HoleRecog.bas -- Example event handlers for hole recognition that support colored surfaces.  Located in the Addins folder of your FeatureCAM installation. 9.0.2.11 and Above
RemoveAllToolOverrides.bas -- Remove all of the tool overrides in the current setup. 9.2.0.05 and Above
ProgressBarTest.bas -- Illustrates how to implement a progress bar for your applications that take a long time to run.  Created 8/9/02. 9.2.0.07 and Above
FMWindowDemo.bas -- Control the windows of FeatureCAM. 10.1.0.06 and Above
ProjectPointsToSurface.bas -- Learn how to project points onto a surface using the API. 10.1.0.06 and Above
CurvePtListTest.bas -- Learn how to draw a curve using the API. 10.1.0.06 and Above
TaperedPocketFromCurveAtBottom.bas -- A simple example that lets you create a tapered pocket by specifying the bottom of the pocket instead of the top. 10.1.0.06 and Above
PlaySoundOnGouge.bas -- A fun little example that plays a special sound when a gouge is encountered in the 3D simulation. Download the sound file it's looking for here. (remember the "Save file as" technique). 10.0.3.01 and Above
CurveToGeometryTest.bas -- An example that illustrates how to examine the arcs and lines that make up a curve. 11.2.0.06 and Above
tooledit.bas -- An example that illustrates how to edit tools in the tool database using automation. 11.2.0.06 and Above
tool holder.bas -- An example that illustrates how to determine which tool holder is being used by a particular tool in an operation.  
SetAttributeExample.bas -- An example that illustrates how to get and set attributes in all manner of ways.  
FaceFeatureTest.bas -- An example of how to make face features using the API. 11.2.0.06 and Above
SideTest.bas -- An example of how to make side features using the API.  
WireCutLengthStartPoint.bas -- An example that illustrates how to determine the Cut Length and Start Point for wire EDM operations. 13.0.1.23 and Above

Top