FeatureCAM API Examples
Do you learn by example? Here is a good collection of examples that can
help you get started on programming the FeatureCAM API by using copy and
paste. Make sure that you know how to run
the CDROM examples before you try to use these programming examples.
Simple Introductory Examples
The following examples don't do much, but they illustrate some very basic
concepts that are fundamental to understanding the FeatureCAM API.
- First, make sure you know how to Run
these Examples
- Get Active Document
- Display All Features
and Operations in Active Document
- Display Document Names
- Display Name of
First Selected Model
- Get the Dimensions of the Stock
- Select a Model Object by
Name
- Select Multiple
Model Objects by Name
- Making a Tapped Hole
- Manipulate the Origin
of a UCS
- Override the
Feed Rate of an Operation
- Rotate All
Features in Active Setup
- Remove All Tool Overrides
- Set a P-Word
on an Operation
- Distinguish
Between Different Types of FMModel Objects
Intermediate Examples
These examples are a little bit more advanced. Some of them actually
perform useful tasks.
- Accessing Part Documentation
- Addin That
Makes Toolbar Button That Creates New Document for Indexing
- Allow User to
Show Hidden Entities Using a Dialog Box
- Automatically
Creating Toolbar Buttons for Your User
- Bolt Hole Circle
- Change All 2-Flute Endmills
to 3-Flute Endmills
- Change Radii
of All Circles at Once
- Custom Setup Sheets
- Example
of Application_PostNCCreate Event
- Examples of
Hole Recognition Handlers
- Get the Active Post Processor
- How to Deselect
Everything
- Invalidating
Toolpaths When an Addin is Loaded
- Make Point List Pattern from Curve
- Make Point List Pattern from Points
- Making a Curve using FMCurvePtList
- Progress Bar Example
- Select an Entire Layer
- Set a
P-Word on Each Operation Selected in the Operation List
- User Interface to
SCL Code
- Using TypeName to Distinguish between Objects
- Using User Attributes on an FMDocument
- Working with Colors
Advanced Examples
- Load Configuration
Depending Upon Material
- Telling
the Difference Between FM, MF and TSF Documents
- Using
RegExp and Application_PostNCCreate Together
- Using
the MSComm Control to Send NC Code to a Control
Examples of User Defined Features
Please visit the FeatureCAM website at http://featurecam.com/udf
for many examples of User Defined Features.
Specific Examples
- MFGDocument.SaveNC
- FMFeature.Attribute
- FMFeature.SetUserAttribute
General-Purpose Basic Language Examples (not Specific to FeatureCAM)
These are examples that illustrate certain capabilities that you might
require, but that really don't have anything to do with the FeatureCAM
API. For example, you might need to know how to create and delete folders
on the hard drive. This type of operation doesn't have anything to do with
the FeatureCAM API, but is instead a part of the Basic programming system in
general. All of the topics below fit into this category.
- Basic File
and Folder Examples
- Enhance
Message Boxes with Additional Buttons and Icons
- Example
of Using the Regular Expression (RegExp) Object
- File
Access with Microsoft Scripting Runtime
- Microsoft
Excel: Reading Named Ranges from Microsoft Excel
- Microsoft
Outlook: Send Email with an Attachment
- Open a Word Document
- Playing a wav File
- Running External
Programs
- Read Numbers
from Text File
- Use the
InputBox Function to Work with User Input
- Uses Example
- Using Microsoft Scripting Runtime to Process All Files in a Folder
- Using SaxBasic
Modules
Internet Explorer Examples
- General
Information on Programming the Internet Explorer Browser
- Load a
Page in Internet Explorer
- Printing
a Page in Internet Explorer
Return to FeatureCAM Index