0% found this document useful (0 votes)
13 views375 pages

Alphacam API Reference - Objects

The document provides an overview of objects in Alphacam, detailing how to access and utilize various objects and their properties through VBA and other programming languages. It describes the main application object and its associated methods for creating and managing machining data, tools, and drawings. Additionally, it lists various objects available in Alphacam, such as Drawing, MillData, and Tool objects, along with their functionalities.

Uploaded by

Eyad Ahmad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views375 pages

Alphacam API Reference - Objects

The document provides an overview of objects in Alphacam, detailing how to access and utilize various objects and their properties through VBA and other programming languages. It describes the main application object and its associated methods for creating and managing machining data, tools, and drawings. Additionally, it lists various objects available in Alphacam, such as Drawing, MillData, and Tool objects, along with their functionalities.

Uploaded by

Eyad Ahmad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Objects - Objects Page 1 of 375

Objects
Objects have methods and properties. For help in accessing them see methods and properties.

To access an object you need an object variable. Usually you start with the Application object. In VBA
inside Alphacam, the Application object is always available as App.

In a program run outside Alphacam eg using Visual Basic or VBA inside Word or Excel etc first set a
reference to the Type Library for the required Alphacam Module (eg Alphacam Mill), using the Tools |
References command in the VBA or VB IDE. Then the Application object is found using:

Dim acam As [Link]

Set acam = CreateObject("[Link]")

This will run [Link] in Ultimate level mode. Replace am5axaps with the name of the Alphacam
object name that is required. (If it supports Automation).

The Alphacam Mill Type Library should be used for any Mill module e.g. Essential, Standard,
Advanced, Ultimate. If an API method is not available in a module (e.g. Involute in Essential) a
trappable run-time error will occur. See error-handling.

(This is not a path name, do not put directory names in this statement. Windows will find the exe using
the Registry.)

If the Alphacam module is already running this will attach to it, it will not startup the module again.

This line is the main difference between a VBA macro inside Alphacam and a Visual Basic program
outside Alphacam. Once you have got the Application object you can access other objects. For example:

Dim drw As Drawing

Set drw = [Link]

will get a Drawing object. (Note: when using the Alphacam API from an external program it may be
necessary to put the library name in front of the object name. For example, Excel also has a Drawing
object, so in VBA in Excel you must use:

Dim drw As [Link]

[Link] 2026-03-29
Objects - Objects Page 2 of 375

Dim mc As MillData

Set mc = [Link]

will get a MillData object.

In Delphi, import the Type Library using Project | Import Type Library.

In a Delphi EXE the Application object is found using:

var

disp: IDispatch;

acam: IAlphaCamApp;

begin

disp := CreateOleObject ('[Link]');

acam := disp as IAlphaCamApp;

In a Delphi DLL it is passed as the first parameter to the routine called from Alphacam, eg

function InitAlphacamAddIn(vAcam:Variant; ver:Integer) : Integer; stdcall;


var
acam: IAlphaCamApp;
begin
acam := IDispatch(vAcam) as IAlphaCamApp;

See the Delphi samples.

For C++ use #import, see the C++ samples.

Alphacam objects are as follows:

Application The top-level object, contains methods to open Alphacam and CAD files, and create tools
and machining data.

Drawing The drawing (or document) - contains the geometries and tool paths.

[Link] 2026-03-29
Objects - Objects Page 3 of 375

DrawingOptions Options for display eg show tools.

MillTool A Mill Tool.

LatheTool A Lathe Tool.

MillData Machining data for a Mill operation, eg Z levels, feeds and speeds.

MillDataMachiningEngine Machining data for 3D roughing of solid or surface models using the Planit
Machining Engine

WireData Machining data for a Wire operation, eg Z levels, feeds and technology

TurnData Machining data for a Turning operation, eg stock, feeds and technology

LaserData Machining data for a Laser or Flame operation, eg stock, feeds and technology

Path A single geometry or tool path - contains a list of line and arc elements.

Paths A Collection of Path objects.

Element A line or arc in a Path.

Layer A User or Alphacam layer.

WorkPlane A work plane.

PolyLine A 3D polyline.

Geo2D An object used to create a 2D Geometry using individual lines and arcs.

FastGeometry An object used to create a 2D Geometry using Alphacam Fast Geometry.

CadInputSettings Settings for CAD input.

CircleProperties An object used to extract circle information from a geometry.

Frame The main frame, used to add menu items, read the text file, show a progress box etc.

GeoCad An object used to add 3D geometry consisting of 3D lines and arcs in any plane, trying to join
them into paths in work planes..

NestData An object used to do nesting.

Material A material eg from eg [Link]

Spline A spline curve.

Splines A Collection of Spline objects.

[Link] 2026-03-29
Objects - Objects Page 4 of 375

Surface A surface.

Surfaces A Collection of Surface objects

TrimBoundary A trim boundary for a surface.

TrimBoundarys A Collection of TrimBoundary objects.

MillManualToolPath An object used to create a manual tool path in Mill.

TurnManualToolPath An object used to create a manual turning tool path in Lathe.

Operation An operation.

Operations A Collection of Operation objects.

SubOperation A sub-operation, within an Operation.

SubOperations A Collection of SubOperation objects.

RectangleProperties An object used to extract rectangle information from a geometry.

Dimension An object used to add dimensions to the drawing.

TurnProgrammingPoint A programming point on a multi-programming point Turning Tool

TurnProgrammingPoints A Collection of TurnProgrammingPoint objects

Text A text object, contains a Collection of TextLine objects

Texts A Collection of Text objects

TextLine A single line of text

TextLines A Collection of TextLine objects

MachiningDefaults Default values for some machining settings

ThreadDefinition An object representing a defined thread

TurnThreadData An object used to define the properties for a Thread operation

LeadData An object used to set lead-in/out for a machining style

MillStyle A machining style

MillStyles A Collection of MillStyles

MillSubStyle A single operation in a MillStyle

[Link] 2026-03-29
Objects - Objects Page 5 of 375

MillSubStyles A Collection of MillSubStyles

VersionInformation An object used for storing the version information for the Alphacam EXE or DLLs

Object Model

[Link] 2026-03-29
Objects - Objects Page 6 of 375

[Link] 2026-03-29
Objects - Objects Page 7 of 375

AlphacamObjects Object
A Collection of Alphacam objects. This collection can contain a mix of Paths, SolidParts, STLs,
Surfaces, Splines, Text.

More:

AlphacamObjects Properties

AlphacamObjects Properties

Count - (long) Number of items in the collection (read-only)

[Link]

Add an AlphacamObject to the Collection.

Syntax

[Link](Object)

Object Object AlphacamObject to add

[Link]

Remove an AlphacamObject from the Collection. The object is not deleted.

Syntax

[Link](Object)

Object Object AlphacamObject to remove

Application Object
The top-level object, contains methods to open Alphacam and CAD files, and create tools and
machining data

More:

Application Properties

Application Properties

ActiveDrawing - (Drawing) Drawing object - the active drawing or document. (Alphacam currently only
has one drawing at a time) (read-only)

AlphacamVersion - (VersionInformation) Version of the Alphacam exe

[Link] 2026-03-29
Objects - Objects Page 8 of 375

ApiVersion - (Long) API Date Code (eg 20030423)

CadInputSettings - (CadInputSettings) CadInputSettings Object to set CAD Input settings(read-only)

ChangeNumber - (Long) The number of changes made to the drawing, NOT including changes to the
display eg Zoom. (read-only)

CommandNumber - (Long) The number of commands used. (read-only)

DisableUndo - (Bool) True to disable undo.

FileVersion - (VersionInformation) Version of specified file.

Example

Dim VerInfo As VersionInformation

Set VerInfo = [Link]("[Link]")

Because no path is specified this will get the information for the version of [Link] which is loaded
by Alphacam.

A path can be specified if you want to get information about a DLL that is not loaded by Alphacam.

Frame - (Frame) Frame object. (read-only)

FullName - (String) The full file name of the application (read-only)

InAParametricMacro - (boolean) True if currently running a Parametric Macro (not a VBA macro)
(read-only)

IsAlphaCad - True if this is the AlphaCAD module

IsAlphaNest - True if this is the AlphaNest module

LicomdatPath - (String) Location of default Licomdat eg "C:\"; (read-only)

LicomdirPath - (String) Location of default Licomdir eg "C:\" (read-only)

MachiningDefaults - (MachiningDefaults) Object to get or set Machining Defaults (read-only)

MaxNumberOfUndos - (Long) Maximum number of undos allowed

MillMachiningStyles - Collection of Machining Styles

Name - (String) The title of the application (read-only)

Online - (boolean) True if this is Alphacam Online (read-only)

Path - (String) The path of the application (eg "C:\Program Files\Alpha03") (read-only)

[Link] 2026-03-29
Objects - Objects Page 9 of 375

PostFileName - (String)The full name of the post (read-only)

PreviewFlag - (Bool) True if Previews are shown and saved with Alphacam drawings

ProgramLetter - (Integer) ASCII value of module letter, eg 77 = 'M' = Mill (read-only)

ProgramLevel - (AcamLevel) Level of Alphacam program (read-only)

SpecialKey - (Long) Non-zero if the security key/license is a special key/license, bit values are 1 =
Dealer, 2 = Education (Classroom), (4 = down count, removed in V7.5), 8 = ONEPOST, 16 = Student
(Homework) (read-only)

TempDrawings - (Drawings) Collection of all open temporary drawings

Visible - (boolean) True if Alphacam should be visible on the screen, False to hide Alphacam

WindowState - (AcamWindowState) State of main Alphacam window, acamWindowStateNormal,


acamWindowStateMaximize or acamWindowStateMinimize

[Link]

Check authorisation for an extra-cost option.

Syntax

[Link]

[Return] Boolean True if OK, False to terminate macro.

[Link]

Check authorisation for an extra-cost option which displays a modeless dialog box (The Authorise
method will fail in that case) .

Syntax

[Link] (FileName)

String FileName Full path name of add-in

[Return] Boolean True if OK, False to terminate macro.

[Link]

Close an Alphacam geometry macro, opened by OpenGeometryMacro

Syntax

[Link]

[Link] 2026-03-29
Objects - Objects Page 10 of 375

[Link] (Profiling only)

Create object representing Laser/Flame machining data. The properties of the object (eg BeamWidth)
may then be set before calling a method eg CutPath.

Syntax

[Link]

[Return] LaserData LaserData object

[Link]

Create object representing Lead-In/Out data for use with a Machining Style or MillData.

Syntax

[Link]

[Return] LeadData object.

[Link] (Mill, Router, Stone, Lathe only)

Create object representing Mill machining data. The properties of the object (eg SafeRapidLevel) may
then be set before calling a method eg RoughFinish.

Syntax

[Link]

[Return] MillData MillData object

[Link]

Create object representing a Machining Style.

Syntax

[Link]

[Return] MillStyle object representing the style.

The example creates a style with a Rough/Finish operation.

[Link] 2026-03-29
Objects - Objects Page 11 of 375

Public Sub CreateFinishPathStyle()

' Setup the machining data

Dim MD As MillData

Set MD = [Link]

[Link] = acamCornersSTRAIGHT

[Link] = 20

[Link] = 1

[Link] = -10

[Link] = 123

[Link] = 456

[Link] = 789

MD.ProcessType2 = acamProcessROUGH_FINISH

Dim MT As MillTool

Set MT = [Link]([Link] + "licomdat\[Link]\Flat - [Link]")

Dim LD As LeadData

Set LD = [Link]

[Link] = acamLeadLINE

[Link] = acamLeadARC

[Link] = 10

[Link] = 5

[Link] = 10

[Link] = 90

[Link] 2026-03-29
Objects - Objects Page 12 of 375

Dim S As MillStyle

Set S = [Link]

[Link] MD, MT, LD

[Link] [Link] + "licomdir\styles\[Link]"

End Sub

[Link]

Create a temporary drawing, which will not be displayed.

Syntax

[Link]

Remarks

This can be used to create a drawing that is not to be displayed, for example to be used as a work area.

[Link] (Lathe only)

Create object representing the definition of a thread. The properties of the object may then be set before
calling SaveAs to save it to disk.

Syntax

[Link]

[Return] ThreadDefinition ThreadDefinition object

[Link]

Create object representing a Mill tool. The properties of the object (eg Diameter) may then be set before
calling a method eg Select or SaveAs.

Syntax

[Link]

[Return] MillTool MillTool object

[Link] (Wire only)

Create object representing Wire machining data. The properties of the object (eg ProgrammingZ) may
then be set before calling a method eg Cut2AxisShape.

[Link] 2026-03-29
Objects - Objects Page 13 of 375

Syntax

[Link]

[Return] WireData WireData object

[Link]

Enable or disable an add-in given its full file name.

Syntax

[Link] (FileName, Enable)

String Name Full path name of Alphacam add-in

Bool True to enable, False to disable

[Link]

Show the Windows File Open/Save dialog box, to ask the user for a file name for an Alphacam file in
the default directory for that type of file.

Syntax

[Link](Title, Type, Action, FullName, FileName)

String Title Title for the dialog box

AcamFileType Type one of: acamFileTypeDRAWING, acamFileTypeFONT,

acamFileTypeNC, acamFileTypePOST, acamFileTypeTOOL

AcamFileAction Action acamFileActionOPEN or acamFileActionSAVE

[Return] String FullName Returned full path name of the selected file

[Return] String FileName Returned file name only

[Return] Boolean False if user cancelled

[Link]

Return an object representing the currently selected tool. Return value will be Nothing if there is no
tool.

[Link] 2026-03-29
Objects - Objects Page 14 of 375

[Link]

Return an object representing the currently selected tool in the specfied Turret/Station (Lathe only).
Return value will be Nothing if there is no tool.

Syntax

[Link] (Turret, Station)

AcamLatheTurret Turret acamTurretABOVE_CL or acamTurretBELOW_CL

AcamLatheStation Station acamStationFRONT or acamStationBACK

[Return] MillTool MillTool object for tool.

[Link]

Get the number of Attributes used in the current post, defined in $3000.

Syntax

[Link]

[Return] Long Returned Value

[Link]

Get the name of an Attribute used in the current post, defined in $3000.

Syntax

[Link] (Index)

Long Index Number of attribute to get, 1 to GetPostAttributeCount

[Return] String Returned Name

The example shows how to display the attributes:

Public Sub ShowPostAttributes()

Dim N As Long
N = [Link]
MsgBox N
Dim I As Long
For I = 1 To N
MsgBox [Link](I) & ", " & _

[Link](I)

[Link] 2026-03-29
Objects - Objects Page 15 of 375

Next I

End Sub

[Link]

Get the PAT() number of an Attribute used in the current post, defined in $3000.

Syntax

[Link] (Index)

Long Index Number of attribute to get, 1 to GetPostAttributeCount

[Return] Long Returned Value

[Link]

Get a Post User Variable.

Syntax

[Link] (Name)

String Name Name of user variable (defined in $1000 in current post)

[Return] String Value Returned Value

[Link]

Input Nc file.

Syntax

[Link] (Name, Clear, AsToolpaths, LineByLine, UseM06)

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

boolean AsToolpaths True to input as tool paths, False for geometries

boolean LineByLine True to pause after each line

boolean UseM06 True to use M06 for tool change, False to use T

[Link]

Load an add-in given full file name including path and extension.

[Link] 2026-03-29
Objects - Objects Page 16 of 375

Syntax

[Link] (FileName)

String Name Full path name of Alphacam add-in to open

[Link]

New drawing - clear all memory.

[Link]

Open Anvil file.

Syntax

[Link] (Name, Clear)

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

Remarks

See CadInputSettings.

[Link]

Open CADL file.

Syntax

[Link] (Name, Clear)

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

Remarks

See CadInputSettings.

[Link]

Open Alphacam drawing file.

Syntax

[Link] 2026-03-29
Objects - Objects Page 17 of 375

[Link] (Name)

String Name Full path name of Alphacam drawing file to open

[Return] Drawing Drawing object representing the drawing.

[Link]

Open DXF or DWG file.

Syntax

[Link] (Name, Clear)

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

Remarks

If the extension is DWG it will be read as an AutoCAD DWG file, otherwise it will be read as an ASCII
DXF file.

See CadInputSettings.

[Link]

Open a file using an import function in an Add-In.

Syntax

[Link] (Name, Type, Clear)

String Name Full path name of file to open

String Type String giving type of file, may be empty ("")

Boolean Clear True to clear memory before reading file

Remarks

For example, if the "Parasolid Input" Add-In is loaded (Utils | Add-Ins | Parasolid Input), the following
line will read a Parasolid file:

[Link] "C:\Cadfiles\Part.x_t", "Parasolid", True

If the Type is empty the extension will be used to determine the import function to use. If the Type is not
empty it will be used to find the import function, so any extension can be used.

[Link] 2026-03-29
Objects - Objects Page 18 of 375

See [Link]

[Link]

Open an Alphacam geometry macro, created in the Macro Recorder

Syntax

[Link] (Name)

String Name Full path name of file to open

[Link]

Open IGES file.

Syntax

[Link] (Name, Clear, TransType)

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

long TransType Translator to use, see remarks

Remarks

TransType is one of the following to choose the translator option:

acamIgesSTD (= 0) Standard

acamIgesADV (= 1) Advanced with no validate

acamIgesVAL (= 2) Advanced with validate

acamIgesASK (= -1) Show dialog box

See CadInputSettings.

[Link]

Open STEP file, as surfaces. See OpenStepFileEx.

Syntax

[Link] (Name, Clear)

[Link] 2026-03-29
Objects - Objects Page 19 of 375

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

[Link]

Open STEP file, as OpenStepFile but with translator option.

Syntax

[Link] (Name, Clear, TransType)

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

typeAcamStepTranslator TransType Translator to use, see remarks

Remarks

TransType is one of the following to choose the translator option:

acamStepSURFACES (= 0) Surfaces

acamStepSOLID (= 1) Solid Model

acamStepASK (= -1) Show dialog box

[Link]

Open STL file.

Syntax

[Link] (Name, Clear)

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

[Link]

Open Alphacam drawing file into a temporary drawing, which will not be displayed.

Syntax

[Link] (Name)

String Name Full path name of Alphacam drawing file to open

[Link] 2026-03-29
Objects - Objects Page 20 of 375

[Return] Drawing Drawing object representing the drawing.

Remarks

This can be used to open a drawing that is not to be displayed, and to copy geometries or tool paths to
the main drawing.

The example opens a drawing and copies circles from it to the main drawing.

Public Sub TestOpenTempDrawing()

Dim Drw1 As Drawing


Dim Drw2 As Drawing

Set Drw1 = [Link]

Set Drw2 = [Link]([Link] & "licomdir\tutorial\Mill Simple Shape + tool


[Link]")

Dim P As Path, P2 As Path


For Each P In [Link]
Dim CP As CircleProperties
Set CP = [Link]
If Not (CP Is Nothing) Then
' Copy circle to main drawing
Set P2 = [Link]
[Link]
End If
Next P
[Link]

End Sub

[Link]

Open DXF or DWG file into a temporary drawing, which will not be displayed.

Syntax

[Link] (Name)

String Name Full path name of file to open

[Return] Drawing Drawing object representing the drawing.

Remarks

This can be used to open a drawing that is not to be displayed, and to copy geometries to the main
drawing.

[Link] 2026-03-29
Objects - Objects Page 21 of 375

The example opens a drawing and copies circles from it to the main drawing.

Public Sub TestOpenTempDxf()

Dim Drw1 As Drawing


Dim Drw2 As Drawing

Set Drw1 = [Link]

Set Drw2 = [Link]("G:\cadfiles\[Link]")

Dim P As Path, P2 As Path


For Each P In [Link]
Dim CP As CircleProperties
Set CP = [Link]
If Not (CP Is Nothing) Then
' Copy circle to main drawing
Set P2 = [Link]
[Link]
End If
Next P
[Link]

End Sub

[Link]

Open a Mill tool, eg to edit or examine its properties. This method will not select the tool to use it for
machining - use either [Link] or [Link].

Syntax

[Link] (Name)

String Name Full path name of tool file to open

[Return] MillTool MillTool object

Example

Set tool = [Link](fn)

If Not (tool Is Nothing) Then

If [Link] = dia Then

[Link]

End If

[Link] 2026-03-29
Objects - Objects Page 22 of 375

End If

[Link]

Open VBA post for editing and as the current post.

Syntax

[Link] (Name)

String Name Full path name of Alphacam VBA post

[Link]

Open VBA project for editing.

Syntax

[Link] (Name)

String Name Full path name of Alphacam VBA project

[Link]

Open VDA file.

Syntax

[Link] (Name, Clear)

String Name Full path name of file to open

boolean Clear True to clear memory before reading file

[Link]

Exits the Application.

[Link]

Run a VBA Macro.

Syntax

[Link] (MacroName, [Parm1], [Parm2], [Parm3], [Parm4], [Parm5], [Parm6], [Parm7], [Parm8])

[Link] 2026-03-29
Objects - Objects Page 23 of 375

String MacroName The name of the macro, [Link]

Variant Parm1 - Parm8 Optional parameters

[Return] Variant Return value from macro.

Remarks

This is particularly useful to run a VBA macro from an external program, because a VBA macro will
run much more quickly than an external program if it makes a lot of Alphacam method or property calls.

The macro must be in a VBA project that is currently loaded.

[Link]

Run an Alphacam geometry macro, opened by OpenGeometryMacro

Syntax

[Link]

[Link]

Run an Alphacam Parametric Macro. (Not a VBA Macro.)

Syntax

[Link] (MacroName)

String MacroName The full path name of the macro

[Link]

Select a Post processor, given file name.

Syntax

[Link] (Name)

String Name Full path name of post file to open

[Link]

Use a module in the current VBA project as the post processor. This does not apply to DLL posts. See
the C++ example on the CD for an alternative method.

Syntax

[Link] 2026-03-29
Objects - Objects Page 24 of 375

[Link] (Name)

String Name Name of code module in the VBA project

Example

A VBA project might contain two modules, called Post1 and Post2. These would contain the same
routines as the Post module in a VBA Post. The following routines in the Events module of the same
project would create commands to switch between the two post modules.

Function InitAlphacamAddIn(AcamVersion As Long) As Integer

Dim Frm As Frame

Set Frm = [Link]

Frm.AddMenuItem2 "Select Post1", "CmdPost1", acamMenuFILE, ""

Frm.AddMenuItem2 "Select Post2", "CmdPost2", acamMenuFILE, ""

End Function

Public Sub CmdPost1()

[Link] "Post1"

End Sub

Public Sub CmdPost2()

[Link] "Post2"

End Sub

[Link]

Select a Mill tool to use for machining, given file name (or let user select it).

New for AlphaV7.5: An empty string ("") can be used to de-select the tool, so there is no current tool.

Syntax

[Link] (Name)

[Link] 2026-03-29
Objects - Objects Page 25 of 375

String Name Full path name of tool file to open, "$USER" to let user select it from normal dialog box

[Return] MillTool MillTool object for selected tool.

Example

The example will select a tool from the Alphacam tool library, [Link] gives the location of
the default licomdat. Note: space underline space at the end of the line means the next line is a
continuation of the current line. & adds two strings together.

[Link] [Link] & _

"licomdat\[Link]\T32, 10 mm dia [Link]"

[Link] (Lathe only)

Select a Mill or Lathe tool to use for machining, given file name (or let user select it).

This method is the same as SelectTool, but, in the Lathe module, allows the turret to be specified.

NOTE: An empty string ("") can be used to de-select the tool, so there is no current tool.

Syntax

[Link] (Name, Turret, Station)

String Name Full path name of tool file to open, "$USER" to let user select it from normal dialog box

AcamLatheTurret Turret acamTurretABOVE_CL or acamTurretBELOW_CL

AcamLatheStation Station acamStationFRONT or acamStationBACK

[Return] MillTool MillTool object for selected tool.

[Link]

Set variable in macro opened by OpenGeometryMacro.

Syntax

[Link] (Name, Value)

String Name name of variable

Variant Value value for variable

[Link]

[Link] 2026-03-29
Objects - Objects Page 26 of 375

Set a Post User Variable.

Syntax

[Link] (Name, Value)

String Name Name of user variable (defined in $1000 in current post)

String Value Value to set, in Basic can be string or number

Example

[Link] "DXFNAME", filename

[Link] "PROGNUM", 123

[Link]

Set which processor should be used, eg SetProcessAffinityMask(1) to use just the first one.

Syntax

[Link] (ProcessAffinityMask)

long ProcessAffinityMask The affinity mask for the threads of the process

Remarks

Some legacy programs have problems running on multi-core machines when communicating with
Alphacam using COM. Restricting Alphacam to run on only the first cpu can help.

(Only use this call if you know what you are doing, and have read the Microsoft documentation on this
function!)

[Link]

Set the text that will appear in the confirmation message box when the Undo command is used.

Syntax

[Link] (Name)

String Name Command Name

Remarks

See the example for SetUndoPoint.

[Link] 2026-03-29
Objects - Objects Page 27 of 375

[Link]

Set an "Undo Point". Commands in the macro following this one (up to the next call of SetUndoPoint)
will be undone if the Undo command is used. If SetUndoPoint is not used the whole macro will be
undone if Undo is used.

Syntax

[Link]

In the example, if the Undo command is used after the macro is run, only the circles will be removed.
The next Undo command will remove the rectangles.

SetUndoCommandName is used to set the text in the confirmation message box when the Undo
command is used.

Public Sub DemoSetUndoPoint()

Dim Drw As Drawing


Set Drw = [Link]

[Link] "Rectangles"

[Link] 0, 0, 100, 100


[Link] 150, 0, 250, 100

[Link] "Circles"
[Link]

[Link] 50, 0, 100


[Link] 75, 0, 100

End Sub

[Link]

Run an external program and wait for it to exit. Alphacam will do nothing, and will not respond to user
input, until the external program exits.

Syntax

[Link] (Name)

String Name Full path name of program to run, or just program name if program is in a directory on the
path.

Example

The example will run Windows Notepad, which is usually in the C:\Windows directory which is on the
path.

[Link] 2026-03-29
Objects - Objects Page 28 of 375

[Link] "notepad c:\temp\[Link]"

CadInputSettings Object
Settings to control input of CAD files.

CadInputSettings Properties

CadInputSettings Methods

CadInputSettings Properties

BreakTol - (double) Tolerance for joining elements while reading CAD files

CombineTangentialElements - (boolean) True to combine tangential lines / arcs in CAD input

DxfSpecial - (long) Control DXF input: 1 = Cabinets

IgnorePolylineWidth - (boolean) True to ignore width of polylines in DXF input

InputText - (boolean) True to input text in CAD input

Join3DPolylines - (boolean) True to automatically join 3D polyilnes in CAD input

UseColors - (boolean) True to use line/arc colours in DXF input

CadInputSettings Methods

None

CircleProperties Object
Object used to get the properties of a circle if a geometry represents a circle.

Use [Link] to get the object. If the geometry is a circle then this object will be
returned and its properties may be read (not written). If it is not a circle the special value Nothing will
be returned.

Note: for this object, a circle is defined as an arc with an included angle of more than 270 degrees.

More:

CircleProperties Properties

CircleProperties Methods

[Link] 2026-03-29
Objects - Objects Page 29 of 375

CircleProperties Example

CircleProperties Properties

Diameter -(double) Circle diameter (read-only)

Radius - (double) Circle radius (read-only)

CenterXL - (double) Local X coordinate of center (read-only)

CenterYL - (double) Local Y coordinate of center (read-only)

CenterXG - (double) Global X coordinate of center (read-only)

CenterYG - (double) Global Y coordinate of center (read-only)

CenterZG - (double) Global Z coordinate of center (read-only)

CircleProperties Methods

None.

CircleProperties Example

The example will loop for all the geometries in the drawing and display the diameter of each circle.

Dim drw As Drawing

Set drw = [Link]

Dim p As Path

For Each p In [Link]

Dim c As CircleProperties

Set c = [Link]

If Not (c Is Nothing) Then

MsgBox "Circle Diameter = " & [Link]

End If

Next p

Clamp Object
An object representing a (maybe moveable) clamp or fixture.

[Link] 2026-03-29
Objects - Objects Page 30 of 375

A clamp/fixture can be an extruded or rotated geometry, or a solid. Use the GeometryPath and
GeometrySolidPart properties to get the path or solid. (One will be empty)

Clamp Properties

BasePointX, BasePointY, BasePointZ - (double) XYZ coordinates of clamp reference point

GeometryPath - (Path) Path for this clamp, will be empty if clamp is a Solid Part (read-only)

GeometrySolidPart - (SolidPart) Solid Part for this clamp, will be empty if clamp is a Path (read-only)

Layer - (Layer) This clamp's layer (read-only)

MaxX, MaxY, MaxZ, MinX, MinY, MinZ - (double) Extents of this clamp (read-only)

Name - (String) Clamp name

Number - (long) Clamp ID Number (read-only)

Parent - (Clamp) This clamp's parent, will be empty if clamp does not have one (read-only)

Visible - (Boolean) True to show the clamp, false to hide it

[Link]

Associate a geometry with this clamp. The geometry will move with the clamp.

Syntax

[Link] (Geo)

Path Geo The geometry to be associated

[Link]

Add a move-clamp operation.

Syntax

[Link] (X, Y, Z, Angle)

double X X coordinate of new position for reference point

[Link] 2026-03-29
Objects - Objects Page 31 of 375

double Y Y coordinate of new position for reference point

double Z Z coordinate of new position for reference point

double Angle Angle to rotate about reference point, after move

See also

Clamp.Move2

Clamp.Move2

Add a move-clamp operation, as [Link] except the parameters are optional.

Syntax

Cl.Move2 (X, Y, Z, Angle)

double X X coordinate of new position for reference point

double Y Y coordinate of new position for reference point

double Z Z coordinate of new position for reference point

double Angle Angle to rotate about reference point, after move

Example

Cl.Move2 , , 100

will move the clamp by 100 in Z only.

Dimension Object
An object used to add dimensions to the drawing. It is accessed as a property of the Drawing. Its
properties correspond to the settings in the General and Configure pages shown when the Dimension
command is used in Alphacam. These should be set (or left at the defaults) and then one of the Create…
methods called to create a dimension.

For example, the following draws a line and then draws a horizontal dimension for it:

Public Sub Horizontal2Points()

Dim Drw As Drawing


Set Drw = [Link]

[Link] 2026-03-29
Objects - Objects Page 32 of 375

Dim P As Path
Set P = Drw.Create2DLine(-50, 10, 50, 20)
Dim E As Element
Set E = [Link](1)
With [Link]
.TextHeight = 5
.ArrowLength = 3
.TextPosition = acamDimABOVE_LINE
.CreateHorizontal [Link], [Link], [Link], [Link], _
([Link] + [Link]) * 0.5, [Link] + 20
End With
[Link]

End Sub

More:

Dimension Properties

Dimension Properties

ArrowLength - (float) Length of arrow head

DecimalPlacesAngle - (short) Number of decimal places for Angle dimensions

DecimalPlacesLinear - (short) Number of decimal places for linear dimensions

Gap - (float) Gap between part and dimension line

MarkAsCenter1 - (boolean) True to mark the first dimension point (eg in CreateVertical) or the only
point (eg in CreatePoint) as the centre of a circle

MarkAsCenter2 -(boolean) True to mark the second dimension point (eg in CreateVertical) as the centre
of a circle

MarkRadsWithR - (boolean) True to mark radius dimensions with R

Text - (String) If not empty, text to use for dimension instead of measured value, equivalent to Text =
Manual in General page

TextAlignment - (AcamDimTextAlign) Text alignment, acamDimALIGNED or


acamDimHORIZONTAL

TextHeight - (float) Height of text

TextPosition - (AcamDimTextPos) Text position, acamDimABOVE_LINE or acamDimCENTER

ToleranceFormat - (AcamDimTolerance) Format for tolerance, acamDimTolNONE,


acamDimTolMAX_MIN, acamDimTolMINUS_MINUS, acamDimTolPLUS_MINUS or
acamDimTolPLUS_PLUS

[Link] 2026-03-29
Objects - Objects Page 33 of 375

ToleranceLower - (float) Lower value for tolerance

ToleranceUpper - (float) Upper value for tolerance

TrailingZeroes - (boolean) True to show trailing zeroes

[Link]

Create an aligned dimension for two points.

Syntax

[Link] (X1, Y1, X2, Y2, XPosition, YPosition, XControl, YControl)

double X1 X coordinate of first point

double Y1 Y coordinate of first point

double X2 X coordinate of second point

double Y2 Y coordinate of second point

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

double XControl X coordinate of control point

double YControl Y coordinate of control point

[Return] Paths Returned Paths object

Remarks

The control point is used if the dimension position is to be outside the leader lines and the text is not
aligned. The line parallel to the line between the two points will go through the control point, which
should be between the leader lines. If the dimension position is between the leader lines the control point
can be given any value eg (0, 0)

The example will draw a line and dimension it:

Public Sub Aligned2Points()

With [Link]
.Create2DLine 50, 20, 200, 70
.Font = "AStencil"
With .Dimension
.TextPosition = acamDimCENTER
.TextAlignment = acamDimHORIZONTAL
.TextHeight = 6

[Link] 2026-03-29
Objects - Objects Page 34 of 375

.ArrowLength = 4
.CreateAligned 50, 20, 200, 70, 300, 110, 150, 75
End With
.ZoomAll
End With

End Sub

[Link]

Create an aligned dimension for the distance along the arc between the end points.

Syntax

[Link] (Element, XPosition, YPosition, XControl, YControl)

Element Element The Arc element

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

double XControl X coordinate of control point

double YControl Y coordinate of control point

[Return] Paths Returned Paths object

Remarks

The control point is used if the dimension position is to be outside the leader lines. The dimension arc
will go through the control point, which should be between the leader lines. If the dimension position is
between the leader lines the control point can be given any value eg (0, 0)

The example will draw an arc and dimension it:

Public Sub AlignedArc()

With [Link]
Dim G2 As Geo2D
Set G2 = .Create2DGeometry(-50, 10)
G2.AddArc2Point 50, 50, 150, 20
Dim P As Path, E As Element
Set P = [Link]
Set E = [Link](1)
.Font = "AStencil"
With .Dimension
.TextPosition = acamDimCENTER
.TextAlignment = acamDimALIGNED
.TextHeight = 6

[Link] 2026-03-29
Objects - Objects Page 35 of 375

.ArrowLength = 4
.Gap = 1
.CreateAlignedArc E, 50, 0, 0, 0
End With
.ZoomAll
End With

End Sub

[Link]

Create a dimension for the angle between two lines.

Syntax

[Link] (Element1, Element2, XPosition, YPosition, XControl, YControl)

Element Element1 First line element

Element Element2 Second line element

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

double XControl X coordinate of control point

double YControl Y coordinate of control point

[Return] Paths Returned Paths object

Remarks

The control point is used if the dimension position is to be outside the leader lines. The dimension arc
will go through the control point, which should be between the leader lines. If the dimension position is
between the leader lines the control point can be given any value eg (0, 0)

The example will draw two lines and dimension the angle between them:

Public Sub Angle()

With [Link]
Dim P1 As Path, P2 As Path
Set P1 = .Create2DLine(0, 0, 50, 0)
Set P2 = .Create2DLine(0, 0, 10, 60)
.Font = "AStencil"
With .Dimension
.TextPosition = acamDimCENTER
.TextAlignment = acamDimALIGNED
.TextHeight = 6

[Link] 2026-03-29
Objects - Objects Page 36 of 375

.ArrowLength = 4
.Gap = 1
.CreateAngle [Link](1), [Link](1), -60, 45, 30, 30
End With
.ZoomAll
End With

End Sub

[Link]

Create a diameter dimension for the given arc or circle.

Syntax

[Link] (Element, XPosition, YPosition, XControl, YControl)

Element Element The Arc element

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

double XControl X coordinate of control point

double YControl Y coordinate of control point

[Return] Paths Returned Paths object

Remarks

The control point is used if the dimension position is to be outside the circle. The dimension line will go
through the control point, which should be on or inside the circle, between the centre of the circle and
the point on the circumference where the extended dimension line intersects it. If the dimension position
is inside the circle the control point can be given any value eg (0, 0)

The example will draw a circle and dimension the diameter:

Public Sub Diameter()

With [Link]
Dim P As Path
Set P = .CreateCircle(100, 0, 0)
.Font = "AStencil"
With .Dimension
.TextAlignment = acamDimALIGNED
.TextPosition = acamDimABOVE_LINE
.CreateDiameter [Link](1), -100, -60, -10, -10
End With
.ZoomAll

[Link] 2026-03-29
Objects - Objects Page 37 of 375

End With

End Sub

[Link]

Create a horizontal dimension for two points.

Syntax

[Link] (X1, Y1, X2, Y2, XPosition, YPosition)

double X1 X coordinate of first point

double Y1 Y coordinate of first point

double X2 X coordinate of second point

double Y2 Y coordinate of second point

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

[Return] Paths Returned Paths object

Example 1: draw a line and dimension it:

Public Sub HorizontalLine()

Dim Drw As Drawing


Set Drw = [Link]
Dim P As Path
Set P = Drw.Create2DLine(-50, 10, 50, 10)
Dim E As Element
Set E = [Link](1)
With [Link]
.TextHeight = 5
.ArrowLength = 3
.TextPosition = acamDimABOVE_LINE
.CreateHorizontal [Link], [Link], [Link], [Link], _
([Link] + [Link]) * 0.5, [Link] + 20
End With
[Link]

End Sub

Example 2: draw two circles and dimension between their centres. Note the use of MarkAsCenter1 and
MarkAsCenter2 to draw a cross at the circle centres:

[Link] 2026-03-29
Objects - Objects Page 38 of 375

Public Sub Horizontal2Circles()

Dim Drw As Drawing


Set Drw = [Link]
Dim P1 As Path, P2 As Path
Set P1 = [Link](50, 0, 0)
Set P2 = [Link](50, 100, 0)
With [Link]
.TextHeight = 5
.ArrowLength = 3
.TextPosition = acamDimABOVE_LINE
.MarkAsCenter1 = True
.MarkAsCenter2 = True
.CreateHorizontal 0, 0, 100, 0, 50, 50
End With
[Link]

End Sub

Dimension.CreateHorizontal2

Create a horizontal dimension for two points, as CreateHorizontal but with added control over the
positioning of the dimension using XControl and YControl

Syntax

dim.CreateHorizontal2 (X1, Y1, X2, Y2, XPosition, YPosition, XControl, YControl)

double X1 X coordinate of first point

double Y1 Y coordinate of first point

double X2 X coordinate of second point

double Y2 Y coordinate of second point

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

double XControl X coordinate of control point

double YControl Y coordinate of control point

[Return] Paths Returned Paths object

[Link]

[Link] 2026-03-29
Objects - Objects Page 39 of 375

Create a leader line by copying a path of line elements.

Syntax

[Link] (Path)

Path Path Path containing lines to be copied

[Return] Paths Returned Paths object

Remarks

An arrow will be drawn at the first point, and lines to the remaining points.

Example:

Public Sub LeaderLine()

Dim Drw As Drawing


Set Drw = [Link]
Dim G As Geo2D
Dim P As Path
Set G = Drw.Create2DGeometry(50, 50)
[Link] 100, 100
[Link] 150, 100
Set P = [Link]
With [Link]
.ArrowLength = 3
.CreateLeaderLine P
End With
[Link] = True
[Link]
[Link]

End Sub

[Link]

Create a horizontal dimension for the maximum and minimum X coordinates of a collection of
geometries.

Syntax

[Link] (Paths, XPosition, YPosition)

Paths Paths The geometries

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

[Link] 2026-03-29
Objects - Objects Page 40 of 375

[Return] Paths Returned Paths object

The example asks the user to select some geometries and draws a Max XX dimension:

Public Sub MaxXX()

With [Link]
Dim PS As Paths
Set PS = .UserSelectMultiGeosCollection("MaxXX Dimension: Select Geometries", 0)
If [Link] = 0 Then Exit Sub
Dim X1 As Double, Y1 As Double, X2 As Double, Y2 As Double
[Link] X1, Y1, X2, Y2
.Font = "AStencil"
With .Dimension
.TextPosition = acamDimCENTER
.TextAlignment = acamDimALIGNED
.CreateMaxXX PS, (X1 + X2) * 0.5, Y2 + 50
End With
.ZoomAll
End With

End Sub

[Link]

Create a vertical dimension for the maximum and minimum Y coordinates of a collection of geometries.

Syntax

[Link] (Paths, XPosition, YPosition, XControl, YControl)

Paths Paths The geometries

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

double XControl X coordinate of control point

double YControl Y coordinate of control point

[Return] Paths Returned Paths object

Remarks

The control point is used if the dimension position is to be outside the leader lines and the text is not
aligned. The vertical line will go through the control point, which should be between the leader lines. If
the dimension position is between the leader lines the control point can be given any value eg (0, 0)

The example asks the user to select some geometries and draws a Max YY dimension:

[Link] 2026-03-29
Objects - Objects Page 41 of 375

Public Sub MaxYY()

With [Link]
Dim PS As Paths
Set PS = .UserSelectMultiGeosCollection("MaxYY Dimension: Select Geometries", 0)
.Font = "AStencil"
With .Dimension
.TextPosition = acamDimCENTER
.TextAlignment = acamDimHORIZONTAL
.TextHeight = 6
.ArrowLength = 4
.Gap = 1
.TrailingZeroes = False
.DecimalPlacesLinear = 2
.CreateMaxYY PS, 70, 90, 30, 30
End With
.ZoomAll
End With

End Sub

[Link]

Create a dimension for a point.

Syntax

[Link] (X, Y, XPosition, YPosition)

double X X coordinate of point to be dimensioned

double Y Y coordinate of point to be dimensioned

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

[Return] Paths Returned Paths object

The example draws a line and dimensions the end-point:

Public Sub Point()

With [Link]
Dim P As Path
Set P = .Create2DLine(0, 0, 50, 0)
.Font = "AStencil"
With .Dimension
.TextPosition = acamDimCENTER
.TextAlignment = acamDimALIGNED

[Link] 2026-03-29
Objects - Objects Page 42 of 375

.CreatePoint [Link](1).EndXL, [Link](1).EndYL, 200, 50


End With
.ZoomAll
End With

End Sub

[Link]

Create a radius dimension for the given arc or circle.

Syntax

[Link] (Element, XPosition, YPosition, XControl, YControl)

Element Element The Arc element

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

double XControl X coordinate of control point

double YControl Y coordinate of control point

[Return] Paths Returned Paths object

Remarks

The control point is used if the dimension position is to be outside the circle. The dimension line will go
through the control point, which should be on or inside the circle, between the centre of the circle and
the point on the circumference where the extended dimension line intersects it. If the dimension position
is inside the circle the control point can be given any value eg (0, 0)

The example will draw a circle and dimension the radius:

Public Sub Radius()

With [Link]
Dim P As Path
Dim E As Element
Set P = .CreateCircle(100, 0, 0)
Set E = [Link](1)
.Font = "AStencil"
With .Dimension
.TextAlignment = acamDimALIGNED
.TextPosition = acamDimABOVE_LINE
.MarkRadsWithR = True
.CreateRadius E, [Link] + [Link] * 1.3, [Link] + [Link] * 0.5, 10, 5
End With

[Link] 2026-03-29
Objects - Objects Page 43 of 375

.ZoomAll
End With

End Sub

[Link]

Create a vertical dimension for two points.

Syntax

[Link] (X1, Y1, X2, Y2, XPosition, YPosition)

double X1 X coordinate of first point

double Y1 Y coordinate of first point

double X2 X coordinate of second point

double Y2 Y coordinate of second point

double XPosition X coordinate of dimension position

double YPosition Y coordinate of dimension position

[Return] Paths Returned Paths object

The example will draw a line and dimension it:

Public Sub Vertical2Points()

Dim Drw As Drawing


Set Drw = [Link]
Dim P As Path
Set P = Drw.Create2DLine(0, 0, 0, 40)
Dim E As Element
Set E = [Link](1)
With [Link]
.TextHeight = 5
.ArrowLength = 3
.TextPosition = acamDimABOVE_LINE
.CreateVertical [Link], [Link], [Link], [Link], _
[Link] - 30, ([Link] + [Link]) * 0.5
End With
[Link]

End Sub

[Link]

[Link] 2026-03-29
Objects - Objects Page 44 of 375

Create an X-Ordinate dimension.

Syntax

[Link] (X, YPickPoint, YPosition)

double X X ordinate to be dimensioned

double YPickPoint Y coordinate of start of dimension line

double YPosition Y coordinate of dimension position

[Return] Paths Returned Paths object

Remarks

SetOrdinateReference should be called first to set the reference coordinate.

Example:

Public Sub XOrdinate()

With [Link]
With .Dimension
.SetOrdinateReference 50, 150
.CreateXOrdinate 0, 40, 100
.CreateXOrdinate 100, 50, 100
.CreateXOrdinate 120, 50, 100
.CreateXOrdinate 140, 50, 100
End With
.ZoomAll
End With

End Sub

[Link]

Create an Y-Ordinate dimension.

Syntax

[Link] (Y, XPickPoint, XPosition)

double Y Y ordinate to be dimensioned

double XPickPoint X coordinate of start of dimension line

double XPosition X coordinate of dimension position

[Return] Paths Returned Paths object

[Link] 2026-03-29
Objects - Objects Page 45 of 375

Remarks

SetOrdinateReference should be called first to set the reference coordinate.

Example:

Public Sub YOrdinate()

With [Link]
With .Dimension
.SetOrdinateReference 50, 50
.CreateYOrdinate 0, 40, 100
.CreateYOrdinate 50, 50, 100
.CreateYOrdinate 100, 50, 100
.CreateYOrdinate 120, 50, 100
.CreateYOrdinate 140, 50, 100
End With
.ZoomAll
End With

End Sub

[Link]

Set the reference point for subsequent X or Y-ordinate dimensions.

Syntax

[Link] (X, Y)

double X X ordinate of reference point

double Y Y ordinate of reference point

See [Link] and [Link].

[Link]

In Alphacam versions before V8, changing the settings in the API would change the GUI ones, which
was often not desired. This routine was added so it can still be done. After setting the properties of this
object call this method to make the user-interface default to the same settings.

Syntax

[Link]

Drawing Object
The drawing (or document) - contains the geometries and tool paths

[Link] 2026-03-29
Objects - Objects Page 46 of 375

More:

Drawing Properties

Drawing Properties

Attribute - See Attributes

BackgroundColor - (AcamColor) Background colour for Alphacam window, as a standard colour. Use
Redraw method to see the change

BackgroundColorRGB - (OLE_COLOR) Background colour for non-shaded Alphacam windows, as an


RGB colour. Use Redraw method to see the change

BackgroundColorShadingRGB - (OLE_COLOR) Background colour for shaded Alphacam windows, as


an RGB colour. Use Redraw method to see the change

Bold - (boolean) True to create bold text, if TrueType font used

Clamps - (Clamps) Collection of the clamps in the drawing (read-only)

ColorRGB - (OLE_COLOR) RGB Colour used for various items in Alphacam, as in File | Configure |
Colours

syntax ColorRGB(AcamColorIndex i)

Construction - (boolean) True if in Construction mode ie geometries created will be Construction


geometries

CurrentViewWindow (ViewWindow) - The current view window (read-only)

Dimension - (Dimension) Dimension object, for creating dimensions

DrawingColor - (AcamColor) Colour for drawing with DrawTo, the 16 standard colours

DrawingColorRGB - (OLE_COLOR) Colour for drawing with DrawTo,as an RGB colour

DrawingLineStyle - (AcamLineStyle) Line style for drawing with DrawTo: acamLineStyleSOLID or


acamLineStyleDOT

EnableSnap - (boolean) False to disable snap eg in UserGet2DPoint (write-only)

FindXYTolerance - (double) Tolerance for Find XY methods eg FindGeoAtPointL (Default is based on


number of decimal places set in Post)

Font - (String) Font name for text. Must start with A for Alphacam font eg AStencil, or T for TrueType
font eg TArial

FullName - (String) Complete path name of drawing file (read-only)

[Link] 2026-03-29
Objects - Objects Page 47 of 375

Geometries - (Paths) Collection of the geometries in the drawing (read-only)

GeoUtilitiesInterface - (IDispatch) Interface for GeoUtilities

HideEditBoxes (boolean) True to hide the edit boxes in UserGet2DPointWithCallBack and


UserGet3DPointWithCallBack

Id - (int) number identifying this drawing, 0 = the main drawing, > 0 = temporary drawings (read-only)

Italic - (boolean) True to create italic text, if TrueType font used

Layers - (Layers) Collection of the layers in the drawing (read-only)

LatheMachineConfiguration - (LatheMachineConfiguration) LatheMachineConfiguration object (read-


only)

MachineComponents - (MachineComponents) Collection of the machine components in the drawing


(read-only)

MachineConfiguration - (MachineConfiguration) MachineConfiguration object (read-only)

Materials - (Materials) Collection of the materials in the drawing (read-only)

Modified - (boolean) True if the drawing has been modified and not saved

Name - (String) File name of drawing file only, no path or extension (read-only)

Operations - (Operations) Collection of the operations in the drawing (read-only)

OperationsForTurret - (Operations) Collection of the operations in the drawing, for a given Lathe Turret,
specified by Turret and Station parameters (read-only)

Options - (DrawingOptions) Options eg Show Tool (read-only)

OutputNCStatus - Non-zero if Last OutputNC call failed

ParametricInterface (IDispatch) See here

Path - (String) Path of drawing file, no name or extension or trailing "\" (read-only)

PickTolerance - (double) Tolerance used for picking (read-only)

QuickShading - (boolean) True if Quick Shading is on

ScreenUpdating - (boolean) False to disable drawing of geometries created by [Link]…


methods

ShowSelection - (boolean) True to show the current selection. (Applies to shaded mode only) (write-
only)

[Link] 2026-03-29
Objects - Objects Page 48 of 375

SimulationType - (AcamSimulationType) the type of the current simulation,


acamSimulationTypeNONE, acamSimulationTypeSHADE, acamSimulationTypeSOLID,
acamSimulationTypeLATHERZ, acamSimulationTypeMILL_SINGLE_STEP_WP (read-only)

SnapData - (SnapData) snap data (read-only)

SnapMode - (AcamSnap) the current snap mode (read-only)

SolidFacets - (Variant) array of facets for the objects of given type in the drawing, formatted as for
surfaces (read-only)

syntax: SolidFacets(SolidName, Tolerance), eg SolidFacets("Parasolid", .1)

SolidInterface (IDispatch) See here

SolidParts (SolidParts) Collection of the SolidParts in the drawing (read-only)

SolidSimulationInterface (IDispatch) interface for solid simulation (read-only)

SolidSimulationStatus (AcamSolidSimulationStatus) status for solid simulation,


acamSimulationStatusNONE = solid simulation is not active, acamSimulationStatusSIMULATING =
solid simulation is currently running, acamSimulationStatusDISPLAY = solid simulation has finished
and the resulting solid model is being displayed. (read-only)

Splines - (Splines) Collection of the splines in the drawing (read-only)

STLFacets - (Variant) array of facets for the STL objects in the drawing, formatted as for surfaces (read-
only)

STLInterface (IDispatch) See here

Surfaces - (Surfaces) Collection of the surfaces in the drawing (read-only)

Text - (Texts) Collection of the text in the drawing (read-only)

Temp (Boolean) True if this is a temporary drawing (read-only)

ThreeDViews - (boolean) True if in 3D Views

ThreeDViewsDividerX - X Pixel of dividers in 3D views

ThreeDViewsDividerY - Y Pixel of dividers in 3D views

ToolPaths - (Paths) Collection of the tool paths in the drawing (read-only)

UserAction - (AcamUser) Exit code for last user selection (read-only)

ViewWindows - (ViewWindows) Collection of the View Windows (read-only)

Workpiece - (Workpiece) The main work piece (read-only)

[Link] 2026-03-29
Objects - Objects Page 49 of 375

Workpieces - (Workpieces) Collection of the work pieces in the drawing (read-only)

WorkPlanes - (WorkPlanes) Collection of the work planes in the drawing (read-only)

Drawing.AddBsplineCurve2

Create a B-Spline curve given the curve data: knots, vertices etc.

Syntax

drw.AddBsplineCurve2 V

Variant V The curve data, see remarks

Remarks

The variant contains a SafeArray of doubles, where some doubles contain 2 integers. The array can be
treated as an array of unions of type dints, defined (in C) as:

union dints

double dval;

int ival[2];

};

SurfaceEx1 in the API directory of the Alphacam cdrom contains a C++ example.

P[0].ival[0] = dimension of the curve, 3 (XYZ) or 4 (XYZW) if rational

P[0].ival[1] = the order ( = degree + 1)

P[1].ival[0] = number of vertices, = nv

P[1].ival[1] = reserved, must be 0

Then the knots, (nv + order) doubles

Then the vertices (control points) as an array of doubles, XYZ (and W if rational) for each vertex.

Then the minimum and maximum parameter values for the curve.

[Link]

Do not use. See AddBsplineCurve2.

Drawing.AddBsplineSurface2

[Link] 2026-03-29
Objects - Objects Page 50 of 375

Create a B-Spline surface given the surface data: knots, vertices, trimming boundaries etc.

Syntax

drw.AddBsplineSurface2 V

Variant V The surface data, see remarks

Remarks

The variant contains a SafeArray of doubles, where some doubles contain 2 integers. The array can be
treated as an array of unions of type dints, defined (in C) as:

union dints

double dval;

int ival[2];

};

SurfaceEx1 in the API directory of the Alphacam cdrom contains a C++ example.

A surface with NO trimming is defined as follows, where P represents the array embedded in the Variant
V:

P[0].ival[0] = dimension of the surface, 3 (XYZ) or 4 (XYZW) if rational

P[0].ival[1] = reserved, must be 0

P[1].ival[0] = S order (= degree + 1)

P[1].ival[1] = T order

P[2].ival[0] = number of vertices in S, = nvs

P[2].ival[1] = number of vertices in T, = nvt

P[3].ival[0] = reserved, must be 0

P[3].ival[1] = reserved, must be 0

The knots in S, (nvs + S order) doubles

The knots in T, (nvt + T order) doubles

The vertices (control points) as an array of doubles, XYZ (and W if rational) for each vertex, increasing
the S index before the T index.

[Link] 2026-03-29
Objects - Objects Page 51 of 375

Minimum S

Maximum S

Minimum T

Maximum T

A trimmed surface is represented by a surface given in the same way as above, but with trimming data in
front of it. The trimming data is one or more loops, where each loop is made up of one or more B-Spline
curves. There may be only one outer loop, which must be the first. There may be any number of inner
loops. If there are no outer loops then first_is_outer should be set to 0.

A trimmed surface is defined as follows, where P represents the array embedded in the Variant V:

P[0].ival[0] = Number of trimming loops = nloops

P[0].ival[1] = Total number of spline curves = tot_sp

P[1].ival[0] = Number of spline curves in the first loop

P[1].ival[1] = Number of spline curves in the second loop (if exists)

Following elements contain pairs of the number of spline curves in each loop.

Then come 2 elements for each spline curve, containing 2 integers each:

P[n].ival[0] = the order ( = degree + 1)

P[n].ival[1] = reserved, must be 0

P[n+1].ival[0] = dimension of the curve, 2 (ST) or 3 (STW) if rational

P[n+1].ival[1] = number of vertices, = nv

Then come the knots for each curve, (nv + order) doubles

Then come the vertices (control points) for each curve as an array of doubles, ST (and W if rational) for
each vertex. The vertices for each curve are immediately followed by the minimum and maximum
parameter values for that curve.

Finally is an element with ival[0] = first_is_outer, which should be 1 if the first loop is the outer
trimming loop, 0 if not.

That completes the trimming data, then comes the surface in the same way as for an untrimmed surface.

P[n].ival[0] = dimension of the surface, 3 (XYZ) or 4 (XYZW) if rational

P[n].ival[1] = reserved, must be 0

[Link] 2026-03-29
Objects - Objects Page 52 of 375

P[n+1].ival[0] = S order (= degree + 1)

P[n+1].ival[1] = T order

P[n+2].ival[0] = number of vertices in S, = nvs

P[n+2].ival[1] = number of vertices in T, = nvt

P[n+3].ival[0] = reserved, must be 0

P[n+3].ival[1] = reserved, must be 0

The knots in S, (nvs + S order) doubles

The knots in T, (nvt + T order) doubles

The vertices (control points) as an array of doubles, XYZ (and W if rational) for each vertex, increasing
the S index before the T index.

Minimum S

Maximum S

Minimum T

Maximum T

[Link]

Do not use. See AddBsplineSurface2.

[Link]

Add the name of this drawing to the "Recent File List", the list on the end of the File menu. Normally
drawings opened and saved using the API are not added – use this method to add them if required.

Syntax

[Link]

[Link]

Apply the Alphacam Auto Close command to all the geometries in the drawing (except paths marked as
Construction or hidden (Visible property = False).

Syntax

[Link] (X, Y, GapTolerance)

Double X X coordinate of start point

[Link] 2026-03-29
Objects - Objects Page 53 of 375

Double Y Y coordinate of start point

Double GapTolerance Tolerance for gaps

[Return] Path Returned closed geometry as a Path object, if successful

[Link]

Cancel the current work plane.

Syntax

[Link]

[Link]

Set the current positions of the clamps to be the initial position.

Syntax

[Link]

[Link]

Clear (delete) specified entities.

Syntax

[Link] (Geometry, Construction, Toolpaths, Dimensions, Splines, Surfaces, UserLayers)

boolean Geometry True to clear geometry

boolean Construction True to clear construction

boolean Toolpaths True to clear tool paths

boolean Dimensions True to clear dimensions

boolean Splines True to clear splines

boolean Surfaces True to clear surfaces

boolean UserLayers True to clear user layers

boolean Text True to clear text

Remarks

The example clears tool paths and dimensions:

[Link] 2026-03-29
Objects - Objects Page 54 of 375

[Link] false, false, true, true, false, false, false, false

Drawing.Create2DGeometry

Create an object representing a 2D geometry. The object is of type Geo2D. Its methods may be called to
build up a 2D geometry as a set of connected lines and arcs. The geometry may be open or closed.

Syntax

drw.Create2DGeometry (X, Y)

double X X coordinate of start point of first line or arc

double Y Y coordinate of start point of first line or arc

[Return] Geo2D Geo2D object

The example will draw a triangle:

Dim geo As Geo2D

Set geo = drw.Create2DGeometry (-20, 0)

[Link] 20, 0

[Link] 0, 30

[Link]

Drawing.Create2DLine

Create a geometry containing a single 2D line and add to the Alphacam geometry database, and return
an object of type Path.

Syntax

drw.Create2DLine (X1, Y1, X2, Y2)

double X1 X coordinate of start point of line

double Y1 Y coordinate of start point of line

double X2 X coordinate of end point of line

double Y2 Y coordinate of end point of line

[Return] Path Path object

Drawing.Create3DPolyline

[Link] 2026-03-29
Objects - Objects Page 55 of 375

Create an object representing a 3D polyline. The object is of type Polyline. Its AddLine method may be
called to build up a 3D geometry as a set of connected lines.

Syntax

drw.Create3DPolyline (X, Y, Z)

double X X coordinate of start point of first line

double Y Y coordinate of start point of first line

double Z Z coordinate of start point of first line

[Return] PolyLine PolyLine object

The example will draw a 3D polyline:

Dim geo As PolyLine

Set geo = drw.Create3DPolyline (0, 0, 0)

[Link] 20, 0, 0

[Link] 25, 30, 40

[Link] 30, 40, 30

[Link] 40, 50, 20

[Link]

[Link]

Create an empty AlphacamObjects Collection. The Add method may then be used to add
AlphacamObjects objects to it.

Syntax

[Link]

[Return] AlphacamObjects AlphacamObjects object

[Link]

Create a GeoCad object.

Syntax

[Link]

[Link] 2026-03-29
Objects - Objects Page 56 of 375

[Return] GeoCad GeoCad object

Remarks

Used for adding random 3D lines and arcs. See GeoCad object.

[Link]

Create a circle and add to the Alphacam geometry database, and return an object of type Path.

Syntax

[Link] (Diameter, XCen, YCen)

double Diameter Diameter of circle

double XCen X coordinate of centre of circle

double YCen Y coordinate of centre of circle

[Return] Path Path object

Remarks

The start point and direction will be as set in File | Configure | General | Geometry. See CreateCircle2.

Drawing.CreateCircle2

Create a circle and add to the Alphacam geometry database, and return an object of type Path. Start point
and direction may be set.

Syntax

drw.CreateCircle2 (Diameter, XCen, YCen, CW, StartAngle)

double Diameter Diameter of circle

double XCen X coordinate of centre of circle

double YCen Y coordinate of centre of circle

boolean CW True for CW, False for CCW

double StartAngle Start Angle in degrees, 90 = top

[Return] Path Path object

Remarks

The start point and direction will be as specified. To use system settings see CreateCircle.

[Link] 2026-03-29
Objects - Objects Page 57 of 375

[Link]

Create the default material geometry for the tool paths in the drawing.

Syntax

[Link]

[Link]

Create work volume around everything in the drawing.

Syntax

[Link]

[Link]

Create an ellipse and add to geometry database. A Path object will be returned.

Syntax

[Link] (Width, Height, NumQuads, NumArcsPerQuad, CenterX, CenterY)

double Width X dimension of ellipse

double Height Y dimension of ellipse

short NumQuads Number of quadrants, 4 = complete ellipse

short NumArcsPerQuad Number of arcs per quadrant, usually 4

double CenterX X coordinate of center

double CenterY Y coordinate of center

[Return] Path Path object

[Link]

Create an object used to create a geometry using Alphacam Fast Geometry. The object is of type
FastGeometry. Its methods may be called to add turns. It should be ended with the Finish or
CloseAndFinish method. The geometry may be open or closed.

Syntax

[Link]

[Return] FastGeometry FastGeometry object

[Link] 2026-03-29
Objects - Objects Page 58 of 375

The example will draw a simple geometry. Note that the value of the XIntersection parameter in the call
to LineToLineBlend is not known, so it is left blank. This is the same as pressing F1 (for Unknown)
when using Fast Geometry interactively. VBA will indicate that a parameter is optional (in the Object
Browser and prompts) by enclosing it in square brackets, for example, [XIntersection].

Public Sub FastGeoEx1()

Dim Drw As Drawing


Set Drw = [Link]

Dim FastGeo As FastGeometry


Set FastGeo = [Link]

With FastGeo
.KnownArc 50, True, 0, 0, 90
.ArcToArc 20, False, False
.KnownArc 25, True, 100, 10
.LineToLineBlend 5, , -50, 260 ' X unknown
.CloseAndFinish
End With

[Link]

End Sub

[Link]

Create an involute curve and add to geometry database. A Path object will be returned.

Syntax

[Link] (BaseCircleDiameter, NumQuads, CenterX, CenterY)

double BaseCircleDiameter Diameter of base circle

short NumQuads Number of quadrants

double CenterX X coordinate of center of base circle

double CenterY Y coordinate of center of base circle

[Return] Path Path object

[Link]

Create a layer (or return existing layer if one exists with the same name). An object of type Layer will be
returned. To make it the current layer for the drawing use [Link]. To move a geometry into
the layer use [Link].

Syntax

[Link] 2026-03-29
Objects - Objects Page 59 of 375

[Link] (Name)

String Name Layer name, maximum 31 characters

[Return] Layer Layer object

Remarks

See the example.

Alphacam has 6 special layers which always exist. They are:

APS GEOMETRY

CONSTRUCTION

TOOLPATHS

DIMENSIONS

SPLINES

SURFACES

For example:

[Link]("APS GEOMETRY")

will return the geometry layer.

[Link]

Create a material that is not in the material data file. A Material object will be returned. Its properties
may be set, and it can be made the current material using [Link].

Syntax

[Link]

[Return] Material Material object

Example:

Dim drw As Drawing

Dim mat As Material

Set drw = [Link]

Set mat = [Link]

[Link] 2026-03-29
Objects - Objects Page 60 of 375

[Link] = "API Material"

[Link] = False

[Link] = 850

[Link](1) = "Created in API"

[Link] mat

[Link]

Create a NestData object to do nesting using a nest list.

Syntax

[Link] (FileName)

String FileName Name of nest list file

[Return] NestData NestData object

Remarks

This and other Nesting objects are defined in the AlphaCam Nesting Type Library. Use Tools |
References to add a reference to it if it is not already referenced.

After calling this method, use [Link] and [Link] to do the nesting.

[Link]

Create an empty Path Collection. The Add method may then be used to add Path objects to it.

Syntax

[Link]

[Return] Paths Paths object

[Link]

Create a polygon and add to geometry database. A Path object will be returned.

Syntax

[Link] (Diameter, NumSides, InsideCircle, CenterX, CenterY)

double Diameter Diameter of base circle

long NumSides Number of sides in the polygon

[Link] 2026-03-29
Objects - Objects Page 61 of 375

boolean InsideCircle True if polygon is inside circle.

double CenterX X coordinate of center

double CenterY Y coordinate of center

[Return] Path Path object

Remarks

The polygon is created based on the circle center (CenterX, CenterY), diameter Diameter. If
InsideCircle is True the polygon points lie on the circle, if False the polygon sides touch the circle.

[Link]

Create a geometry containing a rectangle and add to the Alphacam geometry database, and return an
object of type Path.

Syntax

[Link] (X1, Y1, X2, Y2)

double X1 X coordinate of corner 1

double Y1 Y coordinate of corner 1

double X2 X coordinate of corner 2

double Y2 Y coordinate of corner 2

[Return] Path Path object

Remarks

The rectangle will start at (X1, Y1), which may be any corner. (X2, Y2) should be the opposite corner.

[Link]

Create an empty Spline Collection. The Add method may then be used to add Spline objects to it.

Syntax

[Link]

[Return] Splines Splines object

Drawing.CreateSurfaceCoons3

Create a Coons Patch through 3 paths or splines.

[Link] 2026-03-29
Objects - Objects Page 62 of 375

Syntax

drw.CreateSurfaceCoons3 (Edge1, Edge2, Edge3, Tolerance)

Object Edge1 Edge 1, as a Path or Spline

Object Edge2 Edge 2, as a Path or Spline

Object Edge3 Edge 3, as a Path or Spline

double Tolerance Tolerance to fit edges

[Return] Surface The created surface

Drawing.CreateSurfaceCoons4

Create a Coons Patch through 4 paths or splines.

Syntax

drw.CreateSurfaceCoons4 (Edge1, Edge2, Edge3, Edge4, Tolerance)

Object Edge1 Edge 1, as a Path or Spline

Object Edge2 Edge 2, as a Path or Spline

Object Edge3 Edge 3, as a Path or Spline

Object Edge4 Edge 4, as a Path or Spline

double Tolerance Tolerance to fit edges

[Return] Surface The created surface

[Link]

Create an extruded surface for each line or arc in the given geometry.

Syntax

[Link] (Section, ExtrudeDistance)

Path Section Path The path to extrude

Double ExtrudeDistance Distance to extrude by

[Return] Surfaces The surfaces

[Link]

[Link] 2026-03-29
Objects - Objects Page 63 of 375

Create a fillet surface given 2 surfaces. The 2 surfaces will be trimmed to meet the fillet.

Syntax

[Link] (Surface1, Surface2, StartX, StartY, StartZ, StartRadius, EndRadius,


StepLength)

Surface Surface1 First Surface

Surface Surface2 Second Surface

double StartX X coordinate of start point

double StartY Y coordinate of start point

double StartZ Z coordinate of start point

double StartRadius Start radius of fillet

double EndRadius End radius of fillet

double StepLength Step length

[Return] Surface The fillet surface

[Link]

Create a flat surface given one boundary.

Syntax

[Link] (Boundary)

Path Boundary The boundary of the surface

[Return] Surface The surface

Remarks
This method uses a different algorithm to CreateFlatSurface2 so the results for a single surface may not
be the same.

Drawing.CreateSurfaceFlat2

Create a flat surface given one or more boundaries.

Syntax

[Link] 2026-03-29
Objects - Objects Page 64 of 375

drw.CreateSurfaceFlat2 (Boundaries)

Paths Boundaries Path Collection containing the boundaries of the surface

[Return] Surface The surface

Remarks
This method uses a different algorithm to CreateFlatSurface so the results for a single surface may not
be the same.

[Link]

Create a surface of revolution.

Syntax

[Link] (X1, Y1, Z1, X2, Y2, Z2, StartAngle, EndAngle, CrossSection,
Tolerance)

double X1

double Y1 Global XYZ coordinates of first point on axis

double Z1

double X2

double Y2 Global XYZ coordinates of second point on axis

double Z2

double StartAngle Start angle in degrees

double EndAngle End angle in degrees

Object CrossSection The cross-section, as a Path or Spline

double Tolerance Tolerance to fit cross-section

[Return] Surface The created surface

[Link]

Create a ruled surface.

Syntax

[Link] (StartSection, EndSection, Tolerance)

[Link] 2026-03-29
Objects - Objects Page 65 of 375

Object StartSection Start section, as a Path or Spline

Object EndSection End section, as a Path or Spline

double Tolerance Tolerance to fit sections

[Return] Surface The created surface

Drawing.CreateSurfaceSwept2

Create a swept surface given 2 curves.

Syntax

drw.CreateSurfaceSwept2 (StartSection, CurveOfSweep, Tolerance, RotateSections)

Object StartSection Start section, as a Path or Spline

Object CurveOfSweep Curve of sweep, as a Path or Spline

double Tolerance Tolerance to fit sections

boolean RotateSections True to rotate sections along the sweep

[Return] Surface The created surface

Drawing.CreateSurfaceSwept3

Create a swept surface given 3 curves.

Syntax

drw.CreateSurfaceSwept3 (StartSection, CurveOfSweep, FinishSection, Tolerance, RotateSections)

Object StartSection Start section, as a Path or Spline

Object CurveOfSweep Curve of sweep, as a Path or Spline

Object FinishSection Finish section, as Path or Spline

double Tolerance Tolerance to fit sections

boolean RotateSections True to rotate sections along the sweep

[Return] Surface The created surface

[Link]

Create a tri-corner fillet given 3 surfaces.

[Link] 2026-03-29
Objects - Objects Page 66 of 375

Syntax

[Link] (Surface1, Surface2, Surface3, Start1X, Start1Y, Start1Z, Start2X,


Start2Y, Start2Z, Start3X, Start3Y, Start3Z, Radius, StepLength)

Surface Surface1 First Surface

Surface Surface2 Second Surface

Surface Surface3 Third Surface

double Start1X X coordinate of start point on first surface

double Start1Y Y coordinate of start point on first surface

double Start1Z Z coordinate of start point on first surface

double Start2X X coordinate of start point on second surface

double Start2Y Y coordinate of start point on second surface

double Start2Z Z coordinate of start point on second surface

double Start3X X coordinate of start point on third surface

double Start3Y Y coordinate of start point on third surface

double Start3Z Z coordinate of start point on third surface

double Radius Radius of fillet

double StepLength Step length

[Link]

Create text as geometry lines and arcs and add to geometry database. A Paths object representing the
geometries will be returned.

Syntax

[Link](Text, X, Y, Height)

String Text The text string

double X X coordinate of start point of string (Left)

double Y Y coordinate of start point of string (Bottom)

double Height Height of text

[Link] 2026-03-29
Objects - Objects Page 67 of 375

[Return] Paths Paths object

Remarks

See Drawing.CreateText2 to create text as a Text object.

The Font property sets the font to be used. For example:

Dim drw As Drawing

Set drw = [Link]

[Link] = "AStencil"

[Link] "Alphacam Stencil Font", 0, 0, 10

[Link] = "TArial"

[Link] "TrueType Arial Font", 0, 20, 8

Drawing.CreateText2

Create text as text and add to geometry database. A Text object representing the text will be returned.

Syntax

drw.CreateText2(Text, X, Y, Height)

String Text The text string

double X X coordinate of start point of string (Left)

double Y Y coordinate of start point of string (Bottom)

double Height Height of text

[Return] Text Text object

Remarks

See [Link] to create text as geometries for machining.

The example creates some text and then changes the style of some of it:

Public Sub InsertText()

Dim Drw As Drawing


Set Drw = [Link]
Dim PS As Paths
Set PS = [Link]("Geometry", 0, 40, 10)

[Link] 2026-03-29
Objects - Objects Page 68 of 375

Dim T As Text
Set T = Drw.CreateText2("Text", 0, 20, 10)
Set T = Drw.CreateText2("Italic Text", 0, 0, 10)
[Link]
[Link] = "TArial"
[Link] = True
[Link]

End Sub

[Link]

Create text along a path and add to geometry database. A Paths object representing the geometries will
be returned.

Syntax

[Link](Text, Path, Justify, Height, CharacterGap)

String Text The text string

Path Path Geometry to create text along

AcamJustifyType Justify acamJustifyLEFT, RIGHT, CENTER or SCALED

Double Height Character height

Double CharacterGap Distance between characters

[Return] Paths Paths object

Remarks

See Drawing.CreateTextAlongPath2 to create text as a Text object

The character height will be ignored if Justify = acamJustifySCALED.

CharacterGap is a multiple of the height, 0.2 is the normal value.

Example:

Public Sub TextAlongPath()

Dim Drw As Drawing


Set Drw = [Link]

Dim G As Geo2D
Dim P As Path
Set G = Drw.Create2DGeometry(0, 0)
[Link] 50, 0, 75, True, False

[Link] 2026-03-29
Objects - Objects Page 69 of 375

Set P = [Link]

[Link] "Alphacam", P, acamJustifyCENTER, 3, 0.2

[Link]

End Sub

Drawing.CreateTextAlongPath2

Create text along a path as text and add to geometry database. A Text object representing the text will be
returned.

Syntax

drw.CreateTextAlongPath2(Text, Path, Justify, Height, CharacterGap)

String Text The text string

Path Path Geometry to create text along

AcamJustifyType Justify acamJustifyLEFT, RIGHT, CENTER or SCALED

Double Height Character height

Double CharacterGap Distance between characters

[Return] Text Text object

Remarks

See [Link] to create text as geometries for machining.

The character height will be ignored if Justify = acamJustifySCALED.

CharacterGap is a multiple of the height, 0.2 is the normal value.

Example:

Public Sub TextAlongPath()

Dim Drw As Drawing


Set Drw = [Link]

Dim G As Geo2D
Dim P As Path
Set G = Drw.Create2DGeometry(0, 0)
[Link] 50, 0, 75, True, False
Set P = [Link]

[Link] 2026-03-29
Objects - Objects Page 70 of 375

Drw.CreateTextAlongPath2 "Alphacam", P, acamJustifySCALED, 3, 0.2

[Link]

End Sub

[Link]

Create an empty Text Collection. The Add method may then be used to add Text objects to it.

Syntax

[Link]

[Return] Texts Texts object

[Link]

Create a work plane and return an object representing it. The object is of type WorkPlane. This method
only creates the work plane - it will not make it the current work plane. To make it the current work
plane use [Link], to move a geometry into the work plane use [Link]

Syntax

[Link] (X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3)

double X1 X coordinate of Point1

double Y1 Y coordinate of Point1

double Z1 Z coordinate of Point1

double X2 X coordinate of Point2

double Y2 Y coordinate of Point2

double Z2 Z coordinate of Point2

double X3 X coordinate of Point3

double Y3 Y coordinate of Point3

double Z3 Z coordinate of Point3

[Return] WorkPlane WorkPlane object

Remarks

The three points (always specified in global coordinates) must not lie in a straight line. The local X-axis
of the work plane will be the line from Point1 to Point2. The local Y-axis will be the line from Point1

[Link] 2026-03-29
Objects - Objects Page 71 of 375

to Point3. The origin will be Point1.

The local Z-axis will be in the direction that a screw-driver lying along the Z-axis would move if turned
from the local X-axis to the local Y-axis.

If an existing work plane exactly matches the specified one it will be used.

Example 1 will create a vertical work plane parallel to the global Y-axis, crossing the X-axis at X = 100.
The local Z-axis will point along the positive global X-axis. It then makes it the current work plane and
draws a circle in it.

Dim drw As Drawing

Set drw = [Link]

Dim wp As WorkPlane

Set wp = [Link] (100, 0, 0, 100, 1, 0, 100, 0, 1)

[Link] wp

[Link] 20, 0, 0

[Link]

Example 2 will create the same work plane but will not make it current. It uses [Link] to
put the circle into the work plane. This avoids unwanted screen redraws.

Dim drw As Drawing

Set drw = [Link]

Dim wp As WorkPlane

Set wp = [Link] (100, 0, 0, 100, 1, 0, 100, 0, 1)

Dim p As Path

Set p = [Link] (20, 0, 0)

[Link] wp

[Link] (Lathe only)

Create a work plane for a developed side view and return an object representing it. The object is of type
WorkPlane. This method only creates the work plane - it will not make it the current work plane. To
make it the current work plane use [Link], to move a geometry into the work plane use
[Link]

Syntax

[Link] 2026-03-29
Objects - Objects Page 72 of 375

[Link] (LineElem)

Element LineElem Element object for the line to be developed

[Link]

Create a work plane given two points on its local Z-axis and return an object representing it. The object
is of type WorkPlane. This method only creates the work plane - it will not make it the current work
plane. To make it the current work plane use [Link], to move a geometry into the work
plane use [Link]

Syntax

[Link] (X1, Y1, Z1, X2, Y2, Z2)

double X1 X coordinate of Point1

double Y1 Y coordinate of Point1

double Z1 Z coordinate of Point1

double X2 X coordinate of Point2

double Y2 Y coordinate of Point2

double Z2 Z coordinate of Point2

[Return] WorkPlane WorkPlane object

[Link] (Lathe Only)

Create a work plane for 2-Axis Turning on the Sub-Spindle and return an object representing it. The
object is of type WorkPlane. This method only creates the work plane - it will not make it the current
work plane. To make it the current work plane use [Link], to move a geometry into the
work plane use [Link]

Syntax

[Link]

[Return] WorkPlane WorkPlane object

Remarks

If the work plane already exists this will raise an error. Use [Link] first to
see if it exists.

To set the shift use [Link], after using this command.

[Link] 2026-03-29
Objects - Objects Page 73 of 375

[Link]

Delete selected geometries and tool paths.

Syntax

[Link]

Remarks

All geometries with the Selected property set will be deleted.

[Link]

Draw cross-hair cursor at given point.

Syntax

[Link] (X, Y, Z)

double X X Global coordinate

double Y Y Global coordinate

double Z Z Global coordinate

Remarks

They will always be drawn in XOR mode, and will be redrawn in the old position to remove them
automatically. [Link] may be used to remove them if required.

[Link]

Draw a line from the current graphics position. See [Link] and [Link].

Syntax

[Link] (X, Y, Z)

double X X Global coordinate

double Y Y Global coordinate

double Z Z Global coordinate

Remarks

This will draw a line from the current position (set in MoveTo or by the last call to this routine).

[Link]

[Link] 2026-03-29
Objects - Objects Page 74 of 375

Draw an arc from the current graphics position. See [Link] and [Link].

Syntax

[Link] (X, Y, Z, XCenter, YCenter, CW)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

double XCenter X coordinate of arc centre

double YCenter Y coordinate of arc centre

Boolean CW True if clockwise

Remarks

Coordinates are assumed to be local to the current work plane if there is one. Current work plane defines
axis of arc

[Link]

Find geometry that is closest to given point, and within tolerance given by the FindXYTolerance
property.

Syntax

[Link] (X, Y)

double X Local X coordinate of test point

double Y Local Y coordinate of test point

[Return] Path Path object

Remarks

If there is a geometry within the tolerance an object of type Path will be returned. If not the special value
Nothing will be returned.

If there is a current work plane only geometries in the work plane will be searched. If there is no work
plane only geometries with no work plane will be searched.

The coordinates are always Local coordinates.

[Link]

[Link] 2026-03-29
Objects - Objects Page 75 of 375

Get the area of the selected geometries.

Syntax

[Link] (HatchColor)

AcamColor HatchColor Color to draw calculation lines in, -1 to suppress

[Link]

Get the area of the selected tool paths.

Syntax

[Link] (HatchColor)

AcamColor HatchColor Color to draw calculation lines in, -1 to suppress

[Link]

Find closest point on selected surfaces.

A limitation of this routine is that it does not take into account trim boundaries, so the returned point
may be in a trimmed part of the surface. Use the IsPointTrimmed of the returned Surface to check for
this.

Syntax

[Link](X, Y, Z, ClosestSurface, XP, YP, ZP, S, T)

double X X coordinate of test point

double Y Y coordinate of test point

double Z Z coordinate of test point

Surface ClosestSurface Returned closest surface

double XP Returned X coordinate of closest point

double YP Returned Y coordinate of closest point

double ZP Returned Z coordinate of closest point

double S Returned S parameter value of closest point

double T Returned T parameter value of closest point

[Return] boolean True if a point was found.

[Link] 2026-03-29
Objects - Objects Page 76 of 375

[Link]

Get the minimum and maximum values of Global X,Y and Z for the drawing.

Syntax

[Link] (X1, Y1, Z1, X2, Y2, Z2)

double X1 Returned Minimum Global X

double Y1 Returned Minimum Global Y

double Z1 Returned Minimum Global Z

double X2 Returned Maximum Global X

double Y2 Returned Maximum Global Y

double Z2 Returned Maximum Global Z

[Link]

Get the first geometry in the drawing. An object of type Path will be returned.

Syntax

[Link]

[Return] Path Path object

See Also

[Link]

[Link]

[Link]

[Link]

Get the first layer (Alphacam or User layer) in the drawing. An object of type Layer will be returned.

Syntax

[Link]

[Return] Layer Layer object

[Link] 2026-03-29
Objects - Objects Page 77 of 375

See Also

[Link]

[Link]

[Link]

Example

[Link]

Get the first tool path in the drawing. An object of type Path will be returned.

Syntax

[Link]

[Return] Path Path object

See Also

[Link]

[Link]

[Link]

[Link]

Get the number of geometries (not splines or surfaces) in the drawing.

Syntax

[Link]

[Return] long Number of geometries

See Also

[Link]

[Link]

[Link]

Get the last geometry in the drawing. An object of type Path will be returned.

Syntax

[Link] 2026-03-29
Objects - Objects Page 78 of 375

[Link]

[Return] Path Path object

See Also

[Link]

[Link]

[Link]

Get the last tool path in the drawing. An object of type Path will be returned.

Syntax

[Link]

[Return] Path Path object

See Also

[Link]

[Link]

[Link]

Get the active user layer for the drawing. An object of type Layer will be returned. If there is not an
active layer the special value Nothing will be returned, which may be used in tests.

Syntax

[Link]

[Return] Layer Layer object

The example gets the active user layer and displays the name, or "No active user layer" if there is no
active layer.

Dim drw As Drawing

Set drw = [Link]

Dim lyr As Layer

Set lyr = [Link]

If lyr is Nothing then

[Link] 2026-03-29
Objects - Objects Page 79 of 375

MsgBox "No active user layer"

Else

MsgBox "Layer name is " & [Link]

End If

[Link]

Get the number of layers (Alphacam and User layers) in the drawing.

Syntax

[Link]

[Return] long Number of layers

See Also

[Link]

[Link]

[Link]

Example

[Link]

Get the current material as a Material object.

Syntax

[Link]

[Return] Material Material object

[Link]

Get the current material geometry as a Path object and top and bottom Z levels.

Syntax

[Link] (TopZ, BottomZ)

double* TopZ Returned Z level of top of material

double* BottomZ Returned Z level of bottom of material

[Link] 2026-03-29
Objects - Objects Page 80 of 375

[Return] Path Path object

[Link]

Return a NestInformation object, which gives information about the current nest.

[Link]

Return first group number not used by the geometries. If a new group is to be created use this method to
get a unique number.

[Link]

Return first group number not used by the surfaces. If a new surface group is to be created use this
method to get a unique number.

[Link]

Return first group number not used by the tool paths. If a new group is to be created use this method to
get a unique number.

[Link]

Return first operation group number not currently being used. Only applies to the Lathe module. If a
new operation group is to be created use this method to get a unique number.

[Link]

Get element that was picked by the user in the last call to [Link].

Syntax

[Link]

[Return] Element Element object

Remarks

See also [Link] and [Link].

Example:

Dim drw As Drawing

Dim p As Path

Dim elem As Element

[Link] 2026-03-29
Objects - Objects Page 81 of 375

Set drw = [Link]

Set p = [Link]("Pick Geometry")

If p Is Nothing Then End

Set elem = [Link]

x = [Link]

y = [Link]

MsgBox "Pick Point X, Y = " & x & ", " & y

' Properties of elem may be accessed as required

[Link]

Get X Local coordinate of point that was picked by the user in the last call to
[Link].

Syntax

[Link]

[Return] double X coordinate

See [Link] for example.

[Link]

Get Y Local coordinate of point that was picked by the user in the last call to
[Link].

Syntax

[Link]

[Return] double Y coordinate

See [Link] for example.

[Link] (Lathe only)

Get the Sub-Spindle work plane for the drawing. An object of type WorkPlane will be returned. If the
work plane doesn't exist the special value Nothing will be returned, which may be used in tests.

Syntax

[Link]

[Link] 2026-03-29
Objects - Objects Page 82 of 375

[Return] WorkPlane WorkPlane object

Remarks

Use [Link] to create the work plane if it doesn't exist.

[Link]

Get the number of tool paths in the drawing.

Syntax

[Link]

[Return] long Number of tool paths

See Also

[Link]

[Link]

[Link]

[Link]

Get the current work plane for the drawing. An object of type WorkPlane will be returned. If there is not
a current work plane the special value Nothing will be returned, which may be used in tests.

Syntax

[Link]

[Return] WorkPlane WorkPlane object

The example gets the current work plane and displays the name, or "Flat Land" if there is no current
work plane.

Dim drw As Drawing

Set drw = [Link]

Dim wp As WorkPlane

Set wp = [Link]

If wp is Nothing then

[Link] 2026-03-29
Objects - Objects Page 83 of 375

MsgBox "Flat Land"

Else

MsgBox "Work plane name is " & [Link]

End If

[Link]

Hatch a single path.

Syntax

[Link] (Path, Style, Angle, Spacing, SpacePercent)

Path Path The geometry to hatch

AcamHatchStyle Style The hatch style, acamHatchDouble or acamHatchSingle

double Angle Hatch angle

double Spacing Spacing

double SpacePercent % of spacing for double lines

[Return] Paths The returned hatch paths

Example

Public Sub TestHatchPath()

Dim Drw As Drawing


Set Drw = [Link]
Dim P As Path
Set P = [Link](100, 0, 0)
Dim PS As Paths
Set PS = [Link](P, acamHatchSingle, 60, 5, 10)

End Sub

[Link]

Hatch geometries starting at a given point.

Syntax

[Link] (X, Y, Style, Angle, Spacing, SpacePercent, GapTolerance)

double X X coordinate of start point

[Link] 2026-03-29
Objects - Objects Page 84 of 375

double Y Y coordinate of start point

AcamHatchStyle Style The hatch style, acamHatchDouble or acamHatchSingle

double Angle Hatch angle

double Spacing Spacing

double SpacePercent % of spacing for double lines

double GapTolerance Gap tolerance for auto-close

[Return] Paths The returned hatch paths

Example

Public Sub TestHatchPoint()

Dim Drw As Drawing


Set Drw = [Link]
[Link] 150, 0, 50
[Link] 30, 30, 60, 60
Dim PS As Paths
Set PS = [Link](18, 105, acamHatchSingle, 30, 5, 10, 0.5)

End Sub

[Link]

Insert an Alphacam drawing into the current drawing.

Syntax

[Link] (Name, X, Y, Z)

String Name Complete path name to insert

double X Amount to move inserted drawing in X

double Y Amount to move inserted drawing in Y

double Z Amount to move inserted drawing in Z

[Link]

Join selected geometries and / or tool paths, producing new geometries or tool paths.

Syntax

[Link]

[Link] 2026-03-29
Objects - Objects Page 85 of 375

[Return] Paths Returned Paths object (see remarks).

Remarks

The returned object is a Paths Collection containing the resulting paths.

If no tool paths are selected the joined paths will be geometries, else they will be tool paths.

Example:

Dim Geos as Paths

set Geos = [Link]

[Link]

List the NC code for the current drawing.

Syntax

[Link]

[Link]

Mirror selected geometries, tool paths and text in given work plane.

Syntax

[Link] (WorkPlane, KeepOriginal)

WorkPlane WorkPlane The plane to mirror in

Bool KeepOriginal True to keep original items, False to delete them

[Link]

This is equivalent to the Machine | Machine Configuration | Move Part command.

Syntax

[Link](X, Y, Z)

double X distance to move the part in X

double Y distance to move the part in Y

double Z distance to move the part in Z

[Link] 2026-03-29
Objects - Objects Page 86 of 375

[Link]

Set the current graphics position. See [Link].

Syntax

[Link] (X, Y, Z)

double X X Global coordinate

double Y Y Global coordinate

double Z Z Global coordinate

[Link]

Order the geometries or tool paths in a specified order.

Syntax

[Link] (Ordered)

Paths Ordered Paths collection giving required order

Remarks

The parameter Ordered contains some or all of the geometries or tool paths (not both) in the drawing.
The paths will be ordered to match the order of the paths in this collection.

This example will reverse the order of the geometries in the drawing:

Public Sub ReverseGeometryOrder()

Dim I As Integer
Dim PS1 As Paths, PS2 As Paths
Set PS1 = [Link]
Set PS2 = [Link]

For I = [Link] To 1 Step -1


[Link] PS1(I)
Next I

[Link] PS2

End Sub

This example will order the paths on the second nested sheet on the Y coordinate:

Public Sub OrderSheetY()

[Link] 2026-03-29
Objects - Objects Page 87 of 375

Dim NI As NestInformation
Set NI = [Link]

OrderOnY [Link](2).Paths

End Sub

' Order given paths using Y coordinate

' PS1 may be some or all of the paths in the drawing,

' for example, all the paths in one nested sheet

Public Sub OrderOnY(PS1 As Paths)

Dim PS2 As Paths, PS3 As Paths


' Duplicate the collection so that Remove can be used
Set PS2 = [Link]
Dim P As Path, P2 As Path
Dim I As Integer
Dim YMin As Double, Y As Double
Dim MinX As Double, MinY As Double, MaxX As Double, MaxY As Double

' Create new collection with paths with lowest Y first


' The path in PS2 with lowest Y will be found and removed from PS2
' and added to PS3
Set PS3 = [Link]
For I = 1 To [Link]
Set P2 = Nothing
For Each P In PS2
If [Link](MinX, MinY, MaxX, MaxY) Then
Y = (MaxY + MinY) * 0.5
If P2 Is Nothing Or Y < YMin Then
Set P2 = P
YMin = Y
End If
End If
Next P
If Not (P2 Is Nothing) Then
[Link] P2
[Link] P2
End If
Next I

' Now re-order the paths to match this collection


[Link] PS3

End Sub

[Link]

[Link] 2026-03-29
Objects - Objects Page 88 of 375

Order selected geometries.

Syntax

[Link] (FirstPath)

Path FirstPath Path to start at

The example will order the geometries starting with the last one:

Public Sub OrderTest()

Dim Drw As Drawing


Set Drw = [Link]
Dim P As Path
Set P = [Link]

[Link] True

[Link] P

End Sub

[Link]

Order the work planes based on the given parameters.

Syntax

[Link] (RotateAbout, FiveAxisControl, CWOrder, CWTilt, ReOrderToolpaths,


OnlyPlanesWithToolPaths, ClearEmptyWorkPlanes)

AcamOrderWPRotateAbout RotateAbout

AcamOrderWP5AxisControl FiveAxisControl

boolean CWOrder True will order the work planes in a clockwise fashion

boolean CWTilt True will consider clockwise tilt when ordering for 4/5 axis

boolean ReOrderToolpaths True to order work planes containing tool paths

boolean OnlyPlanesWithToolPaths True to order only work planes containing tool paths

boolean ClearEmptyWorkPlanes True to delete all empty work planes

[Return] long Number of work planes that were ordered

Remarks

[Link] 2026-03-29
Objects - Objects Page 89 of 375

RotateAbout takes one of the values:

acamOrderWPRotateX = 0 to rotate about the X axis

acamOrderWPRotateY = 1 to rotate about the Y axis

acamOrderWPRotateXZ = 2 to rotate about the X and Z axes (for 4/5-axis)

acamOrderWPRotateYZ = 3 to rotate about the Y and Z axes (for 4/5-axis)

FiveAxisControl takes one of the values:

acamOrderWPXYGTZ = 0 rotation about the X axis takes priority over the Z axis

acamOrderWPZGTXY = 1 rotation about the Z axis takes priority over the X axis

acamOrderWPClosestVector = 2 orders to the next nearest work plane

FiveAxisControl is only used if RotateAbout is set to acamOrderWPRotateXZ or


acamOrderWPRotateXZ

CWOrder is only used if RotateAbout is set to acamOrderWPRotateX or acamOrderWPRotateY

CWOrder is only used if RotateAbout is set to acamOrderWPRotateX or acamOrderWPRotateY

CWTilt is only used if RotateAbout is set to acamOrderWPRotateXZ or acamOrderWPRotateXZ

[Link]

Output the NC code for the current drawing to disk or machine or both.

Syntax

[Link] (Name, OutputTo, VisibleOnly)

String Name Complete path name to save code to (unless Machine only)

short OutputTo Disk file or machine or both, see remarks

boolean VisibleOnly True to output visible operations only

Remarks

OutputTo takes one of the values:

[Link] 2026-03-29
Objects - Objects Page 90 of 375

acamOutNcFILE = 0 to disk file only

acamOutNcMC = 1 to machine only

acamOutNcBOTH = 2 to both

acamOutNcASK = -1 show dialog box giving above options

[Link]

Print the drawing to the current printer.

Syntax

[Link] (DrawAxes, Mono, Orientation, [Scale])

boolean DrawAxes True to draw axes

boolean Mono True to only use black

AcamOrient Orientation acamOrientPORTRAIT or acamOrientLANDSCAPE

double Scale (Optional) Scale for drawing, omit for auto-scale

[Link]

Project selected geometries to selected surfaces.

Syntax

[Link] (StepLength, Tolerance, Direction)

double StepLength Step length

double Tolerance Tolerance

AcamProjectDirection Direction Project direction, acamProjectDirectionNORMAL_TO_OLD_PLANE


or acamProjectDirectionNORMAL_TO_NEW_PLANE

Remarks

The geometries to be projected and the surfaces should be selected by setting the Selected property
before calling this routine.

[Link]

Project selected geometries to given work plane.

Syntax

[Link] 2026-03-29
Objects - Objects Page 91 of 375

[Link] (WP, StepLength, Tolerance, Direction)

WorkPlane WP The work plane to project to

double StepLength Step length

double Tolerance Tolerance

AcamProjectDirection Direction Project direction, acamProjectDirectionNORMAL_TO_OLD_PLANE


or acamProjectDirectionNORMAL_TO_NEW_PLANE

Remarks

The geometries to be projected should be selected by setting the Selected property before calling this
routine.

[Link]

Project selected tool paths to selected surfaces.

Syntax

[Link] (StepLength, Tolerance, Direction, Axis, ToolAngle, ProjectPoint)

double StepLength Step length

double Tolerance Tolerance

AcamProjectDirection Direction Project direction, acamProjectDirectionNORMAL_TO_OLD_PLANE


or acamProjectDirectionNORMAL_TO_NEW_PLANE

AcamAxis Axis Tool axis, acamAxis3, acamAxis5 etc.

AcamProjectToolAngle ToolAngle Tool angle, acamProjectToolAnglePROJECTION or


acamProjectToolAngleSURFACE_NORMAL

typeAcamProjectPoint ProjectPoint Project tip or contact point, acamProjectTOOL_TIP or


acamProjectCONTACT_POINT

Remarks

The tool paths to be projected and the surfaces should be selected by setting the Selected property before
calling this routine.

Drawing.ProjectGeometriesToSurfaces2

Project selected geometries to selected surfaces.

Syntax

[Link] 2026-03-29
Objects - Objects Page 92 of 375

drw.ProjectGeometriesToSurfaces2 (StepLength, Tolerance, Direction)

double StepLength Step length

double Tolerance Tolerance

AcamProjectDirection Direction Project direction, acamProjectDirectionNORMAL_TO_OLD_PLANE


or acamProjectDirectionNORMAL_TO_NEW_PLANE

[Return] Paths Collection of projected paths

Remarks

The geometries to be projected and the surfaces should be selected by setting the Selected property
before calling this routine.

[Link]

Project selected tool paths to given work plane.

Syntax

[Link] (WP, StepLength, Tolerance, Direction, Axis, ToolAngle)

WorkPlane WP The work plane to project to

double StepLength Step length

double Tolerance Tolerance

AcamProjectDirection Direction Project direction, acamProjectDirectionNORMAL_TO_OLD_PLANE


or acamProjectDirectionNORMAL_TO_NEW_PLANE

AcamAxis Axis Tool axis, acamAxis3, acamAxis5 etc.

AcamProjectToolAngle ToolAngle Tool angle, acamProjectToolAnglePROJECTION or


acamProjectToolAngleSURFACE_NORMAL

Remarks

The tool paths to be projected should be selected by setting the Selected property before calling this
routine.

[Link]

Redraw the display.

Syntax

[Link]

[Link] 2026-03-29
Objects - Objects Page 93 of 375

[Link]

Redraw the shaded views only.

Syntax

[Link]

Remarks

Use this at the end of a sequence of operations which may have drawn on the display. It will redraw just
the shaded views to ensure they are uptodate.

[Link]

Rebuild the display lists for the shaded views.

Syntax

[Link]

[Link]

Remove cross-hair cursor drawn by [Link]

Syntax

[Link]

[Link]

This is equivalent to the Machine | Machine Configuration | Rotate Part command.

Syntax

[Link](Angle, X1, Y1, Z1, X2, Y2, Z2)

double Angle Angle in degrees to rotate by, CW -ve.

double X1

double Y1 Global XYZ coordinates of first point on axis to rotate about.

double Z1

double X2

double Y2 Global XYZ coordinates of second point on axis to rotate about.

[Link] 2026-03-29
Objects - Objects Page 94 of 375

double Z2

[Link]

Run geometry query on this drawing which may be temporary.

Syntax

[Link](FileName)

String FileName The geometry query file to be run

[Return] long Number of rules that were successfully applied

[Link]

Save the current drawing using its current file name. If it is a new drawing and does not have a file name
the SaveAs dialog box will be shown.

Syntax

[Link]

[Link]

Save the current drawing to given file name.

Syntax

[Link] (Name)

String Name Complete path name to save to

[Link]

Save the current drawing to given file name, compatible with the specified version.

Syntax

[Link] (Name, Version)

String Name Complete path name to save to

AcamSaveAsVersion Version

Remarks

Version takes one of the values:

[Link] 2026-03-29
Objects - Objects Page 95 of 375

acamSaveAsCurrent = 0 to use current version (Same as SaveAs)

acamSaveAsV6 = 1 to use V6 version

acamSaveAsV7 = 2 to use V7 version

[Link]

Save a DXF File for the current drawing to given file name.

Syntax

[Link] (Name, VisibleOnly, DecimalPlaces)

String Name Complete path name to save to

boolean VisibleOnly True to only save visible geometries

short DecimalPlaces Number of decimal places to write

[Link]

Save an Enhanced Meta File for the current drawing to given file name.

Syntax

[Link] (Name, DrawAxes, DrawBackground)

String Name Complete path name to save to

boolean DrawAxes True to draw axes

boolean DrawBackground True to draw background

Example.

To produce a picture suitable for printing, the window background should be white. The example shows
how the background colour can be temporarily set to white and then reset. The user will not see the
screen colour change, as Redraw is not called.

Dim Drw As Drawing


Set Drw = [Link]
Dim SaveCol As Integer
SaveCol = [Link]
[Link] = acamWHITE
[Link] "C:\temp\[Link]", False, False
[Link] = SaveCol

[Link]

[Link] 2026-03-29
Objects - Objects Page 96 of 375

Save an IGES File for the current drawing to given file name.

Syntax

[Link] (Name, VisibleOnly, Units)

String Name Complete path name to save to

boolean VisibleOnly True to only save visible geometries

AcamUnits Units acamUnitsINCH or acamUnitsMETRIC

[Link]

Save an STL File for specified items in the current drawing to given file name.

Syntax

[Link] (Name, Type, Tolerance)

String Name Complete path name to save to

AcamSTLType Type acamSTLTypeSTL = save the STL model(s), acamSTLTypeSURFACES = facet


the surfaces and save as STL, acamSTLTypePARASOLID = facet the current Parasolid model(s) and
save as STL.

Double Tolerance Facet tolerance

[Link]

Save a Windows Meta File for the current drawing to given file name.

Syntax

[Link] (Name, DrawAxes, DrawBackground)

String Name Complete path name to save to

boolean DrawAxes True to draw axes

boolean DrawBackground True to draw background

Example.

To produce a picture suitable for printing, the window background should be white. The example shows
how the background colour can be temporarily set to white and then reset. The user will not see the
screen colour change, as Redraw is not called.

[Link] 2026-03-29
Objects - Objects Page 97 of 375

Dim Drw As Drawing


Set Drw = [Link]
Dim SaveCol As Integer
SaveCol = [Link]
[Link] = acamWHITE
[Link] "C:\temp\[Link]", False, False
[Link] = SaveCol

[Link]

Produce a section of all the geometry (surfaces, splines, geometries) in the drawing, using a work plane.

Syntax

[Link] (Wp, CircleDiameter)

WorkPlane Wp The work plane to slice the geometries with.

double CircleDiameter Diameter of circle to draw at geometries intersecting Wp

[Return] Layer Returned Layer containing the section paths.

[Link]

Produce sections of the current STL model, parallel to the current work plane.

Syntax

[Link] (StartDistance, Step)

double StartDistance Distance from work plane of first section

double Step Distance between sections

[Return] Layers Returned Layer Collection. Each layer contains paths for one section

[Link]

Produce sections of the currently selected surfaces, perpendicular to the given guide line.

Syntax

[Link](GuideLine, Step)

Path GuideLine Path to control sections, sections will be perp. to this

double Step Distance between sections

[Return] Paths Returned Path Collection of sections

[Link] 2026-03-29
Objects - Objects Page 98 of 375

[Link]

Select the current material by name.

Syntax

[Link] (Name)

String Name Name of material in material data file (eg [Link])

The example will make the material "Cast Iron" in the material data file the current material.

Dim drw As Drawing

Set drw = [Link]

[Link] "Cast Iron"

[Link]

Set the selected property for all geometries, and redraw them.

Syntax

[Link] (Selected)

boolean Selected Value to set, true or false

[Link]

Set the active user layer for the drawing.

Syntax

[Link] (Layer)

Layer Layer layer object

See the example.

[Link]

Set the current material using a Material object.

Syntax

[Link] (Material)

Material Material Material object

[Link] 2026-03-29
Objects - Objects Page 99 of 375

Remarks

See [Link] for an example.

[Link]

Set the snap mode to be used for the next user-input command.

Syntax

[Link] (Snap, Sticky, MustSnap)

AcamSnap Snap The mode to be set eg acamSnapEND

Boolean Sticky True to leave the snap mode set after the next command (As in eg CTRL-F6)

Boolean MustSnap True to force the user to use the set snap mode, ie it can not be cancelled

[Link] (Lathe only)

Set the Z-shift for the Sub-Spindle work plane.

Syntax

[Link] (ZShift)

double ZShift Sub-Spindle datum Z-Shift

[Return] WorkPlane WorkPlane object

Remarks

Use [Link] to create the work plane if it doesn't exist.

[Link]

Set the selected property for all tool paths, and redraw them.

Syntax

[Link] (Selected)

boolean Selected Value to set, true or false

[Link]

Set tool side automatically for currently selected geometries.

[Link] 2026-03-29
Objects - Objects Page 100 of 375

Syntax

[Link] (Type)

boolean Type acamToolSidePOCKET or acamToolSideCUT, see remarks

Remarks

If type = acamToolSidePOCKET, the tool will be put on the inside of the outermost geometry, for
pocketing, for example. If it is acamToolSideCUT, it will be put on the outside of the outermost
geometry, for cutting the shape out of material, for example. The tool will be put on alternate sides of
internal geometries.

[Link]

Set the current work plane for the drawing.

Syntax

[Link] wp

WorkPlane wp WorkPlane object

Example 1, create a work plane and make it the current work plane:

Dim drw As Drawing

Set drw = [Link]

Dim wp As WorkPlane

Set wp = [Link] (100, 0, 0, 100, 1, 0, 100, 0, 1)

[Link] wp

Example 2, get the work plane for the last geometry and make it the current work plane:

Dim drw As Drawing

Set drw = [Link]

Dim wp As WorkPlane

Dim p As Path

Set p = [Link]

Set wp = [Link]

[Link] wp

[Link] 2026-03-29
Objects - Objects Page 101 of 375

Example 3, do the same as example 2 but with half the code!

Dim drw As Drawing

Set drw = [Link]

[Link] [Link]

[Link]

Set XOR (Exclusive-OR) mode for drawing using [Link] and [Link].

SetXORMode automatically sets the colour so that the lines will be drawn white on the current
background. This method allows any colour to be used, as set by the properties DrawingColor or
DrawingColorRGB.

Syntax

[Link](On)

boolean On True to set XOR mode, False to set normal mode

Remarks

XOR mode is used to draw lines that you want to remove without erasing the drawing underneath. For
example, Alphacam uses it to draw the cross-hair cursor. It is drawn at the position of the mouse and
when the mouse moves it is drawn again at the old position, which removes it, and redrawn at the new
position.

[Link]

Set XOR (Exclusive-OR) mode for drawing using [Link] and [Link].

Syntax

[Link](On)

boolean On True to set XOR mode, False to set normal mode

Remarks

XOR mode is used to draw lines that you want to remove without erasing the drawing underneath. For
example, Alphacam uses it to draw the cross-hair cursor. It is drawn at the position of the mouse and
when the mouse moves it is drawn again at the old position, which removes it, and redrawn at the new
position.

[Link]

Set the Device Context (DC) to be used for subsequent API drawing methods. This is mainly for C++
users, as VBA does not give access to a DC. It is used to redirect drawing to a window supplied by the

[Link] 2026-03-29
Objects - Objects Page 102 of 375

Add-In.

Syntax

[Link] (Hdc, XPixelLeft, YPixelTop, XPixelRight,


YPixelBottom, XUserMin, YUserMin, XUserMax, YUserMax)

long Hdc Handle of device context

long XPixelLeft see remarks

long YPixelTop

long XPixelRight

long YPixelBottom

double XUserMin see remarks

double YUserMin

double XUserMax

double YUserMax

Remarks

XPixelLeft, YPixelTop, XPixelRight, YPixelBottom give the pixel client coordinates of the window to
be drawn into.

XUserMin, YUserMin, XUserMax, YUserMax give the user coordinates of the box that is to be scaled
to fit the window.

[Link] should be called after the required drawing is done.

See Addin1-V75 in the ExampleFiles\API\VisualCPP folder on the Alphacam DVD for an example.

[Link]

Stop using the Device Context (DC) set in StartDrawingInDC.

Syntax

[Link]

Remarks

See StartDrawingInDC.

[Link]

[Link] 2026-03-29
Objects - Objects Page 103 of 375

Create a surface using the currently selected geometries.

Syntax

[Link]

[Link]

Create a surface using the currently selected geometries.

Syntax

drw.SurfaceFromGeoSections2 (Tolerance)

double Tolerance Tolerance for surface fitting

[Return] Surface The fitted surface

[Link]

Do the Undo command, no prompt will be shown.

Syntax

[Link]

Drawing.UserGet2DPoint

Ask the user for a 2D point, anywhere in the drawing.

Syntax

drw.UserGet2DPoint(Prompt, X, Y)

String Prompt Text to display in prompt bar

double X Returned X coordinate

double Y Returned Y coordinate

[Return] AcamUser Return value, acamUserSELECT if point selected, acamUserESCAPE if user


cancelled, acamUserABORT if the user picked another command.

Drawing.UserGet2DPointWithCallBack

Ask the user for a 2D point, calling a user-defined function as the pointer moves.

Syntax

drw.UserGet2DPointWithCallBack (Prompt, Function, X, Y)

[Link] 2026-03-29
Objects - Objects Page 104 of 375

String Prompt Text to display in prompt bar

String Function Function to call while pointer moves

double X Returned X coordinate

double Y Returned Y coordinate

[Return] AcamUser Return value, acamUserSELECT if point selected, acamUserESCAPE if user


cancelled, acamUserABORT if the user picked another command.

Remarks

For VBA, the project must be in StartUp or Sysmacro, and the function must be in the Events module,
and must have the same parameters as in the example.

The example draws a rectangle while the pointer moves:

Private X1 As Double

Private Y1 As Double

Public Sub DrawShape(Action As Integer, X As Double, Y As Double)

' Draw the shape

With [Link]
.MoveTo X1, Y1, 0
.DrawTo X, Y1, 0
.DrawTo X, Y, 0
.DrawTo X1, Y, 0
.DrawTo X1, Y1, 0
End With

End Sub

Public Sub TestDrawShape()

X1 = 50
Y1 = 25
Dim X As Double, Y As Double
Dim Drw As Drawing
Set Drw = [Link]
Drw.UserGet2DPointWithCallBack "shape", "DrawShape", X, Y
MsgBox "X,Y = " & X & ", " & Y

End Sub

The following is an example in a C++ DLL:

[Link] 2026-03-29
Objects - Objects Page 105 of 375

// Function called by Alphacam as the pointer moves

ACAMAPIFUN(void) DrawShape(VARIANT var_acam, short action, double X, double Y) // must put


in .DEF file

AFX_MANAGE_STATE(AfxGetStaticModuleState());

IAlphaCamAppPtr pApp(var_acam.pdispVal); // pApp is pointer to Application object

IDrawingPtr pDrw(pApp->ActiveDrawing);

pDrw->MoveTo(0., 0., 0.);

pDrw->DrawTo(X, Y, 0.);

pDrw->DrawTo(100., 100., 0.);

ACAMAPIFUN(void) CmdTestDrawShape(VARIANT var_acam) // must put in .DEF file

AFX_MANAGE_STATE(AfxGetStaticModuleState());

IAlphaCamAppPtr pApp(var_acam.pdispVal); // pApp is pointer to Application object

IDrawingPtr pDrw(pApp->ActiveDrawing);

double x = 0, y =0;

AcamUser ret = pDrw->UserGet2DPointWithCallBack("Set Shape Mid-Point", "DrawShape", &x,


&y);

if(ret == acamUserSELECT)

pDrw->Create2DLine(0., 0., x, y);

pDrw->Create2DLine(x, y, 100., 100.);

Drawing.UserGet2DPointWithRubberBand

[Link] 2026-03-29
Objects - Objects Page 106 of 375

Ask the user for a 2D point, drawing a "rubber-band" line or arc from a given point or points.

Syntax

drw.UserGet2DPointWithRubberBand(Prompt, Type, X1, Y1, X2, Y2, X, Y)

String Prompt Text to display in prompt bar

AcamRubberBandType Type what to draw while pointer moves

double X1 X coordinate of first point

double Y1 Y coordinate of first point

double X2 X coordinate of second point

double Y2 Y coordinate of second point

double X Returned X coordinate

double Y Returned Y coordinate

[Return] AcamUser Return value, acamUserSELECT if point selected, acamUserESCAPE if user


cancelled, acamUserABORT if the user picked another command.

Remarks

The Type parameter determines what is drawn while the mouse pointer moves. It can be:

AcamRubberBandLINE

A line is drawn from X1, Y1 to the pointer.

AcamRubberBand2LINES

A line is drawn from X1, Y1 to the pointer, and from the pointer to X2, Y2.

AcamRubberBandRECTANGLE

A rectangle is drawn with one corner at X1, Y1 and one at the pointer

AcamRubberBandCIRCLE

A circle is drawn, through the pointer, centre is X1, Y1.

AcamRubberBandARC_3POINTS

An arc is drawn from X1, Y1 through X2, Y2, to the pointer.

AcamRubberBandARC_CENTER

[Link] 2026-03-29
Objects - Objects Page 107 of 375

An arc is drawn from X1, Y1, centre is X2, Y2

AcamRubberBandARC_VECTOR

An arc is drawn from X1, Y1, direction vector is X2, Y2, to the pointer.

AcamRubberBandARC_2POINTS_CENTER

An arc is drawn from X1, Y1 to X2, Y2, the centre is the point closest to the pointer on the line of
possible centres.

If X2 and Y2 are not needed, for example for AcamRubberBandLINE, pass 0, 0.

The example lets the user draw a geometry made up of lines:

Public Sub TestRubberBandLine()

Dim Drw As Drawing


Set Drw = [Link]
Dim X1 As Double, Y1 As Double
Dim X3 As Double, Y3 As Double
Drw.UserGet2DPoint "Line: First Point", X1, Y1
Do
Dim Ret As Integer
Ret = Drw.UserGet2DPointWithRubberBand("Line: Next Point", AcamRubberBandLINE, X1, Y1, 0, 0,
X3, Y3)
If Ret = acamUserSELECT Then
Dim P As Path
Set P = Drw.Create2DLine(X1, Y1, X3, Y3)
[Link] = True ' for Join command at end
X1 = X3
Y1 = Y3
End If
Loop Until Ret <> acamUserSELECT
[Link]

End Sub

Drawing.UserGet3DPoint

Ask the user for a 3D point, anywhere in the drawing.

Syntax

drw.UserGet3DPoint(Prompt, X, Y, Z)

String Prompt Text to display in prompt bar

double X Returned X coordinate

[Link] 2026-03-29
Objects - Objects Page 108 of 375

double Y Returned Y coordinate

double Z Returned Z coordinate

[Return] AcamUser Return value, acamUserSELECT if point selected, acamUserESCAPE if user


cancelled, acamUserABORT if the user picked another command.

Drawing.UserGet3DPointWithCallBack

Ask the user for a 3D point, calling a user-defined function as the pointer moves.

Syntax

drw.UserGet3DPointWithCallBack (Prompt, Function, X, Y, Z)

String Prompt Text to display in prompt bar

String Function Function to call while pointer moves

double X Returned X coordinate

double Y Returned Y coordinate

double Z Returned Z coordinate

[Return] AcamUser Return value, acamUserSELECT if point selected, acamUserESCAPE if user


cancelled, acamUserABORT if the user picked another command.

Remarks

For VBA, the project must be in StartUp or Sysmacro, and the function must be in the Events module,
and must have the same parameters as in the example.

The example draws a rectangle while the pointer moves:

Private X1 As Double

Private Y1 As Double

Private Z1 As Double

Public Sub DrawShape(Action As Integer, X As Double, Y As Double, Z As Double)

' Draw the shape

With [Link]
.MoveTo X1, Y1, Z
.DrawTo X, Y1, Z
.DrawTo X, Y, Z
.DrawTo X1, Y, Z

[Link] 2026-03-29
Objects - Objects Page 109 of 375

.DrawTo X1, Y1, Z1


End With

End Sub

Public Sub TestDrawShape()

X1 = 50
Y1 = 25
Z1 = 0
Dim X As Double, Y As Double, Z As Double
Dim Drw As Drawing
Set Drw = [Link]
Drw.UserGet3DPointWithCallBack "shape", "DrawShape", X, Y, Z
MsgBox "X,Y,Z = " & X & ", " & Y & ", " & Z

End Sub

The following is an example in a C++ DLL:

// Function called by Alphacam as the pointer moves

ACAMAPIFUN(void) DrawShape(VARIANT var_acam, short action, double X, double Y, double Z) //


must put in .DEF file

AFX_MANAGE_STATE(AfxGetStaticModuleState());

IAlphaCamAppPtr pApp(var_acam.pdispVal); // pApp is pointer to Application object

IDrawingPtr pDrw(pApp->ActiveDrawing);

pDrw->MoveTo(0., 0., 0.);

pDrw->DrawTo(X, Y, Z);

pDrw->DrawTo(100., 100., 0.);

ACAMAPIFUN(void) CmdTestDrawShape(VARIANT var_acam) // must put in .DEF file

AFX_MANAGE_STATE(AfxGetStaticModuleState());

IAlphaCamAppPtr pApp(var_acam.pdispVal); // pApp is pointer to Application object

IDrawingPtr pDrw(pApp->ActiveDrawing);

[Link] 2026-03-29
Objects - Objects Page 110 of 375

double x = 0, y = 0, z = 0;

AcamUser ret = pDrw->UserGet3DPointWithCallBack("Set Shape Mid-Point", "DrawShape", &x, &y,


&z);

if(ret == acamUserSELECT)

// Use x, y, z

[Link]

Ask the user to select objects supported by the calling add-in.

Syntax

[Link](Prompt, Flags)

String Prompt Text to display in prompt bar

Int Flags reserved, should be 0

[Return] Boolean True if object selected

Drawing.UserSelectMultiAddinObjects2

Ask the user to select objects supported by the specified add-in.

Syntax

drw.UserSelectMultiAddinObjects2(Prompt, Flags, AddinFileName)

String Prompt Text to display in prompt bar

Int Flags reserved, should be 0

String AddinFileName File name (no path or extension) or complete path name of add-in

[Return] Boolean True if object selected

[Link]

[Link] 2026-03-29
Objects - Objects Page 111 of 375

Ask the user to select multiple geometries.

Syntax

[Link] (Prompt, Flags)

String Prompt Text to display in prompt bar

long Flags Reserved - should be 0

[Return] boolean True if OK, False if user cancels

Remarks

The user will be prompted to select geometries using the normal Alphacam selection routine, allowing
picking one at time or using a window.

See [Link].

If the return value is True then the geometries should be looped through, testing the Selected property,
as in the example below. Note that the Selected property on each geometry should be reset, otherwise
the selected geometries will be drawn selected on redraws.

Dim drw As Drawing


Set drw = [Link]

If [Link]("Select Geometries", 0) Then


Dim Geo As Path
For Each Geo In [Link]
If [Link] Then
' do something with geo….
[Link] = False
[Link]
End If
Next Geo
End If

[Link]

Ask the user to select multiple geometries, and return a Paths Collection.

Syntax

[Link](Prompt, Flags)

String Prompt Text to display in prompt bar

long Flags Reserved - should be 0

[Return] Paths Paths object

[Link] 2026-03-29
Objects - Objects Page 112 of 375

Remarks

The user will be prompted to select geometries using the normal Alphacam selection routine, allowing
picking one at time or using a window.

See [Link].

The selected geometries will be returned as a Paths Collection. Note that the Selected property will
NOT be set. They may be accessed as shown in the example below.

If no geometries are selected an empty collection will be returned ie the Count property will be 0.

Example 1:

Public Sub SelectCollection()

Dim drw As Drawing


Set drw = [Link]

Dim Geos as Paths


Set Geos = [Link]("Select Geometries", 0)
If [Link] > 0 Then
Dim Geo As Path
For Each Geo In Geos
' do something with Geo
[Link] 0.5, 0, 0
Next Geo
End If

End Sub

Example 2:

Do multiple rough/finish paths on selected geometries. The geometries are selected using a Paths
Collection so they can be reselected with a single command.

Public Sub CollectionExample2()

Const NPass As Integer = 5


Const StockStep As Double = 0.5
Dim IPass As Integer
Dim Drw As Drawing
Set Drw = [Link]

Dim Geos As Paths


Set Geos = [Link]("Multi Finish: Select Geometries", 0)
If [Link] = 0 Then End

' Set tool sides for rough/finish


[Link] = True

[Link] 2026-03-29
Objects - Objects Page 113 of 375

[Link] acamToolSideCUT

[Link] [Link] & "LICOMDAT\[Link]\Flat - [Link]"

For IPass = 1 To NPass


Dim MD As MillData
Set MD = [Link]
[Link] = 25
[Link] = 2
[Link] = -8

[Link] = StockStep * (NPass - IPass)

[Link] = True ' select all the paths in the collection

[Link]
Next IPass

End Sub

Drawing.UserSelectMultiGeosCollection2

Ask the user to select multiple geometries, and return a Paths Collection.

Syntax

drw.UserSelectMultiGeosCollection2(Prompt, Flags)

String Prompt Text to display in prompt bar

long Flags see remarks

[Return] Paths Paths object

Remarks

As UserSelectMultiGeosCollection but no selection flags are set. Flags consists of values from
AcamSelectFlags combined using "or". If Flags is passed as (acamSelectDRAW_SELECTED Or
acamSelectDONT_CHANGE_WP Or acamSelectSELECT_ANY_WP) then this is equivalent to
UserSelectMultiGeosCollection.

[Link]

Ask the user to select multiple geometries, tool paths, and optionally, text, splines and surfaces.

Syntax

[Link] (Prompt, Flags)

[Link] 2026-03-29
Objects - Objects Page 114 of 375

String Prompt Text to display in prompt bar

long Flags 0, or acamSelectTEXT or acamSelectSPLINES or acamSelectSURFACES (or the sum)

[Return] boolean True if OK, False if user cancels

Remarks

The user will be prompted to select using the normal Alphacam selection routine, allowing picking one
at time or using a window.

See [Link].

If the return value is True then the Drawing collections (Geometries, ToolPaths) should be looped
through, testing the Selected property, as in the example for UserSelectMultiGeos. Note that the
Selected property on each object should be reset, otherwise the selected objects will be drawn selected
on redraws. If acamSelectTEXT is specified for the Flags parameter, then the Text collection should
also be checked. If acamSelectSPLINES is specified for the Flags parameter, then the Splines collection
should also be checked. If acamSelectSURFACES is specified then the Surfaces collection should also
be checked. To allow both splines and surfaces use acamSelectSPLINES + acamSelectSURFACES.
Add acamSelectTEXT if text is also required.

[Link]

Ask the user to select multiple splines.

Syntax

[Link] (Prompt, Flags)

String Prompt Text to display in prompt bar

long Flags Reserved - should be 0

[Return] boolean True if OK, False if user cancels

Remarks

The user will be prompted to select splines using the normal Alphacam selection routine, allowing
picking one at time or using a window.

See [Link].

If the return value is True then the splines collection should be looped through, testing the Selected
property. Note that the Selected property on each spline should be reset, otherwise the selected splines
will be drawn selected on redraws.

[Link]

Ask the user to select multiple surfaces.

[Link] 2026-03-29
Objects - Objects Page 115 of 375

Syntax

[Link] (Prompt, Flags)

String Prompt Text to display in prompt bar

long Flags Reserved - should be 0

[Return] boolean True if OK, False if user cancels

Remarks

The user will be prompted to select surfaces using the normal Alphacam selection routine, allowing
picking one at time or using a window.

See [Link].

If the return value is True then the surfaces collection should be looped through, testing the Selected
property. Note that the Selected property on each surface should be reset, otherwise the selected
surfaces will be drawn selected on redraws.

[Link]

Ask the user to select multiple text objects.

Syntax

[Link] (Prompt, Flags)

String Prompt Text to display in prompt bar

long Flags Reserved - should be 0

[Return] boolean True if OK, False if user cancels

Remarks

The user will be prompted to select text using the normal Alphacam selection routine, allowing picking
one at time or using a window.

See [Link].

If the return value is True then the text should be looped through, testing the Selected property, as in the
example below. Note that the Selected property on each text object should be reset, otherwise the
selected text will be drawn selected on redraws.

Dim drw As Drawing


Set drw = [Link]

If [Link]("Select Text", 0) Then

[Link] 2026-03-29
Objects - Objects Page 116 of 375

Dim T as Text
For Each T In [Link]
If [Link] Then
' do something with T….
[Link] = False
[Link]
End If
Next T
End If

[Link]

Ask the user to select multiple tool paths.

Syntax

[Link] (Prompt, Flags)

String Prompt Text to display in prompt bar

long Flags Reserved - should be 0

[Return] boolean True if OK, False if user cancels

Remarks

The user will be prompted to select tool paths using the normal Alphacam selection routine, allowing
picking one at time or using a window.

See [Link].

If the return value is True then the tool paths should be looped through, testing the Selected property, as
in the example below. Note that the Selected property on each tool path should be reset, otherwise the
selected tool paths will be drawn selected on redraws.

Dim drw As Drawing


Set drw = [Link]

If [Link]("Select Tool Paths", 0) Then


Dim Tp As Path
For Each Tp In [Link]
If [Link] Then
' do something with Tp….
[Link] = False
[Link]
End If
Next Tp
End If

[Link]

[Link] 2026-03-29
Objects - Objects Page 117 of 375

Ask the user to select one object supported by the calling add-in.

Syntax

[Link](Prompt, Flags)

String Prompt Text to display in prompt bar

Int Flags reserved, should be 0

[Return] Boolean True if object selected

[Link]

Ask the user to select one clamp.

Syntax

[Link] (Prompt)

String Prompt Text to display in prompt bar

[Return] Clamp Clamp object

Remarks

Ask the user to select a single clamp. A Clamp object will be returned. If user cancels (ESC key or
mouse right-button) the special value Nothing will be returned which can be tested for.

[Link]

Ask the user to select one element of a geometry or tool path.

Syntax

[Link] (Prompt, Path)

String Prompt Text to display in prompt bar

Path Path Returned path containing the selected element

[Return] Element Element object

Remarks

Ask the user to select a single element that may be in a geometry or construction or tool path. An
Element object will be returned. If user cancels (ESC key or mouse right-button) the special value
Nothing will be returned which can be tested for.

[Link] 2026-03-29
Objects - Objects Page 118 of 375

See also [Link], [Link], and [Link].

[Link]

Ask the user to select one geometry.

Syntax

[Link] (Prompt)

String Prompt Text to display in prompt bar

[Return] Path Path object

Remarks

Ask the user to select a single geometry. A Path object will be returned. If user cancels (ESC key or
mouse right-button) the special value Nothing will be returned which can be tested for.

See also [Link], [Link], [Link], and


[Link].

Example:

Dim drw As Drawing

Dim p As Path

Set drw = [Link]

Set p = [Link]("Pick Geometry")

If p Is Nothing Then End

' Do something with path

[Link] = True

[Link]

Ask the user to select a geometry or spline.

Syntax

[Link] (Prompt)

String Prompt Text to display in prompt bar

[Link] 2026-03-29
Objects - Objects Page 119 of 375

[Return] Object Path or Spline object

Remarks

Ask the user to select a single geometry or spline. An object will be returned which will be either a Path
or a Spline. See the examples below to see how to extract the Path or Spline. If the user cancels (ESC
key or mouse right-button) the special value Nothing will be returned which can be tested for.

See also [Link], [Link], [Link], and


[Link].

VBA Example:

Dim O As Object

Set O = [Link]("Select a Geometry or Spline")

Dim P As Path

Dim S As Spline

On Error Resume Next

Set P = O

Set S = O

On Error GoTo 0

If Not (P Is Nothing) Then

MsgBox "Geometry " & [Link]

End If

If Not (S Is Nothing) Then

MsgBox "Spline"

End If

C++ Example:

IDispatchPtr pDisp = pDrw->UserSelectOneGeoOrSpline("Select a Geometry or Spline");

IPathPtr pPath = pDisp;

[Link] 2026-03-29
Objects - Objects Page 120 of 375

ISplinePtr pSpline = pDisp;

if(pPath != NULL)

// Geometry Selected

pPath->MoveL(1000., 1000);

else if(pSpline != NULL)

// Spline Selected

pSpline->MoveG(1000., 1000., 0.);

else

// Nothing selected

[Link]

Ask the user to select one geometry or tool path.

Syntax

[Link] (Prompt)

String Prompt Text to display in prompt bar

[Return] Path Path object

Remarks

Ask the user to select a single path that may be a geometry or construction or tool path. A Path object
will be returned. If user cancels (ESC key or mouse right-button) the special value Nothing will be
returned which can be tested for.

See also [Link], [Link], [Link], and


[Link].

[Link] 2026-03-29
Objects - Objects Page 121 of 375

The example shows how to determine the type of path selected

Dim Drw As Drawing


Dim P As Path
Set Drw = [Link]
Set P = [Link]("Select a geometry or tool path")
If P Is Nothing Then End
If [Link] Then
MsgBox "Toolpath"
ElseIf [Link] Then
MsgBox "Construction"
Else
MsgBox "Geometry"
End If

[Link]

Ask the user to select one spline.

Syntax

[Link] (Prompt)

String Prompt Text to display in prompt bar

[Return] Spline Spline object

Remarks

Ask the user to select a single spline. A Spline object will be returned. If user cancels (ESC key or
mouse right-button) the special value Nothing will be returned which can be tested for.

[Link]

Ask the user to select one surface.

Syntax

[Link] (Prompt)

String Prompt Text to display in prompt bar

[Return] Surface Surface object

Remarks

Ask the user to select a single surface. A Surface object will be returned. If user cancels (ESC key or
mouse right-button) the special value Nothing will be returned which can be tested for.

[Link]

[Link] 2026-03-29
Objects - Objects Page 122 of 375

Ask the user to select one tool path.

Syntax

[Link] (Prompt)

String Prompt Text to display in prompt bar

[Return] Path Path object

Remarks

Ask the user to select a single tool path. A Path object will be returned. If user cancels (ESC key or
mouse right-button) the special value Nothing will be returned which can be tested for.

See also [Link], [Link], [Link], and


[Link].

Example:

Dim drw As Drawing

Dim p As Path

Set drw = [Link]

Set p = [Link]("Pick Tool Path")

If p Is Nothing Then End

' Do something with path

[Link] = True

[Link]

Wrap selected geometries on to selected surfaces.

Syntax

[Link] (StepLength, Tolerance, XRef, YRef, ZRef)

double StepLength Step length

double Tolerance Tolerance

double XRef X coordinate of reference point

double YRef Y coordinate of reference point

[Link] 2026-03-29
Objects - Objects Page 123 of 375

double ZRef Z coordinate of reference point

Remarks

The geometries to be wrapped and the surfaces should be selected by setting the Selected property
before calling this routine.

[Link]

Wrap selected tool paths on to selected surfaces.

Syntax

[Link] (StepLength, Tolerance, Axis, XRef, YRef, ZRef)

double StepLength Step length

double Tolerance Tolerance

AcamAxis Axis Tool axis, acamAxis3, acamAxis5 etc.

double XRef X coordinate of reference point

double YRef Y coordinate of reference point

double ZRef Z coordinate of reference point

Remarks

The tool paths to be wrapped and the surfaces should be selected by setting the Selected property before
calling this routine.

[Link]

Zoom the display to fit the drawing extents.

Syntax

[Link]

[Link]

Zoom the XY window to fit the given box.

Syntax

[Link] (X1, Y1, X2, Y2, MarginPerCent)

double X1 Minimum X coordinate

[Link] 2026-03-29
Objects - Objects Page 124 of 375

double Y1 Minimum Y coordinate

double X2 Maximum X coordinate

double Y2 Maximum Y coordinate

double MarginPerCent Margin to leave, as a percentage, 0 - 99, 0 for no margin

[Link]

Zoom the windows to fit the given element

Syntax

[Link] (Element Elem)

Element Elem the element

[Link]

Zoom the windows to fit the given path

Syntax

[Link] (Path Path)

Path Path the path

Drawings Object
A Collection of Drawing objects open in the instance of Alphacam. This is primarily used when
working with multiple temporary drawings.

More:

Drawings Properties

Drawings Properties

Count - (long) Number of items in the collection (read-only)

DrawingOptions Object
Object containing properties which control the display options.

[Link] 2026-03-29
Objects - Objects Page 125 of 375

For example, set the ShowTools property to True to display the tools. The drawing will not be
automatically redrawn. Use [Link] to redraw it, as in the example below:

Dim Drw As Drawing


Set Drw = [Link]
[Link] = True
[Link]

More:

DrawingOptions Properties

DrawingOptions Properties

(All are read-write)

DrawToolPathRapidsInWhite - (boolean) True to show tool path rapids in white, False to show in tool
colour

ShowBothSides - (boolean) True to show the below-center-line geometries in Lathe

ShowBreaks - (boolean) True to show ends of geometries

ShowGhostTools - (boolean) True to show the ghost tools

ShowMaterialCut - (boolean) True to show the material cut by the tool paths

ShowRapids - (boolean) True to show rapids

ShowToolHolder - (boolean) True to show tool holder

ShowToolPathArrows - (boolean) True to show arrows on tool paths

ShowSyncPoints - (boolean) True to show sync points in multi-turret Lathe

ShowTools - (boolean) True to show tools

Element Object
Element Properties

Element Properties

Most Element properties are read-only.

Attribute - See Attributes

CenterXL - (double) Center X Local coordinate (if arc)

[Link] 2026-03-29
Objects - Objects Page 126 of 375

CenterYL - (double) Center Y Local coordinate (if arc)

CenterXG - (double) Center X Global coordinate (if arc)

CenterYG - (double) Center Y Global coordinate (if arc)

CenterZG - (double) Center Z Global coordinate (if arc)

CW - (boolean) True if arc is CW, False if CCW

EndToolVectorX - (double) X component of Tool Vector at end of element

EndToolVectorY - (double) Y component of Tool Vector at end of element

EndToolVectorZ - (double) Z component of Tool Vector at end of element

EndXG - (double) End X Global coordinate

EndXL - (double) End X Local coordinate

EndYG - (double) End Y Global coordinate

EndYL - (double) End Y Local coordinate

EndZG - (double) End Z Global coordinate

EndZL - (double) End Z Local coordinate

Feed - (double) The feed rate for an element, 0 if not set

IncludedAngle - (double) Included Angle of arc. Degrees, always positive

Is3D - (boolean) True if this is a 3D element

Is5Axis - (boolean) True if this is a 5-axis element

IsArc - (boolean) True if this is an arc

IsLine - (boolean) True if this is a line

IsRapid - (boolean) True if this is a rapid element (Line)

IsRapidTag - True if this is a rapid over a tag

LeadExtra - (boolean) True if this is an extra lead-in/out line when multiple-lines used for lead-in or out
(read-write)

LeadIn - (boolean) True if this is a lead-in line or arc (read-write)

LeadOut - (boolean) True if this is a lead-out line or arc (read-write)

[Link] 2026-03-29
Objects - Objects Page 127 of 375

Length - (double) Length of line or arc

Name - (String) Name in the project bar

Path - (Path) The path containing this element

Radius - (double) Radius of arc

SawAngle - (double) Angle of Saw for this Geometry element when [Link] next used. (read-
write)

Slope - (boolean) True if this element is a sloping lead-in or out

StartToolVectorX - (double) X component of Tool Vector at start of element

StartToolVectorY - (double) Y component of Tool Vector at start of element

StartToolVectorZ - (double) Z component of Tool Vector at start of element

StartXG - (double) Start X Global coordinate

StartXL - (double) Start X Local coordinate

StartYG - (double) Start Y Global coordinate

StartYL - (double) Start Y Local coordinate

StartZG - (double) Start Z Global coordinate

StartZL - (double) Start Z Local coordinate

Thread - (boolean) True if this is a threading cut in Lathe

[Link]

Find angle between this element and a given element.

Syntax

[Link] (Element2)

Element Element2 Element object for other element

[Return] double Angle in degrees

Remarks

This is the same as PAC in the post. The angle is the angle that is turned through when going from this
element to the given one. Positive if CCW.

[Link] 2026-03-29
Objects - Objects Page 128 of 375

The example will draw text giving the angle in degrees at the end of each element in the picked
geometry:

Public Sub ElementAngle()

Dim Drw As Drawing


Set Drw = [Link]
[Link] = "TArial"
Dim P1 As Path
Do
Set P1 = [Link]("ANGLES: Pick Geometry")
If Not (P1 Is Nothing) Then
Dim h As Double
h = ([Link] - [Link] + [Link] - [Link]) / 80
Dim E As Element
For Each E In [Link]
Dim Ang As Double
Ang = [Link]([Link])
' Chr(176) is the degrees symbol in a TrueType font
Dim S As String
S = Format(Ang, "0.00") & Chr(176)
' Draw the text and loop for each path in the
' returned collection, marking it as dimension
Dim P2 As Path
For Each P2 In [Link](S, [Link] + h, [Link] + h, h)
[Link] = True
[Link]
Next P2
Next E
End If
Loop Until (P1 Is Nothing)

End Sub

[Link]

Break this element at the specified point.

Syntax

[Link] (X, Y)

Double X, X coordinate of point to break at

Double Y, Y coordinate of point to break at

[Return] Element New element representing the section after the break point

[Link] 2026-03-29
Objects - Objects Page 129 of 375

[Link]

Chamfer this element with another element.

Syntax

[Link] (Element2, Start1, Start2, Dist1, Dist2)

Element Element2 Element object for other element

boolean Start1 True if pick point is at start of elem1, False if at end

boolean Start2 True if pick point is at start of elem2, False if at end

double Dist1 First chamfer distance

double Dist2 Second chamfer distance

[Return] boolean True if OK

The example will draw a geometry and chamfer the 2 corners:

Dim drw As Drawing

Set drw = [Link]

Dim geo As Geo2D, p1 As Path, e1 As Element, e2 As Element

Set geo = drw.Create2DGeometry (0, 0)

[Link] 0, 20

[Link] 40, 20

[Link] 40, 0

Set p1 = [Link]

Set e1 = [Link]

Set e2 = [Link]

[Link] [Link], False, True, 2, 4

[Link] [Link], False, True, 4, 2

[Link]

Fillet this element with another element.

[Link] 2026-03-29
Objects - Objects Page 130 of 375

Syntax

[Link] (Element2, Start1, Start2, Radius)

Element Element2 Element object for other element

boolean Start1 True if pick point is at start of elem1, False if at end

boolean Start2 True if pick point is at start of elem2, False if at end

double Radius Fillet radius

[Return] boolean True if OK

The example will draw 2 intersecting lines and fillet them. Start1 and Start2 are both True so the start of
each line will be kept.

Dim drw As Drawing

Set drw = [Link]

Dim p1 As Path, p2 As Path

Set p1 = drw.Create2DLine (-10, -10, 10, 10)

Set p2 = drw.Create2DLine (10, -10, -10, 10)

[Link] [Link], True, True, 5

[Link]

Fillet this element with another element, using a bubble fillet.

Syntax

[Link] (Element2, Start1, Start2, Radius)

Element Element2 Element object for other element

boolean Start1 True if pick point is at start of elem1, False if at end

boolean Start2 True if pick point is at start of elem2, False if at end

double Radius Fillet radius

[Return] boolean True if OK

[Link]

[Link] 2026-03-29
Objects - Objects Page 131 of 375

Find Local direction of element at given point.

Syntax

[Link] (XP, YP, XDir, YDir, ZDir)

double XP Local X coordinate

double YP Local Y coordinate

double* XDir Returned Local X direction

double* YDir Returned Local Y direction

double* ZDir Returned Local Z direction

[Link]

Get the next element in the path.

Syntax

[Link]

[Return] Element Element object

[Link]

Get the previous element in the path.

Syntax

[Link]

[Return] Element Element object

[Link]

Find intersection point (or points) with another element. The intersection points must lie on the
elements. See [Link] if they do not.

Syntax

[Link] (Element2, X1, Y1, X2, Y2)

Element Element2 Element object for other element

X1 double * X coordinate of first intersection point

Y1 double * Y coordinate of first intersection point

[Link] 2026-03-29
Objects - Objects Page 132 of 375

X2 double * X coordinate of second intersection point

Y2 double * Y coordinate of second intersection point

[Return] long Returned number of intersections found, 0, 1 or 2

Remarks

(X1, Y1) are only valid if the return value is > 0. (X2, Y2) are only valid if the return value is 2.

All coordinates are local coordinates.

The example draws 2 circles and draws a line between the intersection points.

Dim drw As Drawing

Set drw = [Link]

Dim p1 As Path, p2 As Path

Dim e1 As Element, e2 As Element

Set p1 = [Link] (50, 10, 20)

Set p2 = [Link] (80, 40, 30)

Set e1 = [Link]

Set e2 = [Link]

n = [Link] (e2, x1#, y1#, x2#, y2#)

If n = 2 Then

drw.Create2DLine x1#, y1#, x2#, y2#

End If

[Link]

Note: in Basic a variable name ending with # is a double precision variable, as required for this method.
Alternatively, use:

Dim x1 As Double

[Link]

Find intersection point (or points) with another element. The intersection points do not need to be on the
elements, the elements are assumed to be of infinite length. Arcs are assumed to be circles, lines are
asumed to be infinite lines. See [Link].

[Link] 2026-03-29
Objects - Objects Page 133 of 375

Syntax

[Link] (Element2, X1, Y1, X2, Y2)

Element Element2 Element object for other element

X1 double * X coordinate of first intersection point

Y1 double * Y coordinate of first intersection point

X2 double * X coordinate of second intersection point

Y2 double * Y coordinate of second intersection point

[Return] long Returned number of intersections found, 0, 1 or 2

Remarks

(X1, Y1) are only valid if the return value is > 0. (X2, Y2) are only valid if the return value is 2.

All coordinates are local coordinates.

The example draws 2 lines and draws a circle at the imaginary intersection point.

Dim drw As Drawing

Set drw = [Link]

Dim p1 As Path, p2 As Path

Dim e1 As Element, e2 As Element

Set p1 = drw.Create2DLine (0, 0, 10, 10)

Set p2 = drw.Create2DLine (40, 0, 30, 10)

Set e1 = [Link]

Set e2 = [Link]

n = [Link] (e2, x1#, y1#, x2#, y2#)

If n = 1 Then

[Link] 5, x1#, y1#

End If

[Link]

[Link] 2026-03-29
Objects - Objects Page 134 of 375

Note: in Basic a variable name ending with # is a double precision variable, as required for this method.
Alternatively, use:

Dim x1 As Double

[Link]

See if two objects represent the same element. This is NOT a geometric comparison.

Syntax

[Link](Elem2)

Elem2 Element Element object to compare with

[Return] boolean Return value, True if objects are the same

[Link]

Find Global coordinates of point at a given fraction along the element.

See [Link] for local coordinates.

Syntax

[Link] (Fraction, X, Y, Z)

double Fraction Fraction along element, 0 = start, 1 = end

double* X Returned Global X coordinate

double* Y Returned Global Y coordinate

double* Z Returned Global Z coordinate

Remarks

For example, the midpoint of the element is found by

Dim X As Double, Y As Double, Z As Double

[Link] (0.5, X, Y, Z)

[Link]

Find Local coordinates of point at a given fraction along the element.

See [Link] for global coordinates.

Syntax

[Link] 2026-03-29
Objects - Objects Page 135 of 375

[Link] (Fraction, X, Y, Z)

double Fraction Fraction along element, 0 = start, 1 = end

double* X Returned Local X coordinate

double* Y Returned Local Y coordinate

double* Z Returned Local Z coordinate

Remarks

For example, the midpoint of the element is found by

Dim X As Double, Y As Double, Z As Double

[Link] (0.5, X, Y, Z)

[Link]

Redraw this element, in normal or selected colour..

Syntax

[Link](Type)

typeAcamDrawType Type acamDrawTypeSELECTED or acamDrawTypeNORMAL

[Link]

Set the end tool vector if this is a 5-axis element.

Syntax

[Link] (X, Y, Z)

Float X, X component of tool vector

Float Y, Y component of tool vector

Float Z, Z component of tool vector

Remarks

The vector will be normalised.

[Link] 2026-03-29
Objects - Objects Page 136 of 375

[Link]

Set the start tool vector if this is a 5-axis element.

Syntax

[Link] (X, Y, Z)

Float X, X component of tool vector

Float Y, Y component of tool vector

Float Z, Z component of tool vector

Remarks

The vector will be normalised.

FastGeometry Object
An object used to create a 2D Geometry using Alphacam Fast Geometry. Create it with
[Link], use FastGeometry methods to add turns, then finish with
[Link] or [Link]. The Finish methods will return a Path object.

If you are not familiar with Alphacam Fast Geometry, see the Alphacam documentation and help.

Most of the methods have optional parameters. This means that some of the parameters may be left
blank. This is the same as pressing F1 (for Unknown) when using Fast Geometry interactively. VBA
will indicate that a parameter is optional (in the Object Browser and prompts) by enclosing it in square
brackets, for example, [XIntersection].

For example:

The EndDirection parameter is left blank:

[Link]

The XCenter parameter is left blank, the comma (,) must be used so VBA knows that the next
parameter (10) is the value for YCenter. The remaining parameters DirIn and DirOut are also blank,
commas are not needed because they are at the end.

[Link] 50, True, , 10

See [Link] for an example.

[Link]

[Link] 2026-03-29
Objects - Objects Page 137 of 375

Add an Arc To Arc turn.

Syntax

[Link] (Radius, CW, Over180)

Double Radius Blend radius

Boolean CW True for CW, False for CCW

Boolean Over180 True if blend arc is > 180 degrees

[Link]

Add an Arc To Line turn.

Syntax

[Link] (Radius, CW, Over180, LineDirection)

Double Radius Blend radius

Boolean CW True for CW, False for CCW

Boolean Over180 True if blend arc is > 180 degrees

Double LineDirection Direction of line in degrees

[Link]

Add a turn based on the first turn to close and finish the geometry.

Syntax

[Link]

[Return] Path Path object

[Link]

Finish the geometry. If the last turn is an arc with non-zero radius the EndDirection parameter should be
specified to set the direction that the arc ends in. Otherwise it may be left out.

Syntax

[Link] ([EndDirection])

Double EndDirection (Optional) Direction at end of arc in degrees

[Return] Path Path object

[Link] 2026-03-29
Objects - Objects Page 138 of 375

[Link]

Add a Known Arc turn.

Syntax

[Link] (Radius, CW, [XCenter], [YCenter], [DirIn], [DirOut])

Double Radius Blend radius

Boolean CW True for CW, False for CCW

Double XCenter (Optional) X coordinate of centre

Double YCenter (Optional) Y coordinate of centre

Double DirIn (Optional) Direction into turn

Double DirOut (Optional) Direction out of turn

[Link]

Add a Line To Arc turn.

Syntax

[Link] (Radius, CW, Over180, LineDirection, XPointOnLine, YPointOnLine)

Double Radius Blend radius

Boolean CW True for CW, False for CCW

Boolean Over180 True if blend arc is > 180 degrees

Double LineDirection Direction of line in degrees

Double XPointOnLine (Optional) X coordinate of point on line

Double YPointOnLine (Optional) Y coordinate of point on line

Remarks

XPointOnLine and YPointOnLine are only needed if the previous turn is an ArcToLine. They give the
coordinates of a point on the line between the two turns.

[Link]

Add a Line To Line turn with a blend radius.

Syntax

[Link] 2026-03-29
Objects - Objects Page 139 of 375

[Link] (Radius, [XIntersection], [YIntersection], [DirIn], [DirOut], [Length], [Choice])

Double Radius Blend radius

Double XIntersection (Optional) X coordinate of intersection point

Double YIntersection (Optional) Y coordinate of intersection point

Double DirIn (Optional) Direction of line into intersection, in degrees

Double DirOut (Optional) Direction of line out of intersection, in degrees

Double Length (Optional) Length of line to intersection point

Short Choice (Optional) 1 or 2, see remarks

Remarks

If one of X and Y are given, and the Length is given, then there are two solutions. In this case (and only
in this case) Choice should be 1 or 2 to choose between them.

[Link]

Add a Line To Line turn with a chamfer.

Syntax

[Link] (Dist1, Dist2, [XIntersection], [YIntersection], [DirIn], [DirOut], [Length],


[Choice])

Double Dist1 First chamfer distance

Double Dist2 Second chamfer distance

Double XIntersection (Optional) X coordinate of intersection point

Double YIntersection (Optional) Y coordinate of intersection point

Double DirIn (Optional) Direction of line into intersection, in degrees

Double DirOut (Optional) Direction of line out of intersection, in degrees

Double Length (Optional) Length of line to intersection point

Short Choice (Optional) 1 or 2, see remarks

Remarks

If one of X and Y are given, and the Length is given, then there are two solutions. In this case (and only
in this case) Choice should be 1 or 2 to choose between them.

[Link] 2026-03-29
Objects - Objects Page 140 of 375

[Link]

Add a Point turn. (Line To Line turn with zero blend radius.)

Syntax

[Link] ([XIntersection], [YIntersection], [DirIn], [DirOut], [Length], [Choice])

Double XIntersection (Optional) X coordinate of intersection point

Double YIntersection (Optional) Y coordinate of intersection point

Double DirIn (Optional) Direction of line into intersection, in degrees

Double DirOut (Optional) Direction of line out of intersection, in degrees

Double Length (Optional) Length of line to intersection point

Short Choice (Optional) 1 or 2, see remarks

Remarks

If one of X and Y are given, and the Length is given, then there are two solutions. In this case (and only
in this case) Choice should be 1 or 2 to choose between them.

Frame Object
Object representing the main frame of Alphacam. Used to add menu items, read the text file, show a
progress box etc.

More:

Frame Properties

Frame Properties

ClearBeforeCadInput - (boolean) Value of Clear option in Input CAD, for use only in BeforeInputCad
event (read-only)

InNewMessageLoop - (boolean) True if Alphacam is running a second message loop (read-only)

LastMenuCommandID - (long) Command ID of last menu item added by AddMenuItem? methods


(read-only)

PathOfThisAddin - (String) The path, not including the file name, of the file containing this add-in
(read-only)

PathOfThisAddin2 - (String) The complete path, including the file name and extension, of the file
containing this add-in (read-only)

[Link] 2026-03-29
Objects - Objects Page 141 of 375

ProjectBarUpdating - (boolean) Set to False to stop the project bar being updated eg when a lot of paths
are being created by a macro. Set to True when the macro has finished adding paths, the project bar will
then be updated

ProjectBarVisible - (boolean) True if the project bar is visible, False if not. (read-write)

OutputNcVisibleOnly - (boolean) Value of Visible Only option in Output NC, for use only in
BeforeOutputNc and BeforeCreateNc events (read-only)

ViewWindowHandle - (Long) The window handle for the Alphacam view window (read-only)

WindowHandle - (Long) The window handle for the main Alphacam window (read-only)

[Link]

Add a button to a button bar.

Syntax

[Link] (BarID, BmpFileName, CommandID)

AcamButtonBar BarID ID of bar

String BmpFileName File name of button image

Long CommandID ID of command that button will run

Remarks

BarID can be the ID of one of the existing button bars (see AcamButtonBar in the VBA Object
Browser), or it can be the ID returned by a call to [Link], which creates a new button
bar.

BmpFileName is the name of a .BMP file. (The file name only, NOT the complete path name.) It should
be in the same directory as the add-in. It should be a 16-colour bitmap, width = 16, height = 15. In the
API folder on the Alphacam CD is [Link] which can be used as a starter.

CommandID is the ID of the command that the button will run. It will usually be the value of
[Link] after a call to one of the AddMenuItem (2, 3 or 4) methods. It can also be
the ID of an Alphacam command, see AcamCommand in the VBA Object Browser.

See AddMenuItem2 for an example.

[Link]

Add a command with NO menu item.

Syntax

[Link] 2026-03-29
Objects - Objects Page 142 of 375

[Link] (Function)

String Function Name of the function to call

Return Long Command ID

Remarks

This would normally be used to add a command that can be called by [Link].

[Link]

Obsolete. See AddMenuItem2 and AddMenuItem3.

Frame.AddMenuItem2

Add an item to a menu. This method will add the item to a specified menu. See AddMenuItem3 if a
"pop-out-the-side" menu is required.

Syntax

frame.AddMenuItem2 (ItemName, Function, Location, MenuName)

String ItemName Name in menu.

String Function Name of function.

Long Location Menu to add item to. See remarks.

String MenuName Name for new menu if Location = acamMenuNEW, else ""

Remarks

The Location parameter controls the position of the menu item. It can have one of the following values:

Value of Location Position


acamMenuADDINS A menu called "Add-Ins"
added in front of the Help
menu.
acamMenuFILE The File menu, between
Print Preview and the
Recent File List.
acamMenuFILE The File menu, between
Print Preview and the
Recent File List.
acamMenuFILE_OPEN The File menu, after
Open.

[Link] 2026-03-29
Objects - Objects Page 143 of 375

acamMenuFILE_INSERT The File menu, after


Insert.
acamMenuFILE_SAVE The File menu, after Save
As.
acamMenuFILE_INPUT The File menu, after Input
CAD and NC.
acamMenuFILE_OUTPUT The File menu, after
Output CAD and NC.
acamMenuFILE_POST The File menu, after
Select Post and List NC.
acamMenuFILE_CONFIGURE The Configure pop-out in
the File menu.
acamMenuEDIT The end of the Edit menu.
acamMenuVIEW The end of the View
menu.
acamMenuGEO The end of the Geometry
menu.
acamMenu3D The end of the 3D menu.
acamMenuUTILS The end of the Utils
menu.
acamMenuCAD The end of the CAD
menu.
acamMenuMACHINE The end of the Machine
menu.
acamMenuHELP The end of the Help
menu.
acamMenu3DDIG A new pop-out menu
called 3D-Digitise after
Digitise in the Geometry
menu.
acamMenuSPECIALGEO The end of the Special
Geometries menu in the
Geometry menu.
acamMenuSPECIALFUN The end of the Special
Functions menu in the
Utils menu.
acamMenuNEW A new menu added in
front of the Help menu,
with the name given in the
MenuName parameter. If
a menu with that name
already exists it will be
used instead.
acamMenuUTILS_NEST Before Area menu in Utils
menu.
acamMenuMACHINE_SETUP First section of Machine
menu.
acamMenuMACHINE_OPS Second section of
Machine menu.

[Link] 2026-03-29
Objects - Objects Page 144 of 375

acamMenuMACHINE_3D 3D section of Machine


menu.
acamMenuMACHINE_EDIT Edit section of Machine
menu.

This routine may only be used in the Events module of a VBA Macro or a DLL.

The example will add a menu item called Circles to the end of the Geometry menu. The function
Circles (in the Events module in the same VBA project, or in the same DLL) will be called when the
menu item is picked. An ampersand (&) in the menu text gives an underline (_) in the displayed menu
text for keyboard selection.

It also adds a button to the CAD Geometry button bar.

It also adds a menu item called Name to a new menu called Extras, which calls the function MyName.

' In Events module in a VBA project in Licomdir\VBMacros\StartUp

Function InitAlphacamAddIn (AcamVersion As long) As Integer

Dim frm As Frame

Set frm = [Link]

frm.AddMenuItem2 "&Circles", "Circles", acamMenuGEO, ""

[Link] acamButtonBarCAD_GEOMETRY, "[Link]", [Link]

frm.AddMenuItem2 "&Name", "MyName", acamMenuNEW, "E&xtras"

InitAlphacamAddIn = 0

End Function

Function Circles()

MsgBox "Circles"

End Function

Function MyName()

MsgBox "Name"

End Function

Note that Circles and MyName are Functions, not Subs, because if they are Subs they will appear in the
Macros dialog box reached from the Macros command in the VBA Macros menu, which is not wanted if

[Link] 2026-03-29
Objects - Objects Page 145 of 375

they are on a menu.

If a function with the same name as the function, with "OnUpdate" in front, is found in the same module
as the function, it will be used to enable or disable the menu item, and/or to add a check mark in front of
the menu item. It should return one of the following values:

0 Menu item is disabled and unchecked

1 Menu item is enabled and unchecked

2 Menu item is disabled and checked

3 Menu item is enabled and checked

If there is no update function the default is 1.

For example, if in the example above there is the function below:

Function OnUpdateCircles()

If [Link] > 0 Then

OnUpdateCircles = 1

Else

OnUpdateCircles = 0

End If

End Function

the menu item will be disabled if there are no geometries in the drawing.

Frame.AddMenuItem3

As AddMenuItem2, but with the option of using a "pop-out-the-side" menu.

Syntax

frame.AddMenuItem3 (ItemName, Function, Location, MenuName, PopupName As String)

String ItemName Name in menu.

String Function Name of function.

Long Location Menu to add menu to.

String MenuName Name for new menu if Location = acamMenuNEW, else ""

[Link] 2026-03-29
Objects - Objects Page 146 of 375

String PopupName Name for pop-out menu, "" if not required.

This works the same as AddMenuItem2, except that where AddMenuItem2 would add a menu item, this
function will add a pop-out menu, and add the menu item to that menu. If the pop-out menu exists it will
be used, the menu item will be added to the end.

See AddMenuItem2 for details.

Frame.AddMenuItem4

Add an item to a menu, at any location.

Syntax

frame.AddMenuItem4 (ItemName, Function, Location, After, PopupName)

String ItemName Name in menu.

String Function Name of function.

AcamCommand Location ID of command to add menu next to.

Boolean After True to add new item after existing item, False for before.

String PopupName Name for pop-out menu, "" if not required.

Location can be the ID of an existing Alphacam command (see AcamCommand in the VBA Object
Browser), or a command added by this add-in, using [Link].

If After is True, the new command will be added after the existing command, if False it will be added in
front of the command.

If PopupName is "", the new item will be added to an existing menu, if not, this function will add a pop-
out menu, and add the menu item to that menu. If the pop-out menu exists it will be used, the menu item
will be added to the end.

[Link]

Add a page to the project bar.

Syntax

[Link] (Hwnd, Name, Hbitmap)

long Hwnd Handle of window representing page

String Name Text for the tab

long Hbitmap Handle of bitmap for tab icon

[Link] 2026-03-29
Objects - Objects Page 147 of 375

Remarks

This would normally be used from a C++ DLL to add a page created as a mode-less dialog box to the
project bar. See Addin1-2002 in the API02\VisualCPP folder on the Alphacam CD for an example.

[Link]

Add text to the main Alphacam title bar.

Syntax

[Link] (Text)

String Text Text to add.

See [Link] to remove it.

[Link]

Call function in Events module in VBA projects and exported by add-in DLLs.

Syntax

[Link] (FunctionName)

String FunctionName Name of function

[Link]

Clear the parameters set for the Evaluate method..

Syntax

[Link]

[Link]

Close the window displayed with [Link].

Syntax

[Link]

[Link]

Create an empty button bar, or return an existing one

[Link] 2026-03-29
Objects - Objects Page 148 of 375

Syntax

[Link] (Name)

String Name The name of the bar

[Return] Long Returned ID of the bar.

Remarks

If there is an existing API button bar with the same name, its ID will be returned, otherwise a new button
bar will be created, and its ID [Link] are 24 button bars available for add-ins to use. If they are
all used, the return value will be 0. The ID can be passed as the BarID parameter to [Link],
to add buttons.

[Link]

Evaluate an expression using the Alphacam expression evaluator (as used in Posts and dialog boxes).
See "Math Functions" in the AlphaEDIT help file.

Syntax

[Link] (Expression)

String Expression The expression to evaluate

Example

Dim X As Double
X = [Link]("atan2(1,3)")
MsgBox "Atan(1/3) = " & X, vbInformation

Remarks

See SetEvaluateParameter and ClearEvaluateParameters

[Link]

Exit the new message loop.

Syntax

[Link]

This can be used to abort the current selection routine and return Alphacam to a state where commands
can be executed, eg with PostCommand.

[Link] 2026-03-29
Objects - Objects Page 149 of 375

[Link]

Get the Hwnd for a page to the project bar.

Syntax

[Link] (Type)

AcamProjectBarPage Type Page to get.

[Link]

Get a floating point number using a dialog box, allowing expression evaluation, and rejecting invalid
values.

Syntax

[Link](Title, Prompt, Flags, Value)

String Title Title for dialog box

String Prompt Prompt

AcamFloat Flags required values eg acamFloatPOSITIVE

Float Value On input, the default value, on return, the entered value

[Return] boolean Return False if user cancels

Example

Dim X As Single
If [Link]("Alphacam", "Enter X (> 0)", acamFloatPOSITIVE, X) Then
MsgBox "X = " & X
End If

[Link]

Get a long integer number using a dialog box, allowing expression evaluation, and rejecting invalid
values.

Syntax

[Link](Title, Prompt, Flags, Value)

String Title Title for dialog box

String Prompt Prompt

AcamFloat Flags required values eg acamFloatPOSITIVE

[Link] 2026-03-29
Objects - Objects Page 150 of 375

Long Value On input, the default value, on return, the entered value

[Return] boolean Return False if user cancels

Example

Dim N As Long
N = 100
If [Link]("Alphacam", "Enter N (> 0)", acamFloatPOSITIVE, N) Then
MsgBox "N = " & N
End If

[Link]

Load window layout. File name must not have an extension as two files are used.

Syntax

[Link] (FileName)

String FileName file name only

[Link]

Run an Alphacam command.

Syntax

[Link] (ID)

AcamCommand ID ID The ID of the command

This uses the Windows function PostMessage to run the command, so it will not be run until the
Windows message loop is checked eg when the current command finishes. See RunCommand.

[Link]

Read and decrypt text from Alphacam text file or other text file.

Syntax

[Link] (FileName, DollarNumber, Index)

String FileName Name of text file (.txt or .ctx extension), no path

long DollarNumber $ number to read

short Index Line number, 1 = first line after $, 2 = second etc.

[Link] 2026-03-29
Objects - Objects Page 151 of 375

[Return] String Returned string.

Remarks

This is mainly for Licom companies and distributors who want to write an add-in which can be easily
translated to other languages. The text file must have the same format as [Link]. For example, the
text file [Link] might contain the following:

Text for example addin ([Link])

$10

Select Tool

Tool Library

Then the statement

S$ = [Link]("[Link]", 10, 1)

will put the string "Select Tool" into S$

The .txt file should be in the same directory as the DLL or VBA Project that will use it. The file does not
have to be encrypted with [Link], Alphacam will automatically detect whether it is encrypted or
not and read it.

The statement

S$ = [Link]("[Link]", 2350, 1)

will put the string "Clear Memory" into S$.

Note that the numbers in the [Link] and [Link] are not guaranteed to stay the same forever,
although every effort will be made to keep them compatible.

[Link]

Register a function in this add-in which can export a file of a specified type.

Syntax

[Link] (FileTypeName, FileExtension, Function)

String FileTypeName A name for the file type

String FileExtension The extension of this type of file

String Function The name of the function which will export the file

Remarks

[Link] 2026-03-29
Objects - Objects Page 152 of 375

The file type name will be added to the list of types in the drop-down list in the Output CAD dialog box.

Example (C++)

In InitAlphacamAddIn:

frame->RegisterExportFunction("Parasolid Binary", ".x_b", "PSExportFile");

In the same DLL:

ACAMAPIFUN(void) PSExportFile(VARIANT Acam, const char *FileName)

// Write the add-in's data to the file.

[Link]

Register a function in this add-in which can import a file of a specified type.

Syntax

[Link] (FileTypeName, FileExtensions, Function)

String FileTypeName A name for the file type

String FileExtensions The extensions of this type of file separated by ;

String Function The name of the function which will import the file

Remarks

When the API method [Link] is called Alphacam will look through the list of
registered import functions to see if any can import the file. The first function found will be called with
the name of the file. The function should read the file into Alphacam. The same process happens when a
file of unknown type is "dropped" on to Alphacam from Explorer.

Example (C++)

In InitAlphacamAddIn:

frame->RegisterImportFunction("Parasolid", ".x_t;.x_b", "PSInputFile");

In the same DLL:

ACAMAPIFUN(void) PSInputFile(VARIANT Acam, const char *FileName, VARIANT CadSettings)

// Read the file into Alphacam

Example (VBA)

In InitAlphacamAddin:

[Link] 2026-03-29
Objects - Objects Page 153 of 375

[Link] "Text", ".txt", "InputText"

In the same module (Events)

Function InputText(FileName As String, CadSettings As CadInputSettings)

Shell "notepad " & FileName

End Function

CadSettings is an object of type CadInputSettings, which contains properties which may be used to
control the import eg BreakTol.

See [Link]

Frame.RegisterImportFunction2

Register a function in this add-in which can import a file of a specified type.

As RegisterImportFunction but with CheckFunction to check a file to see if it is the required type.

This method should be called if a file extension could be used for more than one type.

This method will work with add-in DLLs only, not VBA projects.

Syntax

Frame.RegisterImportFunction2 (FileTypeName, FileExtensions, ImportFunction, CheckFunction)

String FileTypeName A name for the file type

String FileExtensions The extensions of this type of file separated by ;

String ImportFunction The name of the function which will import the file

String CheckFunction The name of the function which will check the file

Remarks

CheckFunction will be passed App and file name, should return non-zero if it can be handled.

When the API method [Link] is called Alphacam will look through the list of
registered import handlers to see if any can import a file with the extension. For each handler the
CheckFunction will be called with the name of the file. The function should examine the file to see if it
can handle it, and return non-zero if so. If a CheckFunction returns non-zero the ImportFunction will be
called and should import the file. The same process happens when a file of unknown type is "dropped"
on to Alphacam from Explorer.

Example (C++)

[Link] 2026-03-29
Objects - Objects Page 154 of 375

In InitAlphacamAddIn:

frame->RegisterImportFunction2("Parasolid", ".x_t;.x_b", "PSInputFile", "PSCheckFile");

In the same DLL:

ACAMAPIFUN(void) PSInputFile(VARIANT Acam, const char *FileName, VARIANT CadSettings)

// Read the file into Alphacam

ACAMAPIFUN(int) PSCheckFile(VARIANT Acam, const char *FileName)

// Return non-zero if the file can be handled by PSInputFile

CadSettings is an object of type CadInputSettings, which contains properties which may be used to
control the import eg BreakTol.

See [Link]

[Link]

Remove the menu item and button associated with an Alphacam command.

If the menu would be empty after removing the item, it is also removed.

Syntax

[Link] (ID)

AcamCommand ID ID The ID of the command

[Link]

Remove the menu containing the given Alphacam command.

Syntax

[Link] (ID)

AcamCommand ID ID The ID of the command

[Link]

Remove a page from the project bar. Only pages added by this addin may be removed.

Syntax

[Link] (Hwnd)

long Hwnd Handle of window added

[Link] 2026-03-29
Objects - Objects Page 155 of 375

Remarks

See AddProjectBarPage.

[Link]

Remove text added by AddTitleText

Syntax

[Link] (Text)

String Text The text that was passed to AddTitleText

See [Link].

[Link]

Run an Alphacam command.

Syntax

[Link] (ID)

AcamCommand ID ID The ID of the command

Remarks

This uses the Windows function SendMessage to run the command, so will be run immediately. See
PostCommand.

[Link]

Save window layout. File name must not have an extension as two files are used.

Syntax

[Link] (FileName)

String FileName file name only

[Link]

Set a parameter for the Evaluate method..

Syntax

[Link] (Name, Value)

String Name The name of the parameter

[Link] 2026-03-29
Objects - Objects Page 156 of 375

Double Value The value of the parameter

Example

Dim F As Frame

Set F = [Link]

[Link]

[Link] "A", 10

[Link] "B", 25

MsgBox [Link]("A+B")

[Link]

Update the text in the window displayed with [Link].

Syntax

[Link] Text

String Text Text in window

Remarks

[Link] must be called first.

[Link]

Show a window while the script performs a lengthy operation.

Syntax

[Link] Title, Text

String Title Text in title bar

String Text Text in window

Remarks

[Link] 2026-03-29
Objects - Objects Page 157 of 375

The window will stay on the screen until the script calls [Link], or the script finishes.

Example:

Set frm = [Link]

[Link]("Alphacam", "Loading file - Please Wait")

.. do lots of things ..

[Link]

[Link]

Show a page from the project bar, as if the user clicked on the tab. Only pages added by this addin may
be shown.

Syntax

[Link] (Hwnd)

long Hwnd Handle of window added

Remarks

See AddProjectBarPage.

Geo2D Object
An object used to create a 2D Geometry, ie a set of connected lines and arcs. The geometry may be open
or closed. Create it with Drawing.Create2DGeometry, use [Link]… methods to add lines and arcs,
then finish with [Link], [Link] or [Link]
methods. The Finish methods will return a Path object.

[Link]

Add a line to a 2D geometry, start point is end point of last line or arc, or point passed to
Drawing.Create2DGeometry if this is the first line or arc.

Syntax

[Link] (X, Y)

double X X coordinate of end point

double Y Y coordinate of end point

[Link]

[Link] 2026-03-29
Objects - Objects Page 158 of 375

Add an arc to 2D geometry, start point is end point of last line or arc, or point passed to
Drawing.Create2DGeometry if this is the first line or arc.

Syntax

[Link] (X, Y, Radius, CW, Over180)

double X X coordinate of end point

double Y Y coordinate of end point

double Radius Arc radius

boolean CW True for CW, False for CCW

boolean Over180 True if included angle is more than 180 degrees

Geo2D.AddArc2Point

Add an arc to 2D geometry, start point is end point of last line or arc, or point passed to
Drawing.Create2DGeometry if this is the first line or arc.

Syntax

geo.AddArc2Point (X2, Y2, X3, Y3)

double X2 X coordinate of second point

double Y2 Y coordinate of second point

double X3 X coordinate of end point

double Y3 Y coordinate of end point

[Link]

Add an arc to 2D geometry, tangential to last line or arc, start point is end point of last line or arc. Can
not be the first line or arc in a geometry.

Syntax

[Link] (X, Y)

double X X coordinate of end point

double Y Y coordinate of end point

[Link]

Add an arc to 2D geometry, start point is end point of last line or arc, or point passed to

[Link] 2026-03-29
Objects - Objects Page 159 of 375

Drawing.Create2DGeometry if this is the first line or arc.

Syntax

[Link] (X, Y, XCen, YCen, CW)

double X X coordinate of end point

double Y Y coordinate of end point

double XCen X coordinate of center point

double YCen Y coordinate of center point

boolean CW True for CW, False for CCW

[Link]

Add an arc to 2D geometry, start point is end point of last line or arc, or point passed to
Drawing.Create2DGeometry if this is the first line or arc.

Syntax

[Link] (XCen, YCen, Angle)

double XCen X coordinate of center point

double YCen Y coordinate of center point

double Angle Included angle in degrees, CW -ve

[Link]

Finish 2D geometry.

Syntax

[Link]

[Return] Path Path object

[Link]

Finish 2D geometry with a line to make a closed geometry.

Syntax

[Link]

[Return] Path Path object

[Link] 2026-03-29
Objects - Objects Page 160 of 375

[Link]

Finish 2D geometry with an arc tangential to last line or arc, to make a closed geometry.

Syntax

[Link]

[Return] Path Path object

GeoBitmap Object
An object storing a bitmap associated with a geometry path.

The bitmap can be assigned to a geometry by setting the attribute LicomUKDMBBmpName to the full
path name of the file, which may have extension: bmp, jpg, jpeg, gif, emf, tiff, png.

This object gives access to the bitmap.

Properties

ActualFileName - (String) The file containing the image, which may be temporary, eg if the bitmap is
stored in the Alphacam drawing file

HBITMAP - (HBITMAP) Handle of bitmap as an HBITMAP. Null if none

OriginalFileName - (String) The name of the file originally assigned to the geometry, may not exist now

GeoCad object
An object used to add 3D geometry consisting of 3D lines and arcs in any plane. When all lines and arcs
are added the Finish method will try to join them into connected paths in work planes. Useful for
geometry from a CAD system.

Create the object with [Link]. Use AddArc and AddLine methods to add 3D
lines and arcs. Use the Finish method to sort the lines and arcs into paths in work planes.

[Link]

Add an arc in any plane. The center, start and end points must be given in 3D Global coordinates. The
plane containing the arc is specified by giving the axis ie the unit normal vector of the plane, for
example (0, 0, 1) for a plane parallel to the global XY plane. The arc is CCW.

Syntax

[Link] (CenX, CenY, CenZ, AxisX, AxisY, AxisZ, X1, Y1, Z1, X2, Y2, Z2)

[Link] 2026-03-29
Objects - Objects Page 161 of 375

double CenX X coord of arc center

double CenY Y coord of arc center

double CenZ Z coord of arc center

double AxisX X coord of axis

double AxisY Y coord of axis

double AxisZ Z coord of axis

double X1 X coord of start point

double Y1 Y coord of start point

double Z1 Z coord of start point

double X2 X coord of end point

double Y2 Y coord of end point

double Z2 Z coord of end point

[Link]

Add an arc in any plane, with an attribute. The center, start and end points must be given in 3D Global
coordinates. The plane containing the arc is specified by giving the axis ie the unit normal vector of the
plane, for example (0, 0, 1) for a plane parallel to the global XY plane. The arc is CCW.

Syntax

[Link] (CenX, CenY, CenZ, AxisX, AxisY, AxisZ, X1, Y1, Z1, X2, Y2, Z2, Index,
newVal)

double CenX X coord of arc center

double CenY Y coord of arc center

double CenZ Z coord of arc center

double AxisX X coord of axis

double AxisY Y coord of axis

double AxisZ Z coord of axis

double X1 X coord of start point

double Y1 Y coord of start point

[Link] 2026-03-29
Objects - Objects Page 162 of 375

double Z1 Z coord of start point

double X2 X coord of end point

double Y2 Y coord of end point

double Z2 Z coord of end point

String Index Name of attribute

Variant newVal Value of attribute

[Link]

Add a 3D line. The start and end points must be given in 3D Global coordinates.

Syntax

[Link] (X1, Y1, Z1, X2, Y2, Z2)

double X1 X coord of start point

double Y1 Y coord of start point

double Z1 Z coord of start point

double X2 X coord of end point

double Y2 Y coord of end point

double Z2 Z coord of end point

[Link]

Add a 3D line with an attribute. The start and end points must be given in 3D Global coordinates.

Syntax

[Link] (X1, Y1, Z1, X2, Y2, Z2, Index, newVal)

double X1 X coord of start point

double Y1 Y coord of start point

double Z1 Z coord of start point

double X2 X coord of end point

double Y2 Y coord of end point

[Link] 2026-03-29
Objects - Objects Page 163 of 375

double Z2 Z coord of end point

String Index Name of attribute

Variant newVal Value of attribute

[Link]

Try to join the lines and arcs into paths in work planes. The paths will be added to the Alphacam
geometry database.

Syntax

[Link]

[Return] Paths Paths object (see remarks).

Remarks

The return value is a Collection of the produced paths. All the elements will be put into paths, which
may be open or closed. Every path will be in a work plane (even if it is global XY). Paths will be put in
the same work plane if possible.

The example adds lines and arcs which are sorted into 5 paths. The paths are then selected and a surface
is fitted through them.

Dim drw As Drawing


Dim geo As GeoCad
Dim geos As Paths
Dim p As Path
Dim x As Double
Set drw = [Link]
[Link]
Set geo = [Link]
For x = 0 To 100 Step 25
[Link] x, 0, 0, x, 0, 40
[Link] x, 50, 0, x, 50, 40
[Link] x, 20, 30, 1, 0, 0, x, 50, 40, x, 0, 40
Next x
Set geos = [Link]
[Link] = True
MsgBox "Number of paths = " & [Link]
[Link] = True
[Link]

GeoCad.Finish2DLinesOnly

Simple version of Finish where the data is assumed to be just 2D lines. Lines are connected by finding
the closest (within tolerance) rather than first one found within tolerance..

[Link] 2026-03-29
Objects - Objects Page 164 of 375

Syntax

geo.Finish2DLinesOnly (Tol)

Double Tol Tolerance for joining lines

[Return] Paths Paths object (see remarks).

LaserData Object
Machining data for a Laser/Flame operation, eg feeds and technology

More:

LaserData Properties

LaserData Properties

Most of these properties have the same name as the text in the dialog boxes in the English version of
Alphacam, in the corresponding commands eg Cut Path.

Attribute - See Attributes

BeamLength - (float) Length of Laser beam

BeamWidth - (float) Width of Laser beam or Flame

ChordError - (float) Chord error for CutPolylines

ClearanceDistance - (float) Clearance Distance for CutPolylines

ClearAreaType - (AcamPocketType) Type of Clear Area operation, acamPocketCONTOUR = 0,


acamPocketLINEAR = 1, acamPocketSPIRAL = 2

CutDirection - (float) Cut Direction for Linear Pocket

CutFeed - (float) Feed

CutHolesType - (AcamCutHolesType) Type of action for CutHoles, acamCutHolesPIERCE = 0,


acamCutHolesCUT_HOLE = 1, acamCutHolesSPIRAL = 2

GivenHoleDiameter - (double) Hole diameter to select holes for CutHoles

HolesLinear - (boolean) True for Linear code for CutHoles, False for canned cycles

LeadInLength - (float) Length of lead-in for linear code in Cut Hole option in CutHoles

[Link] 2026-03-29
Objects - Objects Page 165 of 375

LoopRadius - (float) Radius of loop corners

MCAxisType - (AcamAxis) Type of machining for CutPolylines, acamAxis3 = 0, acamAxis4XZ = 1,


acamAxis4YZ = 2, acamAxis5 = 3, acamAxis3HELICAL = 4, acamAxis4XY = 5

McComp - (AcamComp) Machine compensation, acamCompTOOLCEN = 0, acamCompMC = 1,


acamCompBOTH = 2

NumberOfCuts - (short) Number of cuts for Cut Hole option in CutHoles

OffsetNumber - (long) Offset Number

OpNo - (short) Operation Number

PolylineToolSide - (AcamToolSide) Tool side for CutPolylines

ProcessType - (short) Type of machining process (read-only)

RapidApproachDistance - (float) Rapid Approach Distance

RapidToStart - (boolean) True to rapid to start from safe rapid level for Cut Between Contours

RotationAngle - (double) Tool Rotation angle for CutPolylines

SafeRapidLevel - (double) Z level to rapid at

Stock - (float) Stock Allowance

TiltAngle - (double) Tool Tilt angle for CutPolylines

ToolAngle - (double) Tool angle relative to path for CutPolylines

ToolAngleType - (AcamToolAngleType) Method to set tool angle for CutPolylines,


acamToolAngleSURFACE_NORMAL = 0, acamToolAnglePERP_TO_PATH = 1,
acamToolAnglePERP_TO_XY = 2, acamToolAnglePARALLEL_TO_SURFACE = 3,
acamToolAngleSET_ANGLES = 4 , acamToolAngleSET_VECTOR = 5

ToolVectorX - (float) X component of Tool Vector eg for Machine Polyline

ToolVectorY - (float) Y component of Tool Vector eg for Machine Polyline

ToolVectorZ - (float) Z component of Tool Vector eg for Machine Polyline

TraverseAtRPlane - (boolean) True to traverse at R-plane in CutHoles

Use3DPolylines - (boolean) True to use 3D polylines to control the tool path in Cut Between Contours

WhichHoles - (short) Holes for CutHoles, acamHolesCIRCLES = 0, acamHolesMATCH_BEAM = 1,


acamHolesGIVEN_DIA = 2

[Link] 2026-03-29
Objects - Objects Page 166 of 375

WidthOfCut - (float) Width of cut for pocketing

XYCorners - (AcamCorners) Type of corners. acamCornersROUND = 0, acamCornersSTRAIGHT = 1,


acamCornersLOOP = 2

[Link]

Do Clear Area on currently selected geometries using properties set for this LaserData object.

Syntax

[Link]

[Return] Paths Returned Paths object

Example:

Public Sub TestClearArea()

Dim Drw As Drawing


Set Drw = [Link]

Dim P As Path
Set P = [Link](10, 10, 10)
[Link] = acamINSIDE
[Link] = True

Dim LD As LaserData
Set LD = [Link]
With LD
.ClearAreaType = acamPocketCONTOUR
.OffsetNumber = 77
.BeamWidth = 0.5
.CutFeed = 450
.Stock = 0.1
.WidthOfCut = 0.4

.ClearArea
End With
[Link]

End Sub

[Link]

Do Cut Between Contours operation on given geometries, using properties set for this LaserData object.

Syntax

[Link] 2026-03-29
Objects - Objects Page 167 of 375

[Link] (ProgrammingGeometry, AuxiliaryGeometry)

Path ProgrammingGeometry

Path AuxiliaryGeometry

[Return] Path Returned Path object containing tool path

Example:

Public Sub TestCutBetweenContours()

Dim Drw As Drawing


Dim LD As LaserData
Set Drw = [Link]

Set LD = [Link]

Dim ProgGeo As Path, AuxGeo As Path

Set ProgGeo = [Link]("Programming Geometry")


Set AuxGeo = [Link]("Auxiliary Geometry")

[Link] = 10
[Link] = 0.1
[Link] = 0.1
[Link] = 1.5
[Link] = 150
[Link] = 2.5
[Link] = 100
[Link] = 1.5

Dim TP As Path
Set TP = [Link](ProgGeo, AuxGeo)

End Sub

[Link]

Do Cut Holes operation on currently selected geometries using properties set for this LaserData object.

Syntax

[Link]

[Return] Paths Returned Paths object

Example:

Public Sub TestCutHoles()

[Link] 2026-03-29
Objects - Objects Page 168 of 375

Dim Drw As Drawing


Set Drw = [Link]

[Link] [Link] & "\licomdat\[Link]\small [Link]"

Dim P As Path
Set P = [Link](10, 10, 10)
[Link] = True
Set P = [Link](20, 60, 10)
[Link] = True

Dim LD As LaserData
Set LD = [Link]
With LD
.CutHolesType = acamCutHolesCUT_HOLE
.CutFeed = 450
.SafeRapidLevel = 50
.ClearanceDistance = 5

.BeamWidth = 0.5

.HolesLinear = True

.NumberOfCuts = 5 ' post variable NCT

.CutHoles
End With
[Link]

End Sub

[Link]

Do Cut Path on currently selected geometries using properties set for this LaserData object.

Syntax

[Link]

[Return] Paths Returned Paths object

Example:

Public Sub TestCutPath()

Dim Drw As Drawing


Set Drw = [Link]

' Draw ellipse


Dim P As Path
Set P = [Link](100, 75, 4, 4, 0, 0)

[Link] 2026-03-29
Objects - Objects Page 169 of 375

[Link] = acamOUTSIDE
[Link] = True

' Create tool path


Dim LD As LaserData
Set LD = [Link]

With LD
.McComp = acamCompTOOLCEN
.XYCorners = acamCornersROUND
.OffsetNumber = 66
.BeamWidth = 0.5
.CutFeed = 250
Dim PS As Paths
Set PS = .CutPath
End With

' Add lead-in/out


For Each P In PS
[Link] acamLeadLINE, acamLeadARC, 2, 3, 90, False, False, 0
Next P

[Link]

End Sub

[Link]

Do Cut Polyline operation on currently selected geometries using properties set for this LaserData
object.

Syntax

[Link]

[Return] Paths Returned Paths object

[Link]

Start a manual tool path, using properties set for this LaserData object. An object of type
LaserManualToolPath will be returned. Its methods may then be used to build up one or more tool paths.

Syntax

[Link] (StartX, StartY, StartZ)

double StartX X coordinate of start point

double StartY Y coordinate of start point

[Link] 2026-03-29
Objects - Objects Page 170 of 375

double StartZ Z coordinate of start point

[Return] LaserManualToolPath returned LaserManualToolPath object

Remarks

The object LaserManualToolPath has identical properties and methods as MillManualToolPath

LatheMachineConfiguration Object
An object storing the machine configuration data for simulation, for a Lathe.

The properties determine whether the part or tool moves, for Z moves.

Properties

MainSpindleMoveZ - (AcamMCMoveType) acamMCMoveTOOL or acamMCMovePART

SubSpindleMoveZ - (AcamMCMoveType) acamMCMoveTOOL or acamMCMovePART

LatheTool Object
Object representing a Tool in Lathe. The tool may be a turning tool or a milling tool. To create a
LatheTool use [Link], set the properties of the tool, then use one of the methods to save
or select the tool. To select an existing tool with a known name use [Link].

A LatheTool has all the methods and properties of a MillTool, plus some extra ones for Turning. This
section only lists the extra properties and methods for Turning. See MillTool for the Milling properties
and methods.

More:

LatheTool Properties

LatheTool Properties

FeedPerRevX - (float) Feed Per Rev in X direction

FeedPerRevXZ - (float) Feed Per Rev in XZ direction

FeedPerRevZ - (float) Feed Per Rev in Z direction

FeedType - (AcamLatheFeed) Type of feed for Turning acamFeedPER_MIN or acamFeedPER_REV

MaxSpindleSpeed - (float) Maximum spindle speed for Turning

[Link] 2026-03-29
Objects - Objects Page 171 of 375

SpeedType - (AcamLatheSpeed) Type of speed for Turning acamSpeedSPINDLE or


acamSpeedSURFACE

Station - (AcamLatheStation) Which station is this tool in: acamStationFRONT or acamStationBACK


(read-only)

TurnProgrammingPoints - (TurnProgrammingPoints) Collection of TurnProgrammingPoint objects for a


turning tool with multiple programming points

Turret - (AcamLatheTurret) Which turret is this tool in: acamTurretABOVE_CL or


acamTurretBELOW_CL (read-only)

TurretOffsetX - (float) Turrret Offset in X

TurretOffsetZ - (float) Turrret Offset in Z

[Link]

Define a programming point for a Turning tool.

Syntax

[Link] (I, PositionX, PositionY, RakeAngle, TNV, OffsetNumber,


TipRadius)

Short I The number of the point, 1 = first point

Float PositionX See remarks

Float PositionY See remarks

Float RakeAngle Rake of Clearance angle

Long TNV Tool Nose Vector as in TNV in the Post

Long OffsetNumber Offset number for this point

Float TipRadius Radius of tip

Remarks

PositionX and PositionY give the shift from the tip centre of the first programming point to the tip centre
of this programming point. If I = 1, PositionX and PositionY must be 0.

TNV is a number between 1 and 8 as in the diagram in the AlphaEdit help file (search for TNV).

See the example. [Link]

[Link]

[Link] 2026-03-29
Objects - Objects Page 172 of 375

Get the geometry for a Turning tool. The first path is the insert, the rest are the holder.

Syntax

[Link]

[Return] Paths geometries representing tool cross-section, as a Paths object

[Link]

Set this tool to be the current tool, when there is more than one turret.

Syntax

[Link]

This is used to specify which tool is to be used for the next (single turret) machining operation when
there is a tool in more than one turret.

[Link]

Set the geometry for a Turning tool. The first path is the insert, the rest are the holder.

Syntax

[Link] Geo

Paths Geo geometries representing tool cross-section, as a Paths object

See the example. [Link]

[Link]

Set the programming point to be used for a turning tool with multiple programming points.

Syntax

[Link] I

Short I Index into TurnProgrammingPoints Collection of required point, 1 = first point

LatheTool Example

The example shows how to define a groving tool with two programming points.

Public Sub DefineTurningTool()

Dim Drw As Drawing


Set Drw = [Link]

[Link] 2026-03-29
Objects - Objects Page 173 of 375

Dim Geos As Paths


Set Geos = [Link]

' Create Insert of grooving tool (must be first in Collection)


Dim P1 As Path
Set P1 = [Link](0, 0, 4, 12)
[Link] 0.5

' Move it so the tip centre is at (0,0)


[Link] -0.5, -0.5

[Link] P1

' Create Holder


Dim P2 As Path
Set P2 = [Link](0, 8, 25, 80)

' Set start point and direction so we know which elements to chamfer
[Link] 0, 8
[Link] = False
[Link](1).Chamfer [Link](2), False, True, 15, 15

[Link] P2

[Link] = True
[Link] 0, 8
[Link] = False

Dim Tool As LatheTool


Set Tool = [Link]
[Link] Geos

' Define first programming point, PositionX and PositionY must be 0,0 for the first point
' TNV is a number between 1 and 8 as in the diagram in the AlphaEdit help file (search for TNV)
[Link] 1, 0, 0, 0, 3, 11, 0.5

' Define second programming point, PositionX and PositionY define the shift from the first point to this
point
[Link] 2, 3, 0, 0, 4, 12, 0.5

[Link] = 0.1
[Link] = 0.2
[Link] = 0.3

[Link] = 1

[Link] "c:\licomdat\[Link]\[Link]"

End Sub

[Link] 2026-03-29
Objects - Objects Page 174 of 375

Layer Object
An Alphacam or User layer.

Use [Link] to get the layers as a Collection.

Use [Link] to get the current user layer.

Use [Link] to set the current user layer.

Use [Link] to create a new user layer.

Use [Link] to get the layer for a Path.

Use [Link] to set the layer for a Path.

More:

Layer Properties

Layer Examples

Drawing / Path / Layer Colours

Path / Layer Line Types

Layer Properties

Active - (boolean) True if this is the active layer

Name - (String) Name of this layer

Color - (AcamColor) Colour for this layer, see key below

ColorRGB - (OLE_COLOR) Colour for this layer, as an RGB value

Geometries - (Paths) The geometries on this layer, as a Paths Collection (read-only)

LineType - (AcamLineType) Line type for this layer, see key below

LineWidth - (long) Line width for this layer, 0 to 9

Lock - (Boolean) True if this layer is locked

Special - (short) Non-zero if this is a special layer ie not a user layer (read-only)

Splines - (Splines) The splines on this layer, as a Splines Collection (read-only)

Text - (Texts) The text on this layer, as a Texts Collection (read-only)

[Link] 2026-03-29
Objects - Objects Page 175 of 375

Visible - (Boolean) True if geometries in this layer are drawn

Key

Colours

Line Types

[Link]

Delete the layer, if it is empty and is not a special Alphacam layer.

Syntax

[Link]

[Link]

Get the next layer in the list.

Syntax

[Link]

[Return] Layer Pointer to Layer Dispatch object

Example

See example.

[Link]

Swaps the position of the layer with the specified layer. The two layers may be anywhere in the list, they
don't have to be adjacent.

Syntax

[Link] (OtherLayer)

layer OtherLayer layer to be swapped

This example will swap the "work" layer order with the "nc" layer:

Dim Layer1 As Layer, Layer2 As Layer

Set Layer1 = [Link]("nc")

Set Layer2 = [Link]("work")

[Link] 2026-03-29
Objects - Objects Page 176 of 375

[Link] Layer2

[Link]

[Link] = False

[Link] = True

Layer Examples

Layer Example 1

Layer Example 2

Layer Example 3

Layer Example 1

This example will create a new layer, set its colour and make it the active drawing layer.

It then draws a circle in the layer and cancels the active layer.

Dim drw As Drawing

Set drw = [Link]

Dim lyr As Layer

Set lyr = [Link] ("CIRCLES")

[Link] = acamRED

[Link] lyr

[Link] 20, 0, 0

[Link] Nothing ' Cancel active layer

Layer Example 2

This example will display the names of the user layers only, ignoring the special Alphacam layers.

Dim drw As Drawing

Set drw = [Link]

Dim lyr As Layer

For Each lyr in [Link]

[Link] 2026-03-29
Objects - Objects Page 177 of 375

If [Link] = 0 Then

MsgBox "Layer name = " & [Link]

End If

Next lyr

Layer Example 3

This example will fillet all the geometries on user layer "BOXES".

Dim Drw As Drawing


Set Drw = [Link]

Dim Lyr As Layer


On Error Resume Next
Set Lyr = [Link]("BOXES")
If [Link] <> 0 Then
MsgBox "Layer BOXES not found"
End
End If

Dim P As Path
For Each P In [Link]
[Link] 5
Next P

Drawing / Path / Layer Colours

The colour can be set as one of the standard Alphacam colours (AcamColor) or as an RGB value
(OLE_COLOR). Whichever is last set will be used. An AcamColor can have one of the values below:

acamBLACK = 0

acamDARK_BLUE = 1

acamDARK_GREEN = 2

acamDARK_CYAN = 3

acamDARK_RED = 4

acamDARK_MAGENTA = 5

acamBROWN = 6

acamLIGHT_GREY = 7

acamDARK_GREY = 8

[Link] 2026-03-29
Objects - Objects Page 178 of 375

acamBLUE = 9

acamGREEN = 10

acamCYAN = 11

acamRED = 12

acamMAGENTA = 13

acamYELLOW = 14

acamWHITE = 15

An RGB colour is a Windows COLORREF value, which stores the Red, Green and Blue components of
the colour, each one between 0 and 255. The following function can be used in VBA to define a colour:

Public Function RGB(Red As Integer, Green As Integer, Blue As Integer) As OLE_COLOR

If Red < 0 Or Red > 255 Or Green < 0 Or Green > 255 Or Blue < 0 Or Blue > 255 Then
RGB = 0
Exit Function
End If
RGB = Red + Green * &H100& + Blue * &H10000

End Function

In C++ use the RGB() macro.

Path / Layer Line Types

The line type is set by an integer as given below:

acamLineCONT = 0

acamLineDASH = 1

acamLineDOT = 2

acamLineDASHDOT = 3

acamLineCENTER = 4

acamLinePHANTOM = 5

A Path can have a line type of -1 meaning use the Layer line type, or one of the above types to override
the Layer type.

LeadData Object

[Link] 2026-03-29
Objects - Objects Page 179 of 375

An object used to set the values for 3D Lead-In/Out in a Machining Style or MillData.

Properties

AngleIn - (Single) Angle for lead-in in degrees

AngleOut - (Single) Angle for lead-out in degrees

LeadIn - (AcamLeadType) Type of lead-in

LeadOut - (AcamLeadType) Type of lead-out

LengthIn - (Single) Length of lead-in line

LengthOut - (Single) Length of lead-out line

RadiusIn - (Single) Radius of lead-in arc

RadiusOut - (Single) Radius of lead-out arc

SlopeIn - (Bool) True if lead-in is to be sloping

SlopeOut - (Bool) True if lead-out is to be sloping

Overlap - (Single) Overlap distanced between end of lead-out and start of lead-in

FeedrateModifierIn - (Single) Feedrate modifier for lead-in

FeedrateModifierOut - (Single) Feedrate modifier for lead-out

[Link]

Display the lead-in/out dialog box allowing the user to enter the desired values. These values can then be

[Link] 2026-03-29
Objects - Objects Page 180 of 375

retrieved from the given LeadData object.

Syntax

[Link]

[Return] boolean Return False if user cancels

Example...

Dim LD As LeadData

Set LD = [Link]

' show the lead-in/out dialog

If [Link] Then

' display some simple data entered by the user

MsgBox "In Length =" & [Link] & vbCrLf & "Out Length =" & [Link]

Else

MsgBox "User cancelled"

End If

LeadData3D Object
An object used to set the values for Lead-In/Out in a Machining Style or MillData.

Properties

Angle - (Single) Angle for lead-in/out in degrees

AngleIn - (Single) Angle for lead-in in degrees

[Link] 2026-03-29
Objects - Objects Page 181 of 375

AngleOut - (Single) Angle for lead-out in degrees

LeadIn - (AcamLeadType) Type of lead-in

LeadOut - (AcamLeadType) Type of lead-out

LengthIn - (Single) Length of lead-in line

LengthOut - (Single) Length of lead-out line

LineArcInTangential - (Bool) True if lead-in line and arc are to be tangential. (acamLeadBOTH only)

LineArcOutTangential - (Bool) True if lead-in line and arc are to be tangential. (acamLeadBOTH only)

Radius - (Single) Radius of arc

RadiusIn - (Single) Radius of lead-in arc

RadiusOut - (Single) Radius of lead-out arc

SlopeIn - (Bool) True if lead-in is to be sloping

SlopeOut - (Bool) True if lead-out is to be sloping

Overlap - (Single) Overlap distanced between end of lead-out and start of lead-in

FeedrateModifierIn - (Single) Feedrate modifier for lead-in

FeedrateModifierOut - (Single) Feedrate modifier for lead-out

SideIn - (AcamLeadSide) Tool side for lead-in

SideOut - (AcamLeadSide) Tool side for lead-out

[Link] 2026-03-29
Objects - Objects Page 182 of 375

ZSlopeIn - (Double) Z slope amount for lead-in

ZSlopeOut - (Double) Z slope amount for lead-out

FeedDownDistance - (Double)

Tolerance - (Double) Chord tolerance for arcs

[Link]

Display the lead-in/out dialog box allowing the user to enter the desired values. These values can then be
retrieved from the given LeadData object.

Syntax

[Link]

[Return] boolean Return False if user cancels

Example...

Dim LD As LeadData3D

Set LD = App.CreateLeadData3D

' show the lead-in/out dialog

If [Link] Then

' display some simple data entered by the user

MsgBox "In Length =" & [Link] & vbCrLf & "Out Length =" & [Link]

Else

[Link] 2026-03-29
Objects - Objects Page 183 of 375

MsgBox "User cancelled"

End If

License Object
An object giving access to the Alphacam License system, introduced with V7.5.

[Link]

Get license for module, feature name will be Alphacam: + Name. License will be released when
Alphacam exits, or may be released with ReleaseLicense(Handle), where Handle is the return value of
this method.

Syntax

[Link] (Name)

String Name Name of feature

[Return] long, Handle of license, zero if error

[Link]

Get the name of the customer that this copy of Alphacam is licensed to, the name shown in the Help |
About box.

Syntax

[Link]

[Return] String, name

[Link]

Get error code for last call to GetAcamModuleLicense.

Syntax

[Link]

[Return] AcamLicenseError, error code

[Link] 2026-03-29
Objects - Objects Page 184 of 375

Possible values are:

acamLicenseNoError = 0

acamNoModuleLicense = 4

acamNoNetworkModuleLicense = 10

acamTooManyUsersModule = 14

acamClockTamperDetected = 16

acamLicenseVersionTooOld = 17

[Link]

Get the update expiry month for the active license

Syntax

[Link]

[Return] Long, number of months from January 1996

[Link]

See if a license exists for given feature. Name should be the full name of the feature eg
Alphacam:am5axaps.

The fact that it exists does not guarantee that it is available, for example on a network system they might
all be in use.

Syntax

[Link] (Name)

String Name Full name of feature

[Link] 2026-03-29
Objects - Objects Page 185 of 375

[Return] Bool, True if a license exists

[Link]

Release the handle, only handles acquired by this instance of the License object can be released.

Syntax

[Link] (Handle)

long Handle Handle returned from GetAcamModuleLicense

MachineComponent Object
An object storing the data for a machine component for simulation, for a Mill or Router.

Properties

CanMoveX (Bool) True if the component can move in X

CanMoveY (Bool) True if the component can move in Y

CanMoveZ (Bool) True if the component can move in Z

CanRotateX (Bool) True if the component can rotate in X

CanRotateY (Bool) True if the component can rotate in Y

CanRotateZ (Bool) True if the component can rotate in Z

ColorRGB (OLE_COLOR) The component's colour (read-only)

GeometryPath (Path) Path for this MachineComponent, will be empty if MachineComponent is a Solid
Part (read-only)

GeometrySolidPart (SolidPart) Solid Part for this MachineComponent, will be empty if


MachineComponent is a Path (read-only)

MaxX (double) Maximum X coordinate (read-only)

MaxY (double) Maximum Y coordinate (read-only)

MaxZ (double) Maximum Z coordinate (read-only)

[Link] 2026-03-29
Objects - Objects Page 186 of 375

MinX (double) Minimum X coordinate (read-only)

MinY (double) Minimum Y coordinate (read-only)

MinZ (double) Minimum Z coordinate (read-only)

Name (String) Name

Type (AcamMachineComponentType) Type: acamMachineComponentTypeNONE,


acamMachineComponentTypeFIXED, acamMachineComponentTypeMOVE_WITH_TOOL or
acamMachineComponentTypeMOVE_WITH_PART

Visible (Bool) True if the component is visible

MachineConfiguration Object
An object storing the machine configuration data for simulation, for a Mill or Router.

Properties

CWTilt - (Bool) True for Clockwise tilt

CardanicAngle (double) Calculated cardanic angle (read-only)

CardanicAxisPoint1X (double) X coordinate of first point on cardanic axis (read-only)

CardanicAxisPoint1Y (double) Y coordinate of first point on cardanic axis (read-only)

CardanicAxisPoint1Z (double) Z coordinate of first point on cardanic axis (read-only)

CardanicAxisPoint2X (double) X coordinate of second point on cardanic axis (read-only)

CardanicAxisPoint2Y (double) Y coordinate of second point on cardanic axis (read-only)

CardanicAxisPoint2Z (double) Z coordinate of second point on cardanic axis (read-only)

IsCardanic (Bool) True if the machine is cardanic

MoveX - (AcamMCMoveType) acamMCMoveTOOL if tool moves in X, acamMCMovePART if part


moves in X

MoveY - (AcamMCMoveType) acamMCMoveTOOL if tool moves in Y, acamMCMovePART if part


moves in Y

MoveZ - (AcamMCMoveType) acamMCMoveTOOL if tool moves in Z, acamMCMovePART if part


moves in Z

[Link] 2026-03-29
Objects - Objects Page 187 of 375

RotateBothAtSameTime (Bool) True if both axes should rotate at the same time

RotateX - (AcamMCRotateType) acamMCRotateTOOL if tool rotates in X, acamMCRotatePART if


part rotates in X, acamMCRotateNONE if there is no X rotation

RotateY - (AcamMCRotateType) acamMCRotateTOOL if tool rotates in Y, acamMCRotatePART if


part rotates in Y, acamMCRotateNONE if there is no Y rotation

RotateZ - (AcamMCRotateType) acamMCRotateTOOL if tool rotates in Z, acamMCRotatePART if part


rotates in Z, acamMCRotateNONE if there is no Z rotation

ToolHomeSet (Bool) True if the tool home position is set

ToolHomeX (double) X coordinate of tool home position

ToolHomeY (double) Y coordinate of tool home position

ToolHomeZ (double) Z coordinate of tool home position

XAxisY (double) Y coordinate of point on X rotation axis

XAxisZ (double) Z coordinate of point on X rotation axis

YAxisX (double) X coordinate of point on Y rotation axis

YAxisZ (double) Z coordinate of point on Y rotation axis

ZAxisX (double) X coordinate of point on Z rotation axis

ZAxisY (double) Y coordinate of point on Z rotation axis

Method

SetCardanicAxis - Set the cardanic axis and calculate the angle.

[Link] (X1, Y1, Z1, X2, Y2, Z2)

double X1 X coordinate of first point on axis

double Y1 Y coordinate of first point on axis

double Z1 Z coordinate of first point on axis

double X2 X coordinate of second point on axis

double Y2 Y coordinate of second point on axis

double Z2 Z coordinate of second point on axis

[Link] 2026-03-29
Objects - Objects Page 188 of 375

MachiningDefaults Object
An object containing the default values set by the user for machining, in File | Configure | General |
Machining.

More:

MachiningDefaults Properties

MachiningDefaults Properties

RapidDownTo - (float) Rapid Down To value for Rough / Finish, Pocket etc. (read-only)

SafeRapidLevel - (float) Safe Rapid Level value for Rough / Finish, Pocket etc. (read-only)

WidthOfCutContourPocket - (float) Width Of Cut for Contour Pocket as a percentage of the tool
diameter. (read-only)

WidthOfCutLinearPocket - (float) Width Of Cut for Linear Pocket as a percentage of the tool diameter.
(read-only)

Material Object
A material from eg [Link], used for speed and feed calculations.

Use [Link] to select a material by name from the material file and make it the current
material.

Use [Link] to get the current material as a Material object.

Use [Link] to set the current material from a Material object.

Use [Link] to create a material that is not in the material file. Its properties may then
be set, and [Link] can be used to make it the current material.

Use [Link] to get the materials as a Collection.

More:

Material Properties

Material Properties

Name - (String) Material name

Inch - (boolean) True if speed units are feet / minute, false if metres / minute

Speed - (float) Surface speed. (See Inch property for units)

[Link] 2026-03-29
Objects - Objects Page 189 of 375

KFactor - (float) K-factor for bending

Note - (String) note(I), I = 1 to 20. Notes for this material

MillData Object
Machining data for a Mill operation, eg Z levels, feeds and speeds.

More:

MillData Properties

MachineSurfaces Examples

MillData Properties

Most of these properties have the same name as the text in the dialog boxes in the English version of
Alphacam, in the corresponding commands eg Rough / Finish.

Attribute - See Attributes

AutoZ - (boolean) True for automatic multi-level cuts in RoughFinish or Pocket

AutoZMaxDepthOfCut - (float) Maximum depth of cut for auto-z cuts

AutoZMinDepthOfCut - (float) Minimum depth of cut for auto-z cuts

AutoZRampAngle - (float) Ramp angle for auto-z cuts

AutoZRapidLevelIsAbsolute - (float) True if rapid level is absolute for Auto Z, False for relative

AutoZStockZ - (float) Z stock for auto-z cuts

Bidirectional - (boolean) True for bi-directional cuts in RoughFinish

BottomOfHole - (float) Bottom of hole in DrillTap

BottomRadius - (float) Bottom radius of sloping side

ChamferDepth - (float) Depth for chamfer drilling

CheckFoulCurrentSurface - (boolean) True to check for fouling the current surface in 3D Surface
Machining using Parameter Lines

CheckFoulOtherMachinedSurfaces - (boolean) True to check for fouling other machined surfaces in 3D


Surface Machining using Parameter Lines

ChordError - (float) Chord error for Engrave or 3D Surface machining

[Link] 2026-03-29
Objects - Objects Page 190 of 375

CompOnRapid - (boolean) True to apply compensation on Rapid approach in RoughFinish

Coolant -(short) Coolant, acamCoolNONE = 0, acamCoolMIST = 1, acamCoolFLOOD = 2,


acamCoolTOOL = 3

CuspHeight - (float) Cusp height for surface machining

CutDirection - (float) Cut Direction for Linear Pocket

CutFeed - (float) Cut feed

DepthOfCut - (float) Depth of cut for 3D machining

DepthsOfCutSpecified - (boolean) True for specified depths of cut, also set ThicknessFirstCut and
ThicknessLastCut

Diameter - (double) Effective tool diameter

DirectionAngle - (double) Angle for polyline machining, relative to surface normal

DownFeed - (float) Down feed for RoughFinish etc (not drilling)

DrillFeed - (float) Feedrate for drilling

DrillGlobalLinear - (boolean) True to use Global / Linear code for drilling, False to use Canned Cycle or
LocalLinear

DrillLocalLinear - (boolean) True to use Local/ Linear code for drilling, False to use Canned Cycle or
GlobalLinear

DrillSubroutines - (boolean) True to use subroutines for drilling

DrillType - (AcamDrillType) Type of drilling

DwellTime - (float) Dwell for peck drilling

EndAngle - (double) End angle for Radial surface machining

EndFaceMethod - (acamEndFaceMethod) Type of machining on end face, acamEndFaceMethodCAXIS


= 0 or acamEndFaceMethodYAXIS =1 (Lathe only)

EngraveCornerAngleLimit - (float) For Engrave, ignore corners if the angle is more than this

EngraveCornerAngleMin - (float) For Engrave, ignore corners if the angle is less than this

EngraveType - (AcamEngraveType) Engrave method: acamEngraveGEOMETRIES,


acamEngraveGUIDE_LINES_APPROX or acamEngraveGUIDE_LINES_EXACT

FacetToleranceMultiplier - (double) Facet tolerance = ChordError multiplied by this (for 3D machining)

[Link] 2026-03-29
Objects - Objects Page 191 of 375

FeedDownDistance - (float) Feed down distance for 3D machining

FinalDepth - (double) Final depth for machining eg RoughFinish (not drilling)

FinalPassIsland - (short) Final pass around islands for pocketing, acamFinalPassFULL = 0,


acamFinalPassPARTIAL = 1, acamFinalPassNONE = 2

GivenHoleDiameter - (double) Hole diameter to select holes to drill

HelicalInterpolation - (boolean) True to use helical interpolation for rough/finish. Pitch is given by
MaxDepthPerCut, or [Link] if zero

HoleDepthIsShoulder - (boolean) True if hole depth is measured to drill shoulder

InitialStock - (single) Initial Stock amount when using multiple number of cuts (for XY stock) for
Rough/Finish

InnerRadius - (double) Inner Radius for Spiral Surface Machining

IsDrilling - (boolean) True if a drilling operation

KnifeLoops - (boolean) True for knife loops

LoopRadius - (float) Radius for loops in RoughFinish

MaterialTop - (double) Material top

MaxDepthPerCut - (float) Maximum depth per cut for sloping side

McComp - (short) Machine compensation, acamCompTOOLCEN = 0, acamCompMC = 1,


acamCompBOTH = 2

NoUpdate - (boolean) True to suppress association of geometry and tool paths for this process

NumberOfCuts - (short) Number of Z levels

OffsetNumber - (long) Tool offset number

OpGroup - (long) Operation Group, Lathe only

OpNo - (short) Operation number

OpSequenceNo - (long) Operation Sequence number, Lathe only (read-only)

OuterRadius - (double) Outer Radius for Spiral Surface Machining

OverlapOnOpenElements - (double) For RoughFinish with open elements

PeckDistance - (float) Peck distance for peck drilling

[Link] 2026-03-29
Objects - Objects Page 192 of 375

PocketOrder - (AcamPocketOrder) Order of pocket toolpaths for multiple Z levels,


acamPocketOrderZONE = 0, acamPocketOrderDEPTH= 1

PocketType - (AcamPocketType) Type of pocket operation, acamPocketCONTOUR = 0,


acamPocketLINEAR = 1, acamPocketSPIRAL = 2

PocketUsePreviousMachining - (boolean) True to take account of previous machining in Pocket

PolylineMcComp - (Boolean) True if Machine Comp (G41/42) is to be used for Machine Polyline

PolylineToolSide - (AcamToolSide) Tool side for Machine Polyline

ProcessType2

RapidDownTo - (double) Z level to rapid down to

RetractPartial - (Boolean) True for Partial Retract in Peck Drilling

RotationAngle - (double) Tool Rotation angle eg for Machine Polyline

RoughFinishNumberOfCuts - (long) Number of cuts (for XY stock) for Rough/Finish

RoughFinishUsePreviousMachining - (boolean) True to take account of previous machining in


Rough/Finish

RoughFinishPreMCOverlap - (float) Overlap for previous machining in Rough/Finish

SafeRapidLevel - (double) Z level to rapid at

SawAngle - (double) Angle for saw. (For elements whose angles are not set by element property
SawAngle)

SawExternalCornerDistance - (double) External corner distance (If SawExternalCorners is not


acamSawCUT_ON)

SawExternalCorners - (AcamSawCornerType) How to saw external corners: acamSawCUT_ON,


acamSawCUT_PAST or acamSawCUT_TO

SawHeadPosition - (AcamSawHeadPosition) Head position if tool vertical: acamSawHeadLEFT or


acamSawHeadRIGHT

SawInternalCornerDistance - (double) Internal corner distance (If SawInternalCorners is not


acamSawCUT_ON)

SawInternalCorners - (AcamSawCornerType) How to saw internal corners: acamSawCUT_ON,


acamSawCUT_PAST or acamSawCUT_TO

SawOpenEndsDistance - (double) Open ends distance (If SawOpenEnds is not acamSawCUT_ON)

SawOpenEnds - (AcamSawCornerType) How to saw open ends: acamSawCUT_ON,

[Link] 2026-03-29
Objects - Objects Page 193 of 375

acamSawCUT_PAST or acamSawCUT_TO

SawResetElementAngles (Boolean) If True, element angles set by the element property SawAngle will
be reset, so the MillData SawAngle property will be used for every element.

SideAngle - (float) Side angle of sloping side

Sides - (short) Sides for RoughFinish or Pocket, acamSidesVERTICAL = 0, acamSidesSLOPING = 1,


acamSidesPROFILED = 2

SideTiltAngle - (double) Angle for polyline machining, relative to surface normal

SlopeMaxError - (float) Maximum error for sloping side

SpindleSpeed - (float) Spindle speed

StartAngle - (double) Start angle for Radial surface machining

StartCutting - (short) Start cutting at, for pocketing, acamStartINSIDE = 0, acamStartOUTSIDE = 1

StepAngle - (double) Angle step for Radial surface machining

StepLength - (float) StepLength for Engrave

Stock - (float) Stock allowance

StockXY - (float) XY Stock for Z-Contour roughing

StockZ - (float) Z Stock for Z-Contour roughing

SurfaceMC5AxisAngle - (double) Angle between tool and surface normal for 5-axis surface machining

SurfaceMCAction - (AcamSurfaceMCAction) Surface machining action,


acamSurfaceMCActionMCSURFACES = 0, acamSurfaceMCActionTOOLSIDE = 1,
acamSurfaceMCActionROUGHING = 2, acamSurfaceMCActionINTERSECTION = 3

SurfaceMCAxisType - (AcamToolAngleType) Type of surface machining, acamAxis3 = 0,


acamAxis4XZ = 1, acamAxis4YZ = 2, acamAxis5 = 3, acamAxis3HELICAL = 4, acamAxis4XY = 5

SurfaceMCCutInnerSurfaces - (boolean) True to cut the inner rather than outer surfaces in Z-Finishing

SurfaceMCCW - (boolean) True for CW tool paths in eg Projected Contours surface machining

SurfaceMCLeadAndLinks - (boolean) True to add lead-in/out and links to surface machining

SurfaceMCLeadArcRadius - (double) Arc radius for lead and links in surface machining

SurfaceMCLeadExtensionLength - (double) Extension length for lead and links in surface machining

SurfaceMCLeadRampAngle - (double) Ramp angle for lead and links in surface machining

[Link] 2026-03-29
Objects - Objects Page 194 of 375

SurfaceMCLeadRampLength - (double) Ramp length for lead and links in surface machining

SurfaceMCLeadSmoothLinks - (boolean) True to make the links smooth in surface machining

SurfaceMCLowerZ - (double) Lower Z level for Z-Finishing

SurfaceMCMethod - (AcamSurfaceMCMethod) Surface machining method,


acamSurfaceMCPARAMETER_LINES = 0, acamSurfaceMCZ_CONTOURS = 1, acamSurfaceMCXY
= 2, acamSurfaceMCPROJECTED_CONTOURS = 3, acamSurfaceMCRADIAL = 4,
acamSurfaceMCSPIRAL = 5, acamSurfaceMCREST_MACHINING = 6,
acamSurfaceMCSINGLE_DRIVE_CURVE = 7, acamSurfaceMCPARALLEL_SHALLOWSLOPES =
8, acamSurfaceMCZ_CONTOURS_STEEPSLOPES = 9

SurfaceMCRoughingUsePreviousMachining - (boolean) True to take account of previous machining in


3D Roughing

SurfaceMCSideCheckFoulAtEdge - (boolean) True to check for fouling at edge of surface in 3D


machining with tool-side

SurfaceMCSideToolAxis - (AcamSideToolAxis) Tool axis for 3D machining with tool-side,


acamToolAxisPERP_TO_PICKED_EDGE = 0, acamToolAxisPERP_TO_OTHER_EDGE = 1,
acamToolAxisPARALLEL_TO_PARM_LINES = 2

SurfaceMCToolCanUndercut - (boolean) True if the tool can undercut

SurfaceMCUpperZ - (double) Upper Z level for Z-Finishing

SurfaceMCUseFlatAreas - (boolean) True to find flat areas in Z-level machining

SurfaceMCZOrder - (AcamSurfaceMCZOrder) Set order of tool paths created by Horizontal Z


Finishing: acamSurfaceMCZOrderZONE = 0 or acamSurfaceMCZOrderDEPTH = 1

SurfaceMillingType - (AcamSurfaceMillingType) Climb or Conventional Milling for Surface Z-


Finishing. AcamMillingCLIMB = 0, acamMillingCONVENTIONAL = 1

SurfaceRestMCPrevToolDia - (double) Diameter of previous tool for Rest Machining

SurfaceRestMCType - (AcamRestMCType) Type of rest machining to do

ThicknessFirstCut - (float) Z Thickness of first cut, if DepthsOfCutSpecified set

ThicknessLastCut - (float) Z Thickness of last cut, if DepthsOfCutSpecified set

ThreadPitch - (float) Pitch for tapping

TiltAngle - (double) Tool Tilt angle eg for Machine Polyline

ToolAngle - (double) Tool angle relative to path eg for Machine Polyline

ToolAngleType - (AcamToolAngleType) Method to set tool angle for Machine Polyline,

[Link] 2026-03-29
Objects - Objects Page 195 of 375

acamToolAngleSURFACE_NORMAL = 0, acamToolAnglePERP_TO_PATH = 1,
acamToolAnglePERP_TO_XY = 2, acamToolAnglePARALLEL_TO_SURFACE = 3,
acamToolAngleSET_ANGLES = 4 , acamToolAngleSET_VECTOR = 5

ToolNumber - (long) Tool number

ToolVectorX - (float) X component of Tool Vector eg for Machine Polyline

ToolVectorY - (float) Y component of Tool Vector eg for Machine Polyline

ToolVectorZ - (float) Z component of Tool Vector eg for Machine Polyline

TopRadius - (float) Top radius of sloping side

TraverseAtRPlane - (boolean) True to traverse at R-plane in drilling

WhichHoles - (short) Holes for drilling, acamHolesCIRCLES = 0, acamHolesCROSSES = 1,


acamHolesMATCH_DRILL = 2, acamHolesGIVEN_DIA = 3

WidthFirstCut - (single) XY width of first cut, if WidthsOfCutSpecified set

WidthLastCut - (single) XY width of last cut, if WidthsOfCutSpecified set

WidthOfCut - (float) Width of cut for pocketing

WidthsOfCutSpecified - (boolean) True for specified widths of cut (if RoughFinishNumberOfCuts > 1),
also set WidthFirstCut and WidthLastCut

XYCorners - (short) Type of corners for RoughFinish, acamCornersROUND = 0,


acamCornersSTRAIGHT = 1, acamCornersLOOP = 2

ZSubroutines - (boolean) True for subroutines for multiple Z levels

[Link]

Calculate the feeds and speed to be used for the current tool and material.

Syntax

[Link] (Drill)

boolean Drill True if feeds and speed are for a drilliing operation

Remarks

The properties CutFeed, DownFeed and SpindleSpeed are set to the calculated values.

[Link]

Do Cut polyline operation on currently selected polyline geometries, using properties set for this

[Link] 2026-03-29
Objects - Objects Page 196 of 375

MillData object.

Syntax

[Link]

[Return] Paths Returned Paths object

The example draws two polylines and machines them.

Public Sub TestPolyline()

Dim Drw As Drawing


Dim PLine As PolyLine
Dim Geo As Path

Set Drw = [Link]

' Draw and select a polyline


Set PLine = Drw.Create3DPolyline(0, 0, 0)
[Link] 10, 0, 5
[Link] 20, 5, 10
[Link] 40, 10, 5
[Link] 50, 5, 0

Set Geo = [Link]


[Link] = True

' Draw and select another polyline


Set PLine = Drw.Create3DPolyline(0, 50, 0)
[Link] 10, 55, 10
[Link] 20, 65, 15
[Link] 40, 70, 10
[Link] 50, 65, 0

Set Geo = [Link]


[Link] = True
[Link] [Link] & "licomdat\[Link]\Ball End - [Link]"
' Machine the polylines
Dim MD As MillData
Set MD = [Link]

With MD
.SafeRapidLevel = 20

.DepthOfCut = 5
.FeedDownDistance = 2

.SurfaceMCAxisType = acamAxis5
.PolylineToolSide = acamLEFT
.ToolAngleType = acamToolAnglePERP_TO_PATH

[Link] 2026-03-29
Objects - Objects Page 197 of 375

.ToolAngle = 15

' .ToolAngleType = acamToolAngleSET_ANGLES

' .RotationAngle = 45

' .TiltAngle = 10

' .ToolAngleType = acamToolAngleSET_VECTOR

' Set tool vector, Alphacam will convert to unit vector

' .ToolVectorX = 1

' .ToolVectorY = 1

' .ToolVectorZ = 1

' .ToolAngleType = acamToolAnglePARALLEL_TO_SURFACE

' .ToolAngleType = acamToolAngleSURFACE_NORMAL

Dim Ps As Paths
Set Ps = .CutPolylines
End With
[Link] = True

End Sub

[Link]

Do Drill / Tap operation on currently selected geometries, using properties set for this MillData object.

Syntax

[Link]

[Return] Paths Returned Paths object

The example draws an array of circles, lets the user select ones to drill, and drills and taps them.

Public Sub DrillAndTapHoles()

[Link]

Dim Drw As Drawing


Set Drw = [Link]

' Draw the circles


Dim X As Double, Y As Double

[Link] 2026-03-29
Objects - Objects Page 198 of 375

For X = 0 To 200 Step 32


For Y = 0 To 100 Step 25
[Link] 10, X, Y
Next Y
Next X

' Let the user select some


Dim Geos As Paths
Set Geos = [Link]("Select circles to drill", 0)
If [Link] = 0 Then
End
End If

' Select the circles


[Link] = True

' Select a drill


[Link] [Link] & "LICOMDAT\[Link]\Drill - [Link]"

' Setup the machining data


Dim MD As MillData
Set MD = [Link]

[Link] = acamDRILL
[Link] = 20
[Link] = 1
[Link] = -15

' Create the tool paths


[Link]
' Select the circles again
[Link] = True

' Select a tap


[Link] [Link] & "LICOMDAT\[Link]\Tap - 10mm x 1mm [Link]"

[Link] = acamTAP
[Link] = 20
[Link] = 1
[Link] = -10
[Link] = 100
[Link] = [Link]

' Create the tool paths


[Link]

End Sub

[Link]

Do Engrave operation on currently selected geometries or constructions, using properties set for this

[Link] 2026-03-29
Objects - Objects Page 199 of 375

MillData object.

Syntax

[Link]

[Return] Paths Returned Paths object

Remarks

If property EngraveType is acamEngraveGEOMETRIES then the currently selected geometries will be


engraved. If it is acamEngraveGUIDE_LINES_APPROX or acamEngraveGUIDE_LINES_EXACT the
currently selected constructions will be used to control the tool. See the Alphacam help file for details.

The properties EngraveCornerAngleLimit, ChordError and StepLength control the engraving, they can
be left at default values if desired.

The example will draw a rectangle and engrave it:

Public Sub EngraveRectangle()

[Link]

Dim Drw As Drawing


Set Drw = [Link]
GetMillTool "User - Cone - 10mm x 45 deg"

' Draw the geometry, set the tool side and select it
Dim Geo As Path
Set Geo = [Link](0, 0, 100, 100)
[Link] 50, 100
[Link] = acamINSIDE
[Link] = True

' Setup the machining data


Dim MD As MillData
Set MD = [Link]

[Link] = acamEngraveGEOMETRIES
[Link] = acamCornersSTRAIGHT

[Link] = 20
[Link] = 1
[Link] = -4
[Link] = 120

' [Link] = 0.01

' [Link] = 0.1

[Link] 2026-03-29
Objects - Objects Page 200 of 375

' Create the tool path


Dim Tps As Paths
Set Tps = [Link]
[Link] = True

End Sub

[Link]

Get the lead data for this operation. An object of type LeadData will be returned.

Syntax

[Link]

[Return] LeadData LeadData object

See example.

MillData.GetLeadData3D

Get the 3D lead data for this operation. An object of type LeadData3D will be returned.

Syntax

MillData.GetLeadData3D

[Return] LeadData LeadData3D object

See example.

[Link]

Machine currently selected surfaces, using properties set for this MillData object.

Syntax

[Link]

[Return] Paths Returned Paths object

See examples

[Link]

Start a manual tool path, using properties set for this MillData object. An object of type
MillManualToolPath will be returned. Its methods may then be used to build up one or more tool paths.

[Link] 2026-03-29
Objects - Objects Page 201 of 375

Syntax

[Link] (StartX, StartY, StartZ)

double StartX X coordinate of start point

double StartY Y coordinate of start point

double StartZ Z coordinate of start point

[Return] MillManualToolPath returned MillManualToolPath object

Remarks

If the Attribute with name "LicomUKDMBOperationName" is set for the MillData object it will be used
as the name of the operation in the operation list and the NC code.

It should be read from the text file (if the macro has one) and should be upper-case because it will
appear in the NC code.

[Link]

Machine currently selected solids using properties set for this MillData object.

Syntax

[Link]

[Return] Paths Returned Paths object

See examples

[Link]

Do Pocket operation on currently selected geometries, using properties set for this MillData object.

Syntax

[Link]

[Return] Paths Returned Paths object

The example draws a rectangle with filleted corners, puts the ghost tool on the inside, draws a circle
inside it with the ghost tool on the outside, selects both geometries, selects a tool and pockets it.

Sub PocketRectangle()

Dim drw As Drawing

Set drw = [Link]

[Link] 2026-03-29
Objects - Objects Page 202 of 375

Dim width As Double

Dim height As Double

Dim corner_rad As Double

width = 150

height = 100

corner_rad = 10

Dim geo As Geo2D

Dim p1 As Path, p2 As Path

Set geo = drw.Create2DGeometry (-width / 2, 0)

[Link] -width / 2, height

[Link] width / 2, height

[Link] width / 2, 0

Set p1 = [Link]

[Link] corner_rad

[Link] = acamINSIDE

[Link] = True

set p2 = [Link] (height * .6, 0, height / 2)

[Link] = acamOUTSIDE

[Link] = True

[Link]

[Link] [Link] & "licomdat\[Link]\Flat - [Link]"

Dim mc As MillData

Set mc = [Link]

[Link] = acamPocketCONTOUR

[Link] = 20

[Link] 2026-03-29
Objects - Objects Page 203 of 375

[Link] = 1

[Link] = -8

[Link] = 7.5

[Link] = 1

[Link]

End Sub

[Link] (Lathe only)

Rotate the Y-axis work area.

Syntax

[Link] (Angle)

double Angle Absolute value of angle in degrees

[Link]

Do Rough / Finish operation on currently selected geometries, using properties set for this MillData
object.

Syntax

[Link]

[Return] Paths Returned Paths object

The example draws a rectangle and creates a finish path with lead-in/out.

Public Sub FinishPath()

Dim Drw As Drawing


Set Drw = [Link]
[Link] [Link] & "LICOMDAT\[Link]\Flat - [Link]"

' Draw the geometry, set the tool side and select it
Dim Geo As Path
Set Geo = [Link](0, 0, 100, 100)
[Link] 50, 100
[Link] = acamOUTSIDE
[Link] = True

' Setup the machining data


Dim MD As MillData

[Link] 2026-03-29
Objects - Objects Page 204 of 375

Set MD = [Link]

[Link] = acamCornersSTRAIGHT
[Link] = 20
[Link] = 1
[Link] = -10

' Create the tool path, storing the returned Paths


' object so lead-in/out can be added
Dim Tps As Paths
Set Tps = [Link]

' Add lead-in/out


Tps(1).SetLeadInOutAuto acamLeadARC, acamLeadLINE, 1.5, 1.5, 45, False, False, 0

[Link]

End Sub

[Link]

Do Saw operation on currently selected geometries, using properties set for this MillData object.

Syntax

[Link]

[Return] Paths Returned Paths object

The example defines and selects a Saw tool, then draws a rectangle, puts the ghost tool on the outside,
selects it and saws it.

Public Sub CutWithSaw()

Dim Drw As Drawing

Set Drw = [Link]

Dim ToolName As String

ToolName = DefineSaw

[Link] ToolName

Dim P2 As Path

[Link] 2026-03-29
Objects - Objects Page 205 of 375

Set P2 = [Link](100, 6, True, 200, 0)

[Link] = acamOUTSIDE

[Link] = True

Dim MD As MillData

Set MD = [Link]

[Link] = acamSawCUT_ON

[Link] = acamSawCUT_PAST

[Link] = 10

[Link] = acamSawHeadLEFT

[Link] = 0

[Link] = 20

[Link] = 2

[Link] = 0

[Link] = -20

[Link] = 3

[Link] = 2

Dim PS As Paths

Set PS = [Link]

MsgBox [Link]

End Sub

Public Function DefineSaw() As String

[Link] 2026-03-29
Objects - Objects Page 206 of 375

Dim Tool As MillTool

Set Tool = [Link]

With Tool

.Type = acamToolWHEEL ' = Saw

.Name = "Saw 100mm(API)"

.Number = 85

.Diameter = 100

.Length = 10 ' = Width of Saw

.FixedFeed = 10

.FixedDownFeed = 3

.FixedSpeed = 100

.Units = 0

DefineSaw = [Link] + "licomdat\[Link]\Saw 100mm(API).art"

.SaveAs DefineSaw

End With

End Function

[Link]

Set the lead data for this operation.

Syntax

[Link] (LD)

LeadData LD LeadData object

See example.

MillData.SetLeadData3D

Set the 3D lead data for this operation.

[Link] 2026-03-29
Objects - Objects Page 207 of 375

Syntax

MillData.SetLeadData3D (LD)

LeadData3D LD LeadData3D object

See example.

[Link]

Set side profile for profiled sides in RoughFinish or Pocket.

Syntax

[Link] (Path, RefPtX, RefPtY)

Path Path Path object for profile

double RefPtX X coordinate of reference point

double RefPtY Y coordinate of reference point

[Link]

For Roughing, use currently selected STL or Solid as material.

Syntax

[Link]

[Link]

Set the drive curve for machining surfaces using a drive curve. This is used when SurfaceMCMethod =
acamSurfaceMCSINGLE_DRIVE_CURVE

Syntax

[Link] (Path)

Path Path The single path to use as a drive curve

[Link]

Set the boundary geometries for surface machining.

Syntax

[Link] (Paths)

[Link] 2026-03-29
Objects - Objects Page 208 of 375

Paths Paths Paths object containing one or more Path objects.

Remarks

Some surface machining methods will use just the first path, some will use all of them.

[Link]

Set the surfaces and start points for machining along the intersection of two surfaces.

Syntax

[Link] (Surface1, Surface2, X1, Y1, Z1, X2, Y2, Z2)

Surface Surface1 First surface

Surface Surface2 Second surface

double X1

double Y1 Start point on first surface

double Z1

double X2

double Y2 Point on first surface to set direction of cut

double Z2

[Link]

Set the start points for machining using parameter lines or tool-side.

Syntax

[Link](X1, Y1, Z1, X2, Y2, Z2)

double X1

double Y1 Start point on surface

double Z1

double X2

double Y2 Point on surface to set direction of cut

double Z2

[Link] 2026-03-29
Objects - Objects Page 209 of 375

Remarks

The points should be on or close to a surface. This will also set the start surface.

[Link] (Lathe only)

Set the geometry to be used as the work area for Y-axis machining.

Syntax

[Link] (Geo)

Path Geo Path to be used as work area

MachineSurfaces Examples

Example 1: Machine Surfaces using Along Line in XY Plane.

Example 2: Machine a surface using Parameter Lines, checking against another surface.

Example 3: Rough all the surfaces.

Example 4: Machine surfaces using the side of the tool.

Example 1: Machine Surfaces using Along Line in XY Plane.

Public Sub MachineXY()

[Link] [Link] & "licomdat\[Link]\ball end - [Link]"


Dim MD As MillData
Set MD = [Link]

' Select all the surfaces for machining


Dim S As Surface
For Each S In [Link]
[Link] = True
Next S
' Select the boundary
Dim P As Path
Set P = [Link](10, 10, 90, 90)
Dim PS As Paths
Set PS = [Link]
[Link] P
[Link] PS

[Link] = 50
[Link] = 0.1

' [Link] = 5

[Link] 2026-03-29
Objects - Objects Page 210 of 375

[Link] = 0.1
[Link] = acamSurfaceMCActionMCSURFACES
[Link] = acamSurfaceMCXY
[Link] = 0

[Link]

End Sub

Example 2: Machine a surface using Parameter Lines, checking against another surface.

Public Sub MachineParameterLines()

[Link] [Link] & "licomdat\[Link]\ball end - [Link]"


Dim MD As MillData
Set MD = [Link]

' Select first surface for machining


Dim S As Surface
Set S = [Link](1)
[Link] = True

' Set second surface to be checked against


Set S = [Link](2)
[Link] = True

' Select the boundary


Dim P As Path
Set P = [Link](10, 10, 140, 90)
Dim PS As Paths
Set PS = [Link]
[Link] P
[Link] PS

[Link] = 0.1
[Link] = 5

' Set start and second point. They must be inside the boundary.
[Link] 20, 20, 0, 30, 20, 0

[Link] = acamSurfaceMCActionMCSURFACES
[Link] = acamSurfaceMCPARAMETER_LINES

[Link]

End Sub

Example 3: Rough all the surfaces.

Public Sub ZContourRoughing()

[Link] 2026-03-29
Objects - Objects Page 211 of 375

[Link] [Link] & "licomdat\[Link]\flat - [Link]"


Dim MD As MillData
Set MD = [Link]

' Select all the surfaces


Dim S As Surface
For Each S In [Link]
[Link] = True
Next S

[Link] = acamSurfaceMCActionROUGHING
[Link] = acamPocketCONTOUR

[Link] = 10
[Link] = 2.5
[Link] = 5
[Link] = 3
[Link] = 0.5
[Link]

End Sub

Example 4: Machine surfaces using the side of the tool.

Public Sub MachineWithToolSide()

[Link] [Link] & "licomdat\[Link]\flat - [Link]"


Dim MD As MillData
Set MD = [Link]

Dim S As Surface
For Each S In [Link]
[Link] = True
Next S

[Link] = acamAxis5

[Link] = 50
[Link] = 1

[Link] = 0.1

[Link] = False
[Link] = acamToolAxisPARALLEL_TO_PARM_LINES

[Link] 80, 17, 0, 78, 75, 0

[Link] = acamSurfaceMCActionTOOLSIDE
Dim TP As Paths
Set TP = [Link]

[Link] 2026-03-29
Objects - Objects Page 212 of 375

End Sub

MillDataMachiningEngine Object
An object used to do 3D roughing of solid or surface models using the Planit Machining Engine
introduced in Alphacam 2010 R1.

To use the object create a MillData object and set the properties as usual, then create a
MillDataMachiningEngine object using the MillDataMachiningEngine property of the MillData object,
and set the extra properties of this object. These are properties used by the Machining Engine which are
described in the main Alphacam help file.

MillDataMachiningEngine Properties

ApproachType AcamMEApproachType

MillType AcamMillType

LinkMethod AcamMELinkMethod

LinkType AcamMELinkType

IntermediateWidthOfCut double

IntermediateMaxDepthPerCut double

IntermediatePercentageFeed double

MaxPlungeDepth double

XYStandOff double

MinimumRadius double

WidthOfCutCleanUp double

CentreCuttingTool bool

CloseOpenPockets bool

AvoidRollover bool

FeedWhenPlunging bool

HighSpeedCornering bool

Trochoidal bool

[Link] 2026-03-29
Objects - Objects Page 213 of 375

RampAngle double

MillDataMachiningEngine Examples

3D Solid Roughing

3D Surface Roughing

[Link]

Specify the coordinates of a hole that can be used for approach, if the property ApproachType =
acamMEApproachPreDrilledHoles. This method may be called as many times as required,
StartDrillPoints should be called first.

Syntax

[Link](X, Y, Z)

double X X coordinate of centre of hole.

double Y Y coordinate of centre of hole.

double Z Z coordinate of bottom of hole. The tool will not plunge lower than this.

[Link]

Machine currently selected solids using properties set for this MillDataMachiningEngine object, using
the Planit Machining Engine.

Syntax

[Link]

[Return] Paths Returned Paths object

See example

[Link]

Machine currently selected surfaces, using properties set for this MillDataMachiningEngine object,
using the Planit Machining Engine.

Syntax

[Link] 2026-03-29
Objects - Objects Page 214 of 375

[Link]

[Return] Paths Returned Paths object

See example

[Link]

Specify the Path and/or STL to be used as material for a Z Contour Roughing.

Syntax

[Link](Materials)

AlphacamObjects Materials the Path and/or STL to used as material.

Example...

Dim PMat As Path

Dim Materials As AlphacamObjects

Dim SP As SolidPart

Dim MDME As MillDataMachiningEngine

Dim MD As MillData

Dim SP1 As SolidPart

' part - open solid file and stl file

[Link] [Link] & _

"licomdir\cadfiles\SIMPLE MILL [Link]", "", True

[Link] [Link] & _

"licomdir\cadfiles\block [Link]", "", False

[Link] 2026-03-29
Objects - Objects Page 215 of 375

' material

Set PMat = [Link](-85, -55, 85, 55)

[Link] 25, 0 ' need this to set the Z levels

Set Materials = [Link]

[Link] PMat

' add STL to materials object

Set SP = [Link](2)

[Link] SP

' select the tool

[Link] [Link] & "licomdat\[Link]\flat - [Link]"

Set MD = [Link]

' select solid to machine

Set SP1 = [Link](1)

[Link] = True

[Link] = acamSurfaceMCActionROUGHING

[Link] = 50

[Link] = 5

[Link] = 41

[Link] = 5

[Link] 2026-03-29
Objects - Objects Page 216 of 375

[Link] = 0.5

[Link] = 0.25

' use Machining Engine, set materials and machine

Set MDME = [Link]

[Link] Materials

[Link] = AcamMillTypeOptimised

[Link]

[Link]

Clear the list of drilled points. Should be called before calling AddDrillPoint for each drill point.

Syntax

[Link]

Example 1: 3D Solid Roughing using the Machining Engine

Const ATTR_GEO_Z_LEVEL_TOP As String = "LicomUKDMBGeoZLevelTop"

Const ATTR_GEO_Z_LEVEL_BOTTOM As String = "LicomUKDMBGeoZLevelBottom"

' 3D Solid Roughing using the Machining Engine.

' This macro drills some holes so the Pre-Drilled-Holes option can be used,

' then roughs with a 10mm tool and then rest-roughing with a 2mm tool

' If the OpenExternalFile call fails edit the path to the Cadfiles folder on your PC.

Public Sub ZContourRoughingSolid()

' Part

[Link] [Link] & "licomdir\cadfiles\SIMPLE MILL [Link]", "",


True

' Material

[Link] 2026-03-29
Objects - Objects Page 217 of 375

Dim PMat As Path

Set PMat = [Link](-85, -55, 85, 55)

[Link] 25, 0

' Create and drill holes that can be used to plunge into.

' The Z value should be the bottom of the hole.

MakeDrillHoles

' Tool

[Link] [Link] & "licomdat\[Link]\flat - [Link]"

Dim MD As MillData

Set MD = [Link]

' Solids to machine

SelectSolidsNotMat

[Link] = acamSurfaceMCActionROUGHING

[Link] = acamPocketCONTOUR

[Link] = 30

[Link] = 5

[Link] = 26

[Link] = 5

[Link] = 0.5

[Link] = 0.25

[Link] 2026-03-29
Objects - Objects Page 218 of 375

[Link] = acamSurfaceMCZOrderZONE

[Link] = True

' Use V9 Machining Engine

Dim MDME As MillDataMachiningEngine

Set MDME = [Link]

[Link] = AcamMillTypeClimb

[Link] = acamMEApproachPreDrilledHoles

[Link] = True

' Store the hole coordinates

[Link]

Dim P As Path

For Each P In [Link]

If [Link] = acamPathGEOMETRY Then

Dim CP As CircleProperties

Set CP = [Link]

If Not CP Is Nothing Then

[Link] [Link], [Link], [Link]


(ATTR_GEO_Z_LEVEL_BOTTOM)

End If

End If

Next P

[Link] 2026-03-29
Objects - Objects Page 219 of 375

[Link]

' Second tool

[Link] [Link] & "licomdat\[Link]\flat - [Link]"

SelectSolidsNotMat

[Link] = True

[Link] = 2

[Link] = 1

[Link] = acamMEApproachHelix

[Link] = 20

[Link] = 1

[Link] = True

[Link]

End Sub

' Select solids that aren't materials

Public Sub SelectSolidsNotMat()

Dim S As SolidPart

For Each S In [Link]

[Link] = ([Link]("LicomUKDMBStockType") = 0)

Next S

End Sub

' Make geometries for drill holes and drill them

Public Sub MakeDrillHoles()

[Link] 2026-03-29
Objects - Objects Page 220 of 375

Const Dia As Double = 10

Dim Drw As Drawing

Set Drw = [Link]

Dim P As Path

Set P = [Link](Dia, -40, 10)

[Link](ATTR_GEO_Z_LEVEL_TOP) = 25#

[Link](ATTR_GEO_Z_LEVEL_BOTTOM) = 0#

[Link] = True

Set P = [Link](Dia, 40, -10)

[Link](ATTR_GEO_Z_LEVEL_TOP) = 25#

[Link](ATTR_GEO_Z_LEVEL_BOTTOM) = 0#

[Link] = True

Set P = [Link](Dia, 0, 0)

[Link](ATTR_GEO_Z_LEVEL_TOP) = 25#

[Link](ATTR_GEO_Z_LEVEL_BOTTOM) = 10#

[Link] = True

[Link] [Link] & "licomdat\[Link]\drill - [Link]"

Dim MD As MillData

Set MD = [Link]

[Link] = True

[Link] = acamDRILL

[Link] = False

[Link] 2026-03-29
Objects - Objects Page 221 of 375

[Link] = 30

[Link] = 1.5

[Link]

End Sub

Example 2: 3D Surface Roughing using the Machining Engine

' 3D Surface Roughing using the Machining Engine

Public Sub ZContourRoughingSurfaces()

' Part

[Link] [Link] & "licomdir\3dtutor\Dome on curved [Link]"

' Material

Dim PMat As Path

Set PMat = [Link](0, 0, 100, 100)

[Link] 0, -25

' Tool

[Link] [Link] & "licomdat\[Link]\flat - [Link]"

Dim MD As MillData

Set MD = [Link]

' Surfaces to machine

SelectSurfaces

[Link] = acamSurfaceMCActionROUGHING

[Link] = acamPocketCONTOUR

[Link] = 10

[Link] 2026-03-29
Objects - Objects Page 222 of 375

[Link] = 5

[Link] = 1

[Link] = 5

[Link] = 0.5

[Link] = 0.25

[Link] = acamSurfaceMCZOrderZONE

[Link] = False

' Use V9 Machining Engine

Dim MDME As MillDataMachiningEngine

Set MDME = [Link]

[Link] = AcamMillTypeClimb

[Link] = acamMEApproachAutomatic

[Link] = [Link] * 0.5

' Use intermediate levels to clean up the dome

[Link] = 1

[Link] = [Link] * 0.5

[Link]

End Sub

Public Sub SelectSurfaces()

Dim S As Surface

[Link] 2026-03-29
Objects - Objects Page 223 of 375

For Each S In [Link]

[Link] = True

Next S

End Sub

MillManualToolPath Object
An object used to create a manual tool path in Mill.

To do a manual tool path first select a tool, then use [Link], set the Z levels and feeds and
speeds if required, then use [Link] to create a MillManualToolPath object. Call the
methods of this object to add lines and arcs to the manual tool path. Call Finish to finish the tool path.

There are 2D and 3D versions of each method. Use the 3D methods if you want complete control of the
tool path, including up and down rapids, or helical arcs. If you use any 3D methods some features will
not work eg multiple Z levels, you will have to implement this using linear code.

If the Attribute with name "LicomUKDMBOperationName" is set for the MillData object it will be used
as the name of the operation in the operation list and the NC code.

It should be read from the text file (if the macro has one) and should be upper-case because it will
appear in the NC code.

MillManualToolPath Examples

MillManualToolPath.Add2DArc2Point

Add a 2D arc, start point is end point of last line or arc, or point passed to [Link] if
this is the first line or arc.

Syntax

MTP.Add2DArc2Point (X2, Y2, X3, Y3)

double X2 X coordinate of second point

double Y2 Y coordinate of second point

double X3 X coordinate of end point

double Y3 Y coordinate of end point

[Link] 2026-03-29
Objects - Objects Page 224 of 375

MillManualToolPath.Add2DArcCenterIncludedAngle

Add a 2D arc, start point is end point of last line or arc, or point passed to [Link] if
this is the first line or arc.

MTP.Add2DArcCenterIncludedAngle (XCen, YCen, Angle)

double XCen X coordinate of center point

double YCen Y coordinate of center point

double Angle Included angle in degrees, CW -ve

MillManualToolPath.Add2DArcPointCenter

Add a 2D arc, start point is end point of last line or arc, or point passed to [Link] if
this is the first line or arc.

Syntax

MTP.Add2DArcPointCenter (X, Y, XCen, YCen, CW)

double X X coordinate of end point

double Y Y coordinate of end point

double XCen X coordinate of center point

double YCen Y coordinate of center point

boolean CW True for CW, False for CCW

MillManualToolPath.Add2DArcPointRadius

Add a 2D arc, start point is end point of last line or arc, or point passed to [Link] if
this is the first line or arc.

Syntax

MTP.Add2DArcPointRadius (X, Y, Radius, CW, Over180)

double X X coordinate of end point

double Y Y coordinate of end point

double Radius Arc radius

boolean CW True for CW, False for CCW

boolean Over180 True if included angle is more than 180 degrees

[Link] 2026-03-29
Objects - Objects Page 225 of 375

MillManualToolPath.Add2DLine

Add a 2D feed line, start point is end point of last line or arc, or point passed to
[Link] if this is the first line or arc.

Syntax

MTP.Add2DLine (X, Y)

double X X coordinate of end point

double Y Y coordinate of end point

MillManualToolPath.Add2DRapid

Add a 2D rapid line, start point is end point of last line or arc, or point passed to
[Link] if this is the first line or arc.

Syntax

MTP.Add2DRapid (X, Y)

double X X coordinate of end point

double Y Y coordinate of end point

MillManualToolPath.Add2DTanArcPoint

Add a 2D arc, tangential to last line or arc, start point is end point of last line or arc. Can not be the first
line or arc in a geometry.

Syntax

MTP.Add2DTanArcPoint(X, Y)

double X X coordinate of end point

double Y Y coordinate of end point

MillManualToolPath.Add3DArc2Point

Add a 3D helical arc, start point is end point of last line or arc, or point passed to
[Link] if this is the first line or arc.

Syntax

MTP.Add3DArc2Point (X2, Y2, X3, Y3, Z3)

double X2 X coordinate of second point

[Link] 2026-03-29
Objects - Objects Page 226 of 375

double Y2 Y coordinate of second point

double X3 X coordinate of end point

double Y3 Y coordinate of end point

double Z3 Z coordinate of end point

MillManualToolPath.Add3DArc2PointAndToolVector

Add a 3D helical arc, with a specified tool vector at the end of the arc, start point is end point of last line
or arc, or point passed to [Link] if this is the first line or arc.

Syntax

MTP.Add3DArcPointRadiusAndToolVector (X, Y, Z, Radius, XVector, YVector, ZVector)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

double XVector X component of tool axis vector

double YVector Y component of tool axis vector

double ZVector Z component of tool axis vector

MillManualToolPath.Add3DArcCenterIncludedAngle

Add a 3D helical arc, start point is end point of last line or arc, or point passed to
[Link] if this is the first line or arc.

MTP.Add3DArcCenterIncludedAngle (XCen, YCen, Angle, EndZ)

double XCen X coordinate of center point

double YCen Y coordinate of center point

double Angle Included angle in degrees, CW -ve

double EndZ Z coordinate of end point

MillManualToolPath.Add3DArcCenterIncludedAngleAndToolVector

Add a 3D helical arc, with a specified tool vector at the end of the arc, start point is end point of last line
or arc, or point passed to [Link] if this is the first line or arc.

[Link] 2026-03-29
Objects - Objects Page 227 of 375

MTP.Add3DArcCenterIncludedAngleAndToolVector (XCen, YCen, Angle, EndZ, XVector, YVector,


ZVector)

double XCen X coordinate of center point

double YCen Y coordinate of center point

double Angle Included angle in degrees, CW -ve

double EndZ Z coordinate of end point

double XVector X component of tool axis vector

double YVector Y component of tool axis vector

double ZVector Z component of tool axis vector

MillManualToolPath.Add3DArcPointCenter

Add a 3D helical arc, start point is end point of last line or arc, or point passed to
[Link] if this is the first line or arc.

Syntax

MTP.Add3DArcPointCenter (X, Y, Z, XCen, YCen, CW)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

double XCen X coordinate of center point

double YCen Y coordinate of center point

boolean CW True for CW, False for CCW

MillManualToolPath.Add3DArcPointCenterAndToolVector

Add a 3D helical arc, with a specified tool vector at the end of the arc, start point is end point of last line
or arc, or point passed to [Link] if this is the first line or arc.

Syntax

MTP.Add3DArcPointCenterAndToolVector (X, Y, Z, XCen, YCen, CW, XVector, YVector, ZVector)

double X X coordinate of end point

double Y Y coordinate of end point

[Link] 2026-03-29
Objects - Objects Page 228 of 375

double Z Z coordinate of end point

double XCen X coordinate of center point

double YCen Y coordinate of center point

boolean CW True for CW, False for CCW

double XVector X component of tool axis vector

double YVector Y component of tool axis vector

double ZVector Z component of tool axis vector

MillManualToolPath.Add3DArcPointRadius

Add a 3D helical arc, start point is end point of last line or arc, or point passed to
[Link] if this is the first line or arc.

Syntax

MTP.Add3DArcPointRadius (X, Y, Z, Radius, CW, Over180)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

double Radius Arc radius

boolean CW True for CW, False for CCW

boolean Over180 True if included angle is more than 180 degrees

MillManualToolPath.Add3DArcPointRadiusAndToolVector

Add a 3D helical arc, with a specified tool vector at the end of the arc, start point is end point of last line
or arc, or point passed to [Link] if this is the first line or arc.

Syntax

MTP.Add3DArcPointRadiusAndToolVector (X, Y, Z, Radius, CW, Over180, XVector, YVector,


ZVector)

double X X coordinate of end point

double Y Y coordinate of end point

[Link] 2026-03-29
Objects - Objects Page 229 of 375

double Z Z coordinate of end point

double Radius Arc radius

boolean CW True for CW, False for CCW

boolean Over180 True if included angle is more than 180 degrees

double XVector X component of tool axis vector

double YVector Y component of tool axis vector

double ZVector Z component of tool axis vector

MillManualToolPath.Add3DLine

Add a 3D feed line, start point is end point of last line or arc, or point passed to
[Link] if this is the first line or arc.

Syntax

MTP.Add3DLine (X, Y, Z)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

MillManualToolPath.Add3DLineAndToolVector

Add a 3D feed line, with a specified tool vector at the end of the line, start point is end point of last line
or arc, or point passed to [Link] if this is the first line or arc.

Syntax

MTP.Add3DLineAndToolVector (X, Y, Z, XVector, YVector, ZVector)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

double XVector X component of tool axis vector

double YVector Y component of tool axis vector

[Link] 2026-03-29
Objects - Objects Page 230 of 375

double ZVector Z component of tool axis vector

MillManualToolPath.Add3DRapid

Add a 3D rapid line, start point is end point of last line or arc, or point passed to
[Link] if this is the first line or arc.

Syntax

MTP.Add3DRapid (X, Y, Z)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

MillManualToolPath.Add3DRapidAndToolVector

Add a 3D rapid line, with a specfied tool vector at the end of the line, start point is end point of last line
or arc, or point passed to [Link] if this is the first line or arc.

Syntax

MTP.Add3DRapidAndToolVector (X, Y, Z, XVector, YVector, ZVector)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

double XVector X component of tool axis vector

double YVector Y component of tool axis vector

double ZVector Z component of tool axis vector

MillManualToolPath.Add3DTanArcPoint

Add a 3D helical arc, tangential to last line or arc, start point is end point of last line or arc. Can not be
the first line or arc in a geometry.

Syntax

MTP.Add3DTanArcPoint(X, Y, Z)

double X X coordinate of end point

double Y Y coordinate of end point

[Link] 2026-03-29
Objects - Objects Page 231 of 375

double Z Z coordinate of end point

MillManualToolPath.Add3DTanArcPointAndToolVector

Add a 3D helical arc, with a specified tool vector at the end of the arc, tangential to last line or arc, start
point is end point of last line or arc. Can not be the first line or arc in a geometry.

Syntax

MTP.Add3DTanArcPointAndToolVector(X, Y, Z, XVector, YVector, ZVector)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

double XVector X component of tool axis vector

double YVector Y component of tool axis vector

double ZVector Z component of tool axis vector

[Link]

Finish the tool path. The tool path will be split into more than one path if necessary, and added to the
Alphacam database.

Syntax

[Link]

[Return] Paths Returned Paths object

Remarks

A tool path consists of usually one or more leading rapids, then feeds, then optionally one or more
trailing rapids. It may not have internal rapids. If it would have it will be split into more than one path.

The returned Paths object contains the resulting paths.

[Link]

Set the tool vector at the start of the path. It can only be called before any elements are added to the tool
path.

Syntax

[Link] (XVector, YVector, ZVector)

[Link] 2026-03-29
Objects - Objects Page 232 of 375

double XVector X component of tool axis vector

double YVector Y component of tool axis vector

double ZVector Z component of tool axis vector

MillManualToolPath Examples

Example 1, 2D tool paths.

Example 2, Helical arc.

Example 3, Facing a rectangle

Example 4, Simple 3D Lines

Example 5, Manual tool path with tool compensation on the machine

Example 1, 2D tool paths.

Note that because 2D methods are used the tool will rapid up to the safe rapid level automatically
between each tool path.

Public Sub TestManualToolPath2D()

[Link]
[Link] [Link] & "LICOMDAT\[Link]\Flat - [Link]"
Dim MD As MillData
Set MD = [Link]
[Link] = 50
[Link] = 2
[Link] = -8
[Link]("LicomUKDMBOperationName") = "2D TEST PATH"
Dim MTP As MillManualToolPath
Set MTP = [Link](100, 100, 0)

MTP.Add2DLine 200, 100


MTP.Add2DArcPointCenter 200, 200, 200, 150, False
MTP.Add2DLine 150, 200

MTP.Add2DRapid 100, 200

MTP.Add2DLine 150, 250


MTP.Add2DArcPointRadius 50, 250, 75, False, False
MTP.Add2DLine 100, 200

Dim PS As Paths
Set PS = [Link]

Dim Drw As Drawing

[Link] 2026-03-29
Objects - Objects Page 233 of 375

Set Drw = [Link]


[Link] = True
[Link] = True

MsgBox [Link] & " Paths", vbInformation

End Sub

Example 2, Helical arc.

A single helical arc. Note that the Post Processor must use the Z value (eg post variable AZ) in the dollar
numbers for arc.

Public Sub TestManualToolPath3DHelical()

[Link]
[Link] [Link] & "LICOMDAT\[Link]\User - Cone - 10mm x 45
[Link]"
Dim MD As MillData
Set MD = [Link]
[Link] = 50
[Link] = 2
[Link] = 0
[Link]("LicomUKDMBOperationName") = "3D HELICAL PATH"

Dim MTP As MillManualToolPath


Set MTP = [Link](50, 25, 0)

MTP.Add3DArcCenterIncludedAngle 75, 75, 270, -10

Dim PS As Paths
Set PS = [Link]

Dim Drw As Drawing


Set Drw = [Link]
[Link] = True
[Link] = True
[Link] = True

End Sub

Example 3, Facing a rectangle

Shows how the 3D methods can be used to give control over the rapids between paths. If 2D methods
were used the tool would rapid up to the safe rapid level between each pass.

Public Sub TestManualToolPathFace()

Const RapidLevel As Double = 25


Const ZDepth As Double = -2

[Link] 2026-03-29
Objects - Objects Page 234 of 375

Const X1 As Double = 0
Const Y1 As Double = 0
Const X2 As Double = 100
Const Y2 As Double = 75
Dim X As Double, Y As Double
Dim XMargin As Double, YStep As Double
Dim Direction As Boolean, First As Boolean

[Link]

Dim Drw As Drawing


Set Drw = [Link]

[Link] X1, Y1, X2, Y2

Dim Tool As MillTool


Set Tool = [Link]([Link] & "LICOMDAT\[Link]\Flat - [Link]")
XMargin = [Link] * 0.6
YStep = [Link] * 0.8

Dim MD As MillData
Set MD = [Link]
[Link] = RapidLevel
[Link] = ZDepth
[Link] = ZDepth
[Link]("LicomUKDMBOperationName") = "FACING"

Dim MTP As MillManualToolPath


Set MTP = [Link](X1, Y1, ZDepth)

First = True
Direction = True
For Y = Y1 To Y2 + YStep * 0.5 Step YStep
If Direction Then
If Not First Then
MTP.Add3DRapid X1 - XMargin, Y, ZDepth
End If
MTP.Add3DLine X2 + XMargin, Y, ZDepth
Else
If Not First Then
MTP.Add3DRapid X2 + XMargin, Y, ZDepth
End If
MTP.Add3DLine X1 - XMargin, Y, ZDepth
End If
First = False
Direction = Not Direction
Next Y

Dim PS As Paths
Set PS = [Link]

[Link] 2026-03-29
Objects - Objects Page 235 of 375

[Link] = True
[Link] = True

' MsgBox [Link] & IIf([Link] > 1, " Paths", " Path")

End Sub

Example 4, Simple 3D Lines

Public Sub TestManualToolPath3DLines()

[Link]
[Link] [Link] & "LICOMDAT\[Link]\User - Cone - 10mm x 45
[Link]"
Dim MD As MillData
Set MD = [Link]
[Link] = 150
[Link] = 2
[Link] = -20

[Link]("LicomUKDMBOperationName") = "3D TEST"


Dim MTP As MillManualToolPath
Set MTP = [Link](0, 0, -20)

MTP.Add3DLine 100, 0, 50
MTP.Add3DLine 100, 50, 50
MTP.Add3DLine 0, 50, -20

[Link]

Dim Drw As Drawing


Set Drw = [Link]
[Link] = True
[Link] = True

End Sub

Example 5, Manual tool path with tool compensation on the machine

Note that the ToolSide property must be set on the created tool paths, and lead-in/out moves must be
specified. This example marks the first and last elements as lead-in/out. The first element of a path will
be a rapid if it is not the first path in the drawing, this is tested for using the IsRapid property.

Alternatively, the [Link] method could be used.

Public Sub TestManualToolPath2DMcComp()

[Link]
[Link] [Link] & "LICOMDAT\[Link]\Flat - [Link]"

[Link] 2026-03-29
Objects - Objects Page 236 of 375

Dim MD As MillData
Set MD = [Link]
[Link] = 50
[Link] = 2
[Link] = -8

[Link] = acamCompMC
[Link]("LicomUKDMBOperationName") = "MANUAL WITH TOOL COMP"

Dim MTP As MillManualToolPath


Set MTP = [Link](100, 90, 0)

MTP.Add2DLine 100, 100


MTP.Add2DLine 200, 100
MTP.Add2DArcPointCenter 200, 200, 200, 150, False
MTP.Add2DLine 150, 200
MTP.Add2DLine 150, 210

Dim PS As Paths
Set PS = [Link]

Dim P As Path
For Each P In PS
[Link] = acamRIGHT
Dim E As Element
Set E = [Link]
If [Link] Then
Set E = [Link]
End If
[Link] = True
[Link] = True
Next P

Dim Drw As Drawing


Set Drw = [Link]
[Link] = True
[Link] = True

End Sub

MillStyle Object
An object representing a Mill Machining Style.

See [Link] for an example.

[Link] 2026-03-29
Objects - Objects Page 237 of 375

Properties

FileName - (String) The name of the file for this style

LayerGeometry - (String) If not empty, the name of the layer containing the geometries to be used for
this style

MillSubStyles - (MillSubStyles) The machining operations in this style

Name - (String) The name of the style

ShowProgressBox - (Boolean) True to show the progress box while applying the style

[Link]

Add an operation to the style.

Syntax

[Link] (McData, Tool, Lead)

MillData McData Machining data for this operation

MillTool Tool The tool for this operation

LeadData Lead The lead-in/out for this operation

[Link]

Apply the style to the selected geometries.

Syntax

[Link]

[Link] 2026-03-29
Objects - Objects Page 238 of 375

[Link]

Save the style to given file name.

Syntax

[Link] (Name)

String Name Complete path name to save to

MillSubStyle Object
An object representing an operation in a Mill Machining Style.

Properties

LayerBoundary - (String) If not empty, the name of the layer containing the boundaries to be used for
this operation, if it is Surface Machining

LayerGeometry - (String) If not empty, the name of the layer containing the geometries to be used for
this operation

LayerPoints - (String) If not empty, the name of the layer containing a circle representing the start point
to be used for this operation, if it is Surface Machining

Tool - (MillTool) The tool used for this operation

[Link]

Get the machining data for this operation. An object of type MillData will be returned.

Syntax

[Link]

[Return] MillData MillData object

[Link] 2026-03-29
Objects - Objects Page 239 of 375

This can be used to enumerate the styles to find one that matches requirements, eg find styles which use
surface machining:

Public Sub EnumSurfaceMc()

Dim S As MillStyle

For Each S In [Link]

Dim SS As MillSubStyle

For Each SS In [Link]

Dim MD As MillData

Set MD = [Link]

If MD.ProcessType2 = acamProcessMACHINE_SURFACE And [Link] <>


acamSurfaceMCPARAMETER_LINES Then

MsgBox "Surface MC"

End If

Next SS

Next S

End Sub

[Link]

Set the machining data for this operation.

Syntax

[Link] (MD)

MillData MD MillData object

[Link]

Get the lead data for this operation. An object of type LeadData will be returned.

[Link] 2026-03-29
Objects - Objects Page 240 of 375

Syntax

[Link]

[Return] LeadData LeadData object

Also see [Link].

[Link]

Set the lead data for this operation.

Syntax

[Link] (LD)

LeadData LD LeadData object

Also see [Link].

MillSubStyle.GetLeadData3D

Get the 3D lead data for this operation. An object of type LeadData3D will be returned.

Syntax

SubStyle.GetLeadData3D

[Return] LeadData LeadData3D object

Also see MillData.GetLeadData3D.

MillSubStyle.SetLeadData3D

Set the 3D lead data for this operation.

Syntax

SubStyle.SetLeadData3D (LD)

LeadData3D LD LeadData3D object

Also see MillData.SetLeadData3D.

[Link] 2026-03-29
Objects - Objects Page 241 of 375

MillTool Object
Object representing a Mill Tool. To create a Mill Tool use [Link], set the properties of
the tool, then use one of the methods to save or select the tool. See the examples. To select an existing
tool with a known name use [Link].

More:

MillTool Properties

MillTool Examples

MillTool Properties

For an example using some of these properties see examples.

Attribute - See Attributes

ColorRGB - (OLE_COLOR) Colour to be used for toolpaths using this tool

ConeAngle - (float) Cone angle if tool is a drill, in degrees, usually 118

CornerRadius - (float) Corner Radius of bull-nose tool

CurrentTurnProgrammingPoint - (TurnProgrammingPoint) (Lathe Only) The current programming point


for a Turning tool (read-only)

DepthOfCut - (float) Depth of one cut

Diameter - (float) Tool diameter

DiameterAndLengthSet - (boolean) True if diameter and length were set for a user-defined tool using a
line and circle (read-only)

DiameterLineEndX - (double) X coord of end of line used to set diameter (read-only)

DiameterLineEndY - (double) Y coord of end of line used to set diameter (read-only)

DiameterLineStartX - (double) X coord of start of line used to set diameter (read-only)

DiameterLineStartY - (double) Y coord of start of line used to set diameter (read-only)

DiskGuardBottomZ (float) Bottom Z for wheel guard (in the Marble module)

DiskGuardTopZ (float) Top Z for wheel guard (in the Marble module)

DiskMinRadius (float) Minimum radius of geometry that can be cut by the tool (in the Marble module)

[Link] 2026-03-29
Objects - Objects Page 242 of 375

FeedPerTooth - (float) Feed per Tooth, for feed calculations, unless fixed feeds and speeds set

FileName - (String) Complete path name of file

FixedDownFeed - (float) Fixed down feed, fixed speed should also be set

FixedFeed - (float) Fixed feed, fixed speed should also be set

FixedFeedAndSpeed - (Boolean) True if FixedFeed and FixedSpeed are to be used when this tool is
used for machining

FixedSpeed - (float) Fixed speed, fixed feed should also be set

Length - (float) Length of tool

MaximumDepth (float) Maximum depth that a Disk tool can cut

Name - (String) File name, not including path or extension

Note - (String) Tool Note

Number - (long) Tool Number

NumberOfTeeth - (long) Number of teeth for feed calculations

OffsetNumber - (long) Offset Number, if this is not set tool number (property Number) will be used

Pitch - (float) Pitch if Tap

Rotation - (boolean) Spindle rotation, True = CW, False = CCW

ShankDiameter - (float) Diameter of shank for lollipop tool

Taper - (boolean) True if this is a taper tool

ToolTipToGaugeLine - (float) Distance from tool tip to gauge line length (position of tool home point
when tool is at home).

TPD - (String) TPD(I) I = 1 to 20, Tool Post Data

Type - (short) Tool type, acamToolSQUARE, acamToolBULL, acamToolBALL, acamToolDRILL,


acamToolTAP, acamToolUSER, acamToolWHEEL, acamToolBULL_LOLLIPOP,
acamToolBALL_LOLLIPOP

Units - (short) Units, 1 = Inch, 0 = Metric (mm)

ZCircleCenterX - (double) X coord of centre of circle used to set length (read-only)

ZCircleCenterY - (double) Y coord of centre of circle used to set length (read-only)

[Link] 2026-03-29
Objects - Objects Page 243 of 375

ZCircleRadius - (double) Radius of circle used to set length (read-only)

[Link]

Get the geometries for the disk guard (Marble module only).

Syntax

[Link]

[Return] Paths geometries representing guard cross-section, as a Paths collection

Remarks

The guard is extruded between DiskGuardBottomZ and DiskGuardTopZ.

[Link]

Get the geometry for a user-defined tool. The geometry will be the complete cross-section ie both sides
of the vertical axis.

Syntax

[Link]

[Return] Path geometry representing tool cross-section, as a Path object

Remarks

See GetProfile.

The example gets the geometry for the current tool (if user-defined) and copies it to the Alphacam
database.

Public Sub CopyToolGeo()


Dim Drw As Drawing
Dim Tool As MillTool
Set Drw = [Link]
Set Tool = [Link]
If Tool Is Nothing Then
MsgBox "No current tool"
End
End If
If [Link] <> acamToolUSER Then
MsgBox "Tool is not a user-defined tool"
End
End If

Dim P As Path
Set P = [Link]

[Link] 2026-03-29
Objects - Objects Page 244 of 375

Dim Elem As Element


Dim Geo As Geo2D
Set Elem = [Link](1)
Set Geo = Drw.Create2DGeometry([Link], [Link])
For Each Elem In [Link]
If [Link] Then
[Link] [Link], [Link]
Else
[Link] [Link], [Link], [Link], [Link], [Link]
End If
Next Elem
[Link]
[Link]
End Sub

[Link]

Get the geometries for the tool holder. Each geometry will be the complete cross-section ie both sides of
the vertical axis.

Syntax

[Link]

[Return] Paths geometries representing holder cross-section, as a Paths collection

Remarks

See GetHolderProfile.

[Link]

Get the geometries for the tool holder. Each geometry will be half the cross-section ie the part where X
>= 0..

Syntax

[Link]

[Return] Paths geometries representing holder profile, as a Paths collection

Remarks

See GetHolderGeometry.

[Link]

Get the profile of a user-defined tool. The geometry will be half the cross-section, ie the part where X
>= 0.

[Link] 2026-03-29
Objects - Objects Page 245 of 375

Syntax

[Link]

[Return] Path geometry representing tool profile, as a Path object

Remarks

See GetGeometry.

[Link]

See if two objects represent the same tool. This means that the objects refer to the same tool in
Alphacam memory, not just that the properties are the same.

Syntax

[Link](Tool2)

Tool Tool2 Tool object to compare with

[Return] boolean Return value, True if objects are the same

[Link]

Save tool to disk. The tool will not be selected. See Select for this.

Syntax

[Link] (PathName)

String PathName complete path name to save to

[Link]

Select tool after properties have been set. Tool will be used for subsequent machining operations. It will
NOT be saved to the Alphacam tool library. See SaveAs for this.

Syntax

[Link]

Remarks

When a tool is manually selected in Alphacam it is shown to the user so it can be rejected if it is wrong.
This method will NOT do this. If this is required, use UserConfirm first.

See the examples

[Link]

[Link] 2026-03-29
Objects - Objects Page 246 of 375

Select tool into given Lathe turret and station, after properties have been set. Tool will be used for
subsequent machining operations.

Syntax

[Link] (Turret, Station)

AcamLatheTurret Turret acamTurretABOVE_CL or acamTurretBELOW_CL

AcamLatheStation Station acamStationFRONT or acamStationBACK

[Link]

Set geometry for the disk guard (Marble module only). The geometry will be extruded between
DiskGuardBottomZ and DiskGuardTopZ.

Syntax

[Link] (paths)

Paths paths geometry representing holder cross-section, as a Paths collection, only the first will be used
at the moment

[Link]

Set geometry for user-defined tool. The geometry must be the complete cross-section ie both sides of the
vertical axis.

Syntax

[Link] (path)

Path path geometry representing tool cross-section, as a Path object

See example.

[Link]

Set geometry for user-defined tool, as SetGeometry but with a line and circle to define the programming
point and diameter. The geometry must be the complete cross-section ie both sides of the vertical axis.
The line and circle should be the geometries that would be drawn if the tool was defined graphically.

Syntax

[Link] (Geometry, Line, Circle)

Path Geometry geometry representing tool cross-section, as a Path object

Path Line geometry representing the line, as a Path object

[Link] 2026-03-29
Objects - Objects Page 247 of 375

Path Circle geometry representing the circle, as a Path object

See example.

[Link]

Set geometry for the tool holder. The geometry must be the complete cross-section ie both sides of the
vertical axis.

Syntax

[Link] (paths)

Paths paths geometry representing holder cross-section, as a Paths collection

[Link]

Show tool on mouse pointer and ask user to confirm that it is the required tool, eg before using Select.

Syntax

[Link]

[Return] boolean True if user accepts the tool, False if rejected.

Remarks

See example 2 in examples.

MillTool Examples

MillTool Example 1

MillTool Example 2

MillTool Example 3

MillTool Example 4

MillTool Example 1

The following code will create and select a Ball-end tool.

Dim tool As MillTool

Set tool = [Link]

With tool

.type = acamToolBALL

[Link] 2026-03-29
Objects - Objects Page 248 of 375

.name = "T82, Ball, Dia 15mm"

.number = 82

.feedpertooth = .1

.diameter = 15

.length = 50

.units = 1

.Select

End With

The With tool / End With block is a short cut. If it is not used, tool would have to be given for each
property eg

[Link] = acamToolBALL

[Link] = "T82, Ball, Dia 15mm"

[Link] = 82

MillTool Example 2

The following code will create and select a user-defined tool. The geometry is a cone with a flat bottom.

Public Sub DefineUserDefinedTool()

Dim Drw As Drawing


Set Drw = [Link]
Dim P2 As Geo2D
Dim P3 As Path
' Define a user defined tool
' First define the profile
Set P2 = Drw.Create2DGeometry(-15, 50)
[Link] -15, 20
[Link] -2, 0
[Link] 2, 0
[Link] 15, 20
[Link] 15, 50
Set P3 = [Link]
' Define and select the tool, the SetGeometry method takes
' the path object returned by the Finish method
Dim Tool As MillTool
Set Tool = [Link]
With Tool
.Type = acamToolUSER

[Link] 2026-03-29
Objects - Objects Page 249 of 375

.Name = "T85, user shape (API)"


.Number = 85
.FeedPerTooth = 0.125
.Units = 1
.SetGeometry P3
If .UserConfirm Then
.Select
End If
End With

End Sub

MillTool Example 3

The following code will create a Ball-end tool, and save it to the Alphacam tool library. It will NOT
select it.

folder = [Link] + "licomdat\[Link]\"

Dim tool As MillTool

Set tool = [Link]

With tool

.Type = acamToolBALL

.Name = "T83, Ball, Dia 22 mm"

.Number = 83

.FeedPerTooth = .1

.Diameter = 22

.Length = 50

.NumberOfTeeth = 4

.Note = "Defined in API"

.TPD(1) = 2.2345

.SaveAs folder + .name + ".amt"

End With

MillTool Example 4

Use SetGeometryLineCircle to define a tool with user-defined geometry and specified programming

[Link] 2026-03-29
Objects - Objects Page 250 of 375

point and diameter. The macro draws the tool geometry and the line and circle, and uses them to define
the tool and then deletes them. The tool is made the current tool.

Public Sub DefineUserDefinedToolWithLineAndGeo()

Dim Drw As Drawing


Set Drw = [Link]
Dim P2 As Geo2D
Dim P3 As Path
' Define a user defined tool
' First define the profile
Set P2 = Drw.Create2DGeometry(-15, 50)
[Link] -15, 20
[Link] -2, 0
[Link] 2, 0
[Link] 15, 20
[Link] 15, 50
Set P3 = [Link]

' Define the line and circle to set the programming point and diameter
Dim PLine As Path, PCircle As Path
Set PLine = Drw.Create2DLine(-20, 10, 20, 10)
Set PCircle = [Link](3, 15, 20)
' Define and select the tool
Dim Tool As MillTool
Set Tool = [Link]
With Tool
.Type = acamToolUSER
.Name = "T85, user shape (API)"
.Number = 85
.FeedPerTooth = 0.125
.Units = 1
.SetGeometryLineCircle P3, PLine, PCircle
If .UserConfirm Then
.Select
End If
End With
[Link] = True
[Link] = True
[Link] = True
[Link]

End Sub

NestData Object
Used for nesting. Only nest lists can be used at present. Use [Link] to read a nest list.
Use AddSheet to define the sheets, and DoNest to nest the items onto the sheet(s).

This object (and other Nest objects) are defined in a separate Type Library. To use it in VBA you must

[Link] 2026-03-29
Objects - Objects Page 251 of 375

add a reference to it. Use Tools | References and pick "AlphaCam Nesting v2.0 Type Library"

More:

NestData Properties

NestData Properties

Resolution - (double) Resolution for nesting

Gap - (double) Minimum gap between shapes

LeadGap - (double) Extra gap for lead-in/out

Subroutines - (boolean) True to use subroutines for NC code

Direction - (short) Nest Direction (0=Pack to left, 1=Pack to bottom, 2=Pack to right, 3=Pack to top)

ToolPaths - (boolean) True if nesting tool paths, False if nesting geometries (read-only)

[Link]

Add a geometry to be used as a sheet.

Syntax

[Link] (Geometry, MaterialName, Thickness, Number)

Path Geometry geometry of sheet, as a Path object

String MaterialName Name of material

double Thickness Thickness of material

long Number number of this sheet available

[Link]

Nest parts on to sheet(s), added with AddSheet

Syntax

[Link]

The example reads a previously saved nest list, creates two rectangular sheets, each of which can be
used twice, and performs the nest.

Dim Drw As Drawing

Dim Sheet As Path

[Link] 2026-03-29
Objects - Objects Page 252 of 375

Dim Nest As NestData

Set Drw = [Link]

[Link]

Set Nest = [Link] ("C:\apsnlist\ab [Link]")

Set Sheet = [Link](0, 0, 150, 100)

[Link] Sheet, [Link](1).Name, 0.25, 2

Set Sheet = [Link](200, 0, 400, 150)

[Link] Sheet, [Link](1).Name, 0.25, 2

[Link]

[Link]

[Link]

Operation Object
An operation.

More:

Operation Properties

[Link]

Delete the operation.

Syntax

[Link]

[Link]

Order the tool paths in this operation.

Syntax

[Link] (FirstPath)

Path FirstPath First path in the operation

[Link] 2026-03-29
Objects - Objects Page 253 of 375

Operation Properties

Number - (Long) Operation Number (read-only)

OriginalNumber - (Long) Original operation number (read-only)

SubOperations - (SubOperations) Collection of the sub-operations in this operation (read-only)

Tool - (MillTool) The tool used (read-only)

Visible - (boolean) True if the tool paths are visible

Operations Object
A Collection of Operation objects.

This is the top-level operation object. Start with this to access the operation list. Use the
[Link] property to get the Operations object.

Example

Show tool for each operation and name of each sub-operation, and highlight the tool paths

Public Sub ShowOperations()

Dim Drw As Drawing


Set Drw = [Link]

Dim Ops As Operations


Set Ops = [Link]

Dim Op As Operation
For Each Op In Ops
MsgBox "Op No. " & [Link] & vbCr & "Tool = " & [Link]
Dim SubOp As SubOperation
For Each SubOp In [Link]
[Link] = True
[Link]
MsgBox "Sub-op Name: " & [Link]
[Link] = False
[Link]
Next SubOp
Next Op

End Sub

More:

[Link] 2026-03-29
Objects - Objects Page 254 of 375

Operations Properties

Operations Properties

Count - (long) Number of items in the collection (read-only)

[Link]

Return a member of the Collection. It is the default member of the object so VBA can use it without
specifing the word Item.

Syntax

[Link](Index)

OR

ops(Index)

Long Index Index of required Operation, 1 to Count

[Link]

Finish resequencing the Operations.

Syntax

[Link]

See StartResequence

[Link]

Order the tool paths so that the operations are in the correct order. Call after changing operation numbers
using the [Link] property, or the [Link] method.

Syntax

[Link]

[Link]

Renumber an operation.

Syntax

[Link] (OperationNumber, NewNumber, Action)

Long OperationNumber Number of op to renumber

[Link] 2026-03-29
Objects - Objects Page 255 of 375

Long NewNumber New number for this operation

AcamOpRenumberAction

Action What to do if operation already exists.

Remarks

If an operation already exists with number NewNumber, the Action parameter determines what happens.
It is either: acamOpADD_TO_OPERATION which means add the paths for op OperationNumber on to
the end of paths for op NewNumber (if the tools are the same), or acamOpINSERT_IN_FRONT which
means insert op OperationNumber in front of op NewNumber. The Operations object is invalid after
using this method once. It must be recreated as in the example below.

Example

Renumber operations with the same tool. The Operations object is invalid after each renumber method
call, so the function ReNumberOneOp is used. When it renumbers an operation it returns, destroying the
object. It is then recreated in the Do While [Link] loop is repeated until no more could be
renumbered.

Public Sub ReNumber()

Dim Drw As Drawing


Set Drw = [Link]

Do While ReNumberOneOp([Link]) ' recreate Operations


Loop

End Sub

' Helper function for ReNumber

Private Function ReNumberOneOp(Ops As Operations) As Boolean

Dim I As Integer, J As Integer


For I = 1 To [Link]
For J = I + 1 To [Link]
If Ops(I).[Link] = Ops(J).[Link] Then

' MsgBox "Trying to renumber " & I & " and " & J

[Link] J, I, acamOpADD_TO_OPERATION
ReNumberOneOp = True
Exit Function
End If
Next J
Next I
ReNumberOneOp = False

[Link] 2026-03-29
Objects - Objects Page 256 of 375

End Function

[Link]

For Lathe only, start resequenceing the operations.

Syntax

[Link]

Remarks

For AlphaV7 Lathe uses a different method from the other modules to determine the order of operations.
Each operation has a sequence number, operations are ordered in the order of the sequence numbers.
This allows operations in different turrets to be done in any order unlike previous versions which
ordered the operations by turret. Call StartResequence then set the NewSequenceNumber property of
each operation, then call FinishResequence.

Example

Assuming that there are at least two operations in the current drawing, this example swaps the first two.
They can be in any turret/station.

Public Sub SwapOps1And2()

Dim Drw As Drawing


Set Drw = [Link]
Dim Ops As Operations
Set Ops = [Link]
[Link]
Ops(1).NewSequenceNumber = 2
Ops(2).NewSequenceNumber = 1
[Link]

End Sub

Path Object
A single geometry or tool path - contains a list of line and arc elements.

More:

Path Properties

Path Properties

Attribute - See Attributes

Billet - (Boolean) True if this is the billet (Lathe only)

[Link] 2026-03-29
Objects - Objects Page 257 of 375

Closed - (boolean) True if path is closed (read-only)

Color - (AcamColor) For geometries, the colour set when reading a DXF file, or set by this property. For
tool paths, the colour used by Alphacam to draw the tool path. Read-only for tool paths, read-write for
geometries. Value may be any of the 16 standard colours

ColorRGB - (OLE_COLOR) For geometries, the color set when reading a DXF file, or set by this
property. For tool paths, the colour used by Alphacam to draw the tool path. Read-only for tool paths,
read-write for geometries. Value is an RGB value

CompOnRapid - (boolean) True if the Machine Compensation is to be applied on the rapid before this
path

Construction - (boolean) True if this geometry is a Construction geometry

CW - (boolean) True if path is CW, only valid if path is closed

Dimension - (boolean) True if this path is on the Dimension layer

Disabled - (boolean) True if this path is disabled ie cannot be selected

DontInvalidate - (boolean) True to suppress display list invalidation

Drawing - (Drawing) The drawing for this path, if it is in the main drawing then the existing drawing
object will be returned otherwise a temporary one will be created (read-only)

Elements - (Elements) Collection of the elements in this path (read-only)

Group - (short) Number of group containing this path, 0 if none

HasLoops - (boolean) True if path contains loop elements (read-only)

Is3D - (boolean) True if this is a 3D geometry or tool path

IsDrilling - (boolean) True if this tool path contains just rapid elements and drilling elements. Drilling
elements are zero length in XY

IsDrillSub - (boolean) True if this toolpath is part of a drilling subroutine (read-only)

IsPathAllRapids - (boolean) True if this path is all rapids (read-only)

IsSubroutineCopy - (boolean) True if this tool path is a Subroutine Copy of another path. The XY
displacement can be found using [Link] (read-only)

IsSubroutineOriginal - (boolean) True if this tool path has subroutines copies (read-only)

IsTag - (boolean) True if this path is a support tag (read-only)

IsToolPath - (boolean) True if this path is a tool path (read-only)

[Link] 2026-03-29
Objects - Objects Page 258 of 375

IsWorkVolume - (boolean) True if this is the Work Volume (read-only)

LathePart - (boolean) True if this is the part in Lathe

Length - (double) Length of this path (read-only)

LineType - (AcamLineType) Line type for this path, see key in Layer object

MaxXL - (double) Maximum X Local coordinate (read-only)

MaxYL - (double) Maximum Y Local coordinate (read-only)

McComp - (AcamComp) Machine compensation for this path (read-only)

MinXL - (double) Minimum X Local coordinate (read-only)

MinYL - (double) Minimum Y Local coordinate (read-only)

Name - (string) Name of this path, as shown in the project bar

NoRapidUpBefore - (boolean) True to suppress the automatic rapid-up before this tool path

OpNo - (short) Operation number of this path. Call [Link] if this is changed

PathType - (AcamPathType) Type of this path (read-only)

Selected - (boolean) True if path is selected

Sheet - (boolean) True if this is a nested sheet

STL - (boolean) True if this path is part of an STL model

SubroutineNumber - (long) Subroutine number, if non-zero (read-only)

Temp - (boolean) True if this path is a temporary path

ToolInOut - (AcamToolInOut) Ghost tool inside, on center or outside of path, only valid if path closed.
acamINSIDE = 1, acamCENTER = 0 acamOUTSIDE = -1

ToolSide - (AcamToolSide) Ghost tool left, center or right of path. acamLEFT = 1, acamCENTER = 0,
acamRIGHT = -1

Visible - (boolean) True if path is marked as visible (not hidden)

ZSubroutines - (boolean) True if the path has subroutines for multiple Z depths

[Link]

Add Direct Input NC-Code to this tool path. Use vbCr to separate lines if more than one line required.

[Link] 2026-03-29
Objects - Objects Page 259 of 375

Syntax

[Link] (Location, NCCode, [Element])

AcamDirectInputLocation Location eg acamBEFORE_PATH

String NCCode The nc-code

Element Element eg for acamAT_END_OF_ELEMENT (Optional)

[Link]

Add elements of a path on to the END of this path, with a connecting straight line if there is a gap.

See [Link].

Syntax

[Link](Path2)

Path Path2 Path to be added

Remarks

Path2 will be deleted.

[Link]

Add elements of a path on to the START of this path, with a connecting straight line if there is a gap.

See [Link].

Syntax

[Link](Path2)

Path Path2 Path to be added

Remarks

Path2 will be deleted.

The example assumes that there is an existing tool path starting at (-5, 50). It creates a manual tool path
consisting of an arc, and adds it to the start of the existing tool path. The tool used for the manual tool
path is not important, because its element will be added to the start of the other path and the tool used by
that path will be used.

Public Sub TestAddPathToStart()

Dim P1 As Path, P2 As Path

[Link] 2026-03-29
Objects - Objects Page 260 of 375

Set P1 = [Link](1)

Dim MD As MillData
Set MD = [Link]

Dim MTP As MillManualToolPath


Set MTP = [Link](-50, 25, 0)

MTP.Add2DArcPointRadius -5, 50, 40, True, False

Set P2 = [Link](1)

[Link] P2

End Sub

[Link]

Add a support tag at given point on this tool path.

Syntax

[Link] (TagTopZ, TagLength, Type, X, Y)

float TagTopZ Z coordinate at top of tag

float TagLength Length of tag

AcamTagType Type Type of tag, acamTagFLAT or acamTagRAMP

double X X coordinate of tag mid-point on path

double Y Y coordinate of tag mid-point on path

[Link]

Break the path at point closest to given point.

Syntax

[Link] (X, Y)

double X Local X coordinate of break point

double Y Local Y coordinate of break point

[Return] Path Path (see remarks).

Remarks

[Link] 2026-03-29
Objects - Objects Page 261 of 375

The returned object is the broken-off part of the path, as another path. The current path now ends at the
break point.

If the point closest to the given point is the start or end of the path, it will not be broken and the return
value will be the special value Nothing.

[Link]

Break the path at all intersection points with currently selected geometries.

Syntax

[Link]

[Return] Paths Paths object (see remarks).

Remarks

The returned object is a Collection of Path objects, starting with the first broken-off part of the path.

Example:

Dim Geos as Paths

set Geos = [Link]

[Link]

Join this path to another path with a bridge.

Syntax

[Link] (Path2, X1, Y1, X2, Y2, BridgeWidth)

Path Path2 The other path

Double X1 Local X coordinate of point on this path

Double Y1 Local Y coordinate of point on this path

Double X2 Local X coordinate of point on Path2

Double Y2 Local Y coordinate of point on Path2

Double BridgeWidth Width of bridge

Remarks

If the paths are tool paths the width of the bridge will be adjusted so that the material left will be the
specified width.

[Link] 2026-03-29
Objects - Objects Page 262 of 375

If the bridge is successful the second path will no longer exist - its elements will be added to the first
path.

If the first path has lead-in/out it will be preserved, lead-in/out on the second path will be removed.

The example draws two rectangles and combines them into one path with a connecting bridge.

Public Sub BridgeTest()

Dim Drw As Drawing


Set Drw = [Link]

Dim P1 As Path
Dim P2 As Path

Set P1 = [Link](0, 0, 100, 100)


Set P2 = [Link](150, 10, 300, 120)

[Link] P2, 100, 50, 150, 60, 5

[Link]

End Sub

[Link]

Chamfer sharp corners on this path.

Syntax

[Link] (Dist1, Dist2)

double Dist1 First chamfer distance

double Dist2 Second chamfer distance

Remarks

All external sharp corners will be chamfered. Internal corners are left as they are found. Whether a
corner is external or internal is decided by the side that the Ghost Tool is positioned. If the Ghost Tool is
on the centre line of the geometry, all sharp corners are chamfered. In all cases, existing chamfers are
NOT replaced.

[Link]

Copy the path and return a Path object for the new path.

Syntax

[Link]

[Link] 2026-03-29
Objects - Objects Page 263 of 375

[Return] Path Path object.

Remarks

If the path is in a list eg the list of geometries, and is not temporary, it will be added to the end of that
list.

[Link]

Copy a tool path as a subroutine.

Syntax

[Link] (XDisplacement, YDisplacement, Group)

double XDisplacement Distance in Local X between original and copy

double YDisplacement Distance in Local Y between original and copy

short Group Group number for copy. See remarks

[Return] Path Path object

Remarks

The original path must have a non-zero group number, and the copy must have a different non-zero
group number. See the example.
Dim Drw As Drawing
Set Drw = [Link]
Dim P1 As Path, P2 As Path

Set P1 = [Link](1)

Dim group As Integer


group = [Link]

' Set group number of path to be copied


[Link] = group
' Get group number of new path
group = [Link]

Set P2 = [Link](100, 100, group)

[Link]

Copy part of the path and return a Path object for the new path.

Syntax

[Link](X1, Y1, X2, Y2)

[Link] 2026-03-29
Objects - Objects Page 264 of 375

double X1 Local X coordinate of first point on path

double Y1 Local Y coordinate of first point on path

double X2 Local X coordinate of second point on path

double Y2 Local Y coordinate of second point on path

[Return] Path Path object.

Remarks

If the path is in a list eg the list of geometries, and is not temporary, it will be added to the end of that
list.

The given points don't have to be on the geometry, the closest point on the geometry will be used.

Example:

' Draw a circle and copy part of it.

Public Sub TestCopyPartial()

Dim P1 As Path, P2 As Path


Dim Drw As Drawing
Set Drw = [Link]
Set P1 = Drw.CreateCircle2(100, 0, 0, True, 180)
Set P2 = [Link](-50, 50, 50, 50)
[Link] 0, 50

End Sub

[Link]

Copy path and do not add it to the Alphacam database.

Syntax

[Link]

See [Link]

[Link]

Copy path as subroutine and do not add to Alphacam database.

Syntax

[Link] (XDisplacement, YDisplacement, Group)

[Link] 2026-03-29
Objects - Objects Page 265 of 375

double XDisplacement Distance in Local X between original and copy

double YDisplacement Distance in Local Y between original and copy

short Group Group number for copy. See remarks

[Return] Path Path object

Remarks

See [Link]

[Link]

Create a copy of the path (geometry only, not tool path), mirrored about the center-line. This is used if
the geometry is to be machined using a tool in a below-center-line turret, in Lathe.

Syntax

[Link]

[Return] Path below-center-line path

[Link]

Create a spline curve approximating the path.

Syntax

[Link] (Tolerance)

double Tolerance Tolerance for spline fit.

[Return] Spline Pointer to Spline Dispatch object.

Remarks

A Spline object will be returned. This will have the special value Nothing if it was not possible to fit a
spline through the path eg if there are less than 4 points. Splines created by Alphacam are always cubic
(degree 3, order 4).

[Link]

Delete leading and/or trailing rapids from tool path.

Syntax

[Link] (Leading, Trailing)

boolean Leading True to delete rapids at start of tool path

[Link] 2026-03-29
Objects - Objects Page 266 of 375

boolean Trailing True to delete rapids at end of tool path

[Link]

Let the user graphically drag the path to a new location.

Syntax

[Link] (Prompt, XBase, YBase, Flags, Events, XNew, YNew)

String Prompt Text to display in prompt bar

double XBase X coordinate of base point

double YBase Y coordinate of base point

long Flags Reserved, should be 0

DragEvents Events Reserved, should be Nothing

[Return] double XNew Returned X coordinate of new point

[Return] double YNew Returned Y coordinate of new point

[Return] long Return value is 0 if OK

Remarks

The cross-hair cursor will be centered on (XBase, YBase)

The required displacement is found by (XNew - XBase, YNew - YBase).

The example will drag the first geometry, if the user accepts the geometry is moved to the new position.

Dim Drw As Drawing


Set Drw = [Link]
Dim P1 As Path

Set P1 = [Link](1)
Dim Ret As Long
Dim XBase As Double, YBase As Double
Dim XNew As Double, YNew As Double

XBase = ([Link] + [Link]) / 2


YBase = ([Link] + [Link]) / 2
Ret = [Link]("Drag", XBase, YBase, 0, Nothing, XNew, YNew)

If Ret = 0 Then
[Link] XNew - XBase, YNew - YBase
End If

[Link] 2026-03-29
Objects - Objects Page 267 of 375

[Link]

Eliminate unnecessary 2D elements by measuring the chord error. On input, the path should contain
lines only, on output it will contain lines only.

Syntax

[Link] (ChordTolerance)

Double ChordTolerance Chord Tolerance

[Link]

Erase the path from the screen by drawing it in the screen background colour. The path will not be
deleted. This is useful when a property of the path is to be changed, and you want to show the change
without redrawing the whole screen.

Syntax

[Link]

Example

Public Sub ChangeColour()

Dim Drw As Drawing


Dim P As Path
Set Drw = [Link]
Set P = Drw.Create2DLine(0, 0, 100, 100)

MsgBox "Default Colour"


[Link]
[Link] = acamRED
[Link]
MsgBox "Red"

End Sub

[Link]

Explode path - each element (line or arc) is put into a separate path.

Syntax

[Link]

[Return] Paths Paths object

[Link] 2026-03-29
Objects - Objects Page 268 of 375

Remarks

The returned object is a Paths Collection containing the new paths. The existing path is deleted - the
object variable is not valid and should not be used after explode.

Example:

Dim geos As Paths

set geos = [Link]

[Link]

Extend start or end of this path to meet selected geometries.

Syntax

[Link] (Start)

boolean Start True to extend start of path, false to extend end

[Return] boolean True if OK

[Link]

Fillet sharp corners on this path.

Syntax

[Link] (Radius)

double Radius Fillet radius

Remarks

All external sharp corners will be filleted. Internal corners are left as they are found. Whether a corner is
external or internal is decided by the side that the Ghost Tool is positioned. If the Ghost Tool is on the
centre line of the geometry, all sharp corners are filleted. In all cases, existing fillets are NOT replaced.

[Link]

Fillet sharp corners on this path, using the bubble option.

Syntax

[Link] (Radius)

double Radius Fillet radius

Remarks

[Link] 2026-03-29
Objects - Objects Page 269 of 375

All external sharp corners will be filleted. Internal corners are left as they are found. Whether a corner is
external or internal is decided by the side that the Ghost Tool is positioned. If the Ghost Tool is on the
centre line of the geometry, all sharp corners are filleted. In all cases, existing fillets are NOT replaced.

[Link]

Replace lines with arcs that fit within a given tolerance.

Syntax

[Link] (ChordTolerance, MaximumRadius)

double ChordTolerance Tolerance within which arcs must match line end-points

double MaximumRadius Maximum radius for arcs

[Link]

Replace lines with lines that fit within a given tolerance.

Syntax

[Link] (ChordTolerance)

double ChordTolerance Tolerance within which lines must match line end-points

[Link]

Replace lines with lines and arcs that fit within a given tolerance. This is equivalent to the Utils | Special
Functions | Points to Lines / Arcs command.

Syntax

[Link] (ChordTolerance, MaximumRadius)

double ChordTolerance Tolerance within which lines / arcs must match line end-points

double MaximumRadius Maximum radius for arcs

[Link]

Return area of this path.

Syntax

[Link] (HatchColor)

AcamColor HatchColor Color to use for hatch, -1 for none

[Return] double Returned area

[Link] 2026-03-29
Objects - Objects Page 270 of 375

[Link]

Return number of attributes attached to this path.

Syntax

[Link]

[Return] long Number of attributes

[Link]

Return name of an attribute attached to this path.

Syntax

[Link] (Index)

long Index Index of attribute, 1 to GetAttributeCount

[Return] String Name of attribute

[Link]

Get the Bitmap associated with the path. An object of type GeoBitmap will be returned.

Syntax

[Link]

[Return] GeoBitmap GeoBitmap object

[Link]

Analyse path to see if it is a circle. If it is, return a CircleProperties object. The properties of the object
may then be read (not written). If it is not a circle the special value Nothing will be returned.

Note: for this method, a circle is defined as an arc with an included angle of more than 270 degrees.

Syntax

[Link]

[Return] CircleProperties CircleProperties object , Nothing if geo is not a circle.

[Link]

Find point (and element) on this path which is closest to a given point.

Syntax

[Link] 2026-03-29
Objects - Objects Page 271 of 375

[Link] (XTest, YTest, XClose, YClose, Elem)

double XTest Local X coordinate of test point

double YTest Local Y coordinate of test point

double XClose Returned X coordinate of closest point

double YClose Returned Y coordinate of closest point

Element Elem Returned element containing point

Example:

' Ask user for an XY point and draw a line from this point

' to the closest point on each geometry

Public Sub TestClosestPoint()

Dim P As Path
Dim X1 As Double, Y1 As Double
Dim Drw As Drawing
Set Drw = [Link]

If Drw.UserGet2DPoint("Pick Point", X1, Y1) <> acamUserSELECT Then Exit Sub

For Each P In [Link]


Dim X2 As Double, Y2 As Double, E As Element
[Link] X1, Y1, X2, Y2, E
Drw.Create2DLine X1, Y1, X2, Y2
Next P

End Sub

[Link]

Get X and Y values of shift if this tool path is a subroutine copy. (The IsSubroutineCopy property will
be set if it is)

Syntax

[Link] (X, Y)

double* X X displacement

double* Y Y displacement

Remarks

[Link] 2026-03-29
Objects - Objects Page 272 of 375

The displacement is relative to the tool path that was copied.

[Link]

The number of lines and arcs in a path.

Syntax

[Link]

[Return] long Number of elements.

[Link]

Get local Max / Min XY of this tool path, ignoring rapids. Return False if there are no feeds.

Syntax

[Link] (MinX, MinY, MaxX, MaxY)

[Return] double MinX

[Return] double MinY

[Return] double MaxX

[Return] double MaxY

[Return] boolean Return False if there are no feeds

[Link]

Get global Max / Min XY (not Z) of this tool path, ignoring rapids. Return False if there are no feeds.

Syntax

[Link] (MinX, MinY, MaxX, MaxY)

[Return] double MinX

[Return] double MinY

[Return] double MaxX

[Return] double MaxY

[Return] boolean Return False if there are no feeds

[Link]

[Link] 2026-03-29
Objects - Objects Page 273 of 375

Get the first element (line or arc) in the path. An object of type Element will be returned.

Syntax

[Link]

[Return] Element Element object

See Also

[Link]

[Link]

[Link]

[Link] (Profiling only)

Get the machining data for this path if it is a tool path. An object of type LaserData will be returned.

Syntax

[Link]

[Return] LaserData LaserData object

[Link]

Get the last element (line or arc) in the path. An object of type Element will be returned.

Syntax

[Link]

[Return] Element Element object

See Also

[Link]

[Link]

[Link]

[Link]

Get the layer for the path. An object of type Layer will be returned.

Syntax

[Link] 2026-03-29
Objects - Objects Page 274 of 375

[Link]

[Return] Layer Layer object

[Link] (Mill, Router, Stone, Lathe only)

Get the machining data for this path if it is a tool path. An object of type MillData will be returned.

Syntax

[Link]

[Return] MillData MillData object

[Link]

Get the next path in the list.

Syntax

[Link]

[Return] Path Path object

[Link]

Analyse path to see if it is a rectangle (parallel to the X axis). If it is, return a RectangleProperties object.
The properties of the object may then be read (not written). If it is not a rectangle the special value
Nothing will be returned.

Syntax

[Link]

[Return] RectangleProperties RectangleProperties object , Nothing if geo is not a rectangle.

[Link]

Internal routine for use by Nesting

[Link]

Internal routine for use by Nesting

[Link]

Return area of this path and enclosed paths.

Syntax

[Link] 2026-03-29
Objects - Objects Page 275 of 375

[Link] (HatchColor, SheetArea, ScrapArea)

AcamColor HatchColor Color to use for hatch, -1 for none

[Return] double SheetArea Returned area of sheet ignoring enclosed paths.

[Return] double ScrapArea Returned (area of sheet) - (area of enclosed paths)

[Link]

Get the tool for this path if it is a tool path. An object of type MillTool will be returned.

Syntax

[Link]

[Return] MillTool MillTool object

[Link] (Wire only)

Get the machining data for this path if it is a tool path. An object of type WireData will be returned.

Syntax

[Link]

[Return] WireData WireData object

[Link]

Get the work plane for the path. An object of type WorkPlane will be returned. If the path is not in a
work plane the special value Nothing will be returned, which may be used in tests.

Syntax

[Link]

[Return] WorkPlane WorkPlane object

[Link]

Find the points of intersection of an infinite line with this path.

Syntax

[Link] (X1, Y1, X2, Y2, IncludeTangents, XInt, YInt)

double X1 Local X coordinate of a point on the infinite line

double Y1 Local Y coordinate of a point on the infinite line

[Link] 2026-03-29
Objects - Objects Page 276 of 375

double X2 Local X coordinate of another point on the infinite line

double Y2 Local Y coordinate of another point on the infinite line

boolean IncludeTangents True to include points where it does not cross, just meets tangentially

[Return] Variant Array of double XInt Return X coordinates of intersection points.

[Return] Variant Array of double YInt Return Y coordinates of intersection points.

[Return] long Returned number of intersection points

Remarks

The returned arrays are indexed from 0, see the example.

The example draws a rectangle and finds the intersection points with a line, and draws a line between
the two intersection points.

Dim Drw As Drawing


Set Drw = [Link]

Dim P1 As Path
Set P1 = [Link](0, 0, 100, 100)

Dim N As Long
Dim XInt, YInt

N = [Link](10, 10, 20, 120, False, XInt, YInt)


If N = 2 Then
Drw.Create2DLine XInt(0), YInt(0), XInt(1), YInt(1)
End If

[Link]

Return True if path is visible in the XY window.

Syntax

[Link]

[Link]

Return True if point is inside this path.

Syntax

[Link](X, Y)

double X Local X coordinate of point to test

[Link] 2026-03-29
Objects - Objects Page 277 of 375

double Y Local Y coordinate of point to test

[Return] boolean True if point inside path

[Link]

See if two objects represent the same path. This is NOT a geometric comparison.

Syntax

[Link](Path2)

Path Path2 Path object to compare with

[Return] boolean Return value, True if objects are the same

[Link]

Compare the geometry of this path with a second path. If they are the same shape the return value will
be True.

Syntax

[Link] (Path2, Angle, X, Y)

Path Path2 The path to compare with

[Return] double Angle Difference angle in degrees

[Return] double X Difference in local X coordinates

[Return] double Y Difference in local Y coordinates

Remarks

The returned values are the values which if they were applied to Path2 would put it coincident with the
first path, as in the example:

Dim P1 As Path, P2 As Path

Set P1 = [Link]("Geo 1")

Set P2 = [Link]("Geo 2")

Dim A As Double, X As Double, Y As Double

If [Link](P2, A, X, Y) Then

[Link] A, 0, 0

[Link] 2026-03-29
Objects - Objects Page 278 of 375

[Link] X, Y

' P2 is now coincident with P1

End If

[Link]

Mirror the path using a work plane in the 3D Global coordinate system.

Syntax

[Link] (WP)

WorkPlane WP Work plane to mirror in

Remarks

The path (which may be any path, in a work plane or 2D flat land or 3D global) will be mirrored in
global XYZ, using the given work plane as the plane to mirror in.

See also

[Link]

[Link]

Mirror the path about a line in its 2D Local coordinate system.

Syntax

[Link] (X1, Y1, X2, Y2)

double X1 Local X coordinate of first point on mirror line

double Y1 Local Y coordinate of first point on mirror line

double X2 Local X coordinate of second point on mirror line

double Y2 Local Y coordinate of second point on mirror line

See also

[Link]

[Link]

Move the path in the 3D Global coordinate system.

Syntax

[Link] 2026-03-29
Objects - Objects Page 279 of 375

[Link] (X, Y, Z)

double X Distance to move in global X

double Y Distance to move in global Y

double Z Distance to move in global Z

Remarks

If the path is in a work plane it will be moved to a new work plane if necessary. If it is not in a work
plane it will be moved in global XYZ by the specified distances.

See also

[Link]

[Link]

Move the path in its 2D Local coordinate system.

Syntax

[Link] (X, Y)

double X Distance to move in local X

double Y Distance to move in local Y

Remarks

If the path is in a work plane it will be moved in that plane by the specified distances. If it is not in a
work plane it will be moved in global XY by the specified distances.

See also

[Link]

[Link]

Move the path to another drawing.

Syntax

[Link] NewDrawing

Drawing NewDrawing The drawing to move the path to

Remarks

[Link] 2026-03-29
Objects - Objects Page 280 of 375

This can be used to move paths between drawings for example, from the active drawing to a drawing
opened with OpenTempDrawing, or the other way.

[Link]

Offset this geometry, adding one or more new paths to database.

Syntax

[Link] (Distance, Side)

double Distance Offset distance

AcamToolSide Side Side to offset, acamLEFT (1), or acamRIGHT (-1)

[Return] Paths Paths object (see remarks).

Remarks

The returned object is a Collection of the offset paths.

Example:

Dim Geos As Paths

set Geos = [Link](10, acamLEFT)

[Link]

Offset this geometry using simple lookahead, returning one path, which will be added to the drawing
database if the path is not temporary .

Syntax

[Link] (Distance, Side)

double Distance Offset distance

AcamToolSide Side Side to offset, acamLEFT (1), or acamRIGHT (-1)

[Return] Path Path object.

Remarks

Because simple lookahead is used the returned path may overlap itself. Use [Link] or
[Link] if the normal total-lookahead offset is required. They may return more than one
path, unlike this method.

Example:

[Link] 2026-03-29
Objects - Objects Page 281 of 375

Dim Geos As Path

Set Geo = [Link](10, acamLEFT)

[Link]

Offset this geometry, new paths will NOT be added to database.

Syntax

[Link] (Distance, Side, Corners)

double Distance Offset distance

AcamToolSide Side Side to offset, acamLEFT (1), or acamRIGHT (-1)

AcamCorners Corners Type of corners, acamCornersROUND or acamCornersSTRAIGHT

[Return] Paths Paths object (see remarks).

Remarks

The returned object is a Collection of the offset paths.

Example:

Dim Geos As Paths

set Geos = [Link](10, acamLEFT, acamCornersROUND )

See [Link]

[Link]

Find Global coordinates of the point at the given distance along the path.

See PointAtDistanceAlongPathL for 2D version.

Syntax

[Link] (Distance, XP, YP, ZP, Elem)

double Distance Distance along path from start point

double XP Returned X coordinate (global)

double YP Returned Y coordinate (global)

double ZP Returned Z coordinate (global)

[Link] 2026-03-29
Objects - Objects Page 282 of 375

Element Elem Returned Element object for line or arc containing point

[Return] boolean Returned value, True if point found OK, False if not eg Distance greater than length of
path.

Remarks

The example draws a vertical 3D polyline at intervals along a geometry.

Note the Dim statements declaring the parameters xp, yp, zp and elem, these variables must be of the
specified types.

Sub main()

Dim drw As Drawing

Set drw = [Link]

Dim p As Path

Set p = [Link]("Select 3D Geometry to step along")

If Not (p Is Nothing) Then

For dist = 1 To [Link] Step 10


Dim elem as Element
Dim xp As Double, yp As Double, zp As Double
ok = [Link] (dist, xp, yp, zp, elem)
If ok Then
' Draw a polyline
Dim geo As PolyLine
Set geo = drw.Create3DPolyline (xp, yp, zp)
[Link] xp, yp, zp + 5
[Link]
End If
Next dist

End If

End Sub

[Link]

Find Local coordinates of the point at the given distance along the path.

See PointAtDistanceAlongPathG for 3D version.

Syntax

[Link] (Distance, XP, YP, Elem)

[Link] 2026-03-29
Objects - Objects Page 283 of 375

double Distance Distance along path from start point

double * XP Returned X coordinate (local)

double * YP Returned Y coordinate (local)

Element * Elem Returned Element object for line or arc containing point

[Return] boolean Returned value, True if point found OK, False if not eg Distance greater than length of
path.

Remarks

The example draws a circle at intervals along a geometry.

Note the Dim statements declaring the parameters xp, yp and elem, these variables must be of the
specified types.

Sub main()

Dim drw As Drawing

Set drw = [Link]

Dim p As Path

Set p = [Link]("Select Geometry to step along")

If Not (p Is Nothing) Then

path_len = [Link]

For dist = 1 To path_len Step 10

Dim elem As Element

Dim xp As Double, yp As Double

ok = [Link] (dist, xp, yp, elem)

if ok then

' Draw a circle

[Link] 5, xp, yp

Else

End

[Link] 2026-03-29
Objects - Objects Page 284 of 375

End If

Next dist

End If

End Sub

[Link]

Redraw this path.

Syntax

[Link]

[Link]

Remove corner loops from tool path.

[Link]

Close path if it has a tag done with negative overlap.

[Link]

If this path is a tag, remove it and combine previous and next paths.

Syntax

[Link]

[Link]

Replace the elements in the current path with those in given path

Syntax

[Link](Path2)

Path Path2 Path containing elements to be added

Remarks

Path2 will be deleted.

[Link]

Reverse this path.

[Link] 2026-03-29
Objects - Objects Page 285 of 375

Syntax

[Link]

[Link]

Rotate the path in the 3D Global coordinate system, about a specified axis.

Syntax

[Link] (Angle, X1, Y1, Z1, X2, Y2, Z2)

double Angle Angle in degrees to rotate by, CW -ve.

double X1

double Y1 Global XYZ coordinates of first point on axis to rotate about.

double Z1

double X2

double Y2 Global XYZ coordinates of second point on axis to rotate about.

double Z2

Remarks

The path (which may be any path, in a work plane or 2D flat land or 3D global) will be rotated in global
XYZ about the axis given by the 3D line from (X1, Y1, Z1) to (X2, Y2, Z2).

See also

[Link]

[Link]

Rotate the path in its 2D Local coordinate system.

Syntax

[Link] (Angle, BaseX, BaseY)

double Angle Angle in degrees to rotate by, CW -ve.

double BaseX Local X coordinate of point to rotate about

double BaseY Local Y coordinate of point to rotate about

Remarks

[Link] 2026-03-29
Objects - Objects Page 286 of 375

If the path is in a work plane it will be rotated in that plane. If it is not in a work plane it will be rotated
in global XY.

See also

[Link]

[Link]

Save this path in the undo list before modifying it. Usually Alphacam will save it automatically but for
some actions it won't, eg modifying attributes.

Syntax

[Link]

[Link]

Scale the path in the 3D Global coordinate system, by a single factor.

Syntax

[Link] (Factor, BaseX, BaseY, BaseZ)

double Factor Scale factor

double BaseX Global X coordinate of point to scale about.

double BaseY Global Y coordinate of point to scale about.

double BaseZ Global Z coordinate of point to scale about.

Remarks

The path (which may be any path, in a work plane or 2D flat land or 3D global) will be scaled in global
XYZ about the given base point.

See also

[Link]

Path.ScaleL2

[Link]

Scale the path in its 2D Local coordinate system, by a single factor.

Syntax

[Link] (Factor, BaseX, BaseY)

[Link] 2026-03-29
Objects - Objects Page 287 of 375

double Factor Scale factor

double BaseX Local X coordinate of point to scale about.

double BaseY Local Y coordinate of point to scale about.

Remarks

If the path is in a work plane it will be scaled in that plane. If it is not in a work plane it will be scaled in
global XY.

See also

Path.ScaleL2

[Link]

Path.ScaleL2

Scale the path in its 2D Local coordinate system by different factors in X and Y.

Syntax

geo.ScaleL2 (FactorX, FactorY, BaseX, BaseY)

double FactorX Scale factor in X

double FactorY Scale factor in Y

double BaseX Local X coordinate of point to scale about.

double BaseY Local Y coordinate of point to scale about.

Remarks

If the path is in a work plane it will be scaled in that plane. If it is not in a work plane it will be scaled in
global XY.

See also

[Link]

[Link]

Path.Set3DApproach

Add 3D approach to a tool path.

Syntax

[Link] 2026-03-29
Objects - Objects Page 288 of 375

Path.Set3DApproach (Method, Slope, ApproachAngle, ApproachPitch, HoleDiaMultiplier,


ZigZagLength, CW)

Acam3DApproachMethod Method acam3DApproachSPIRAL, acam3DApproachZIGZAG or


acam3DApproachPLUNGE

Acam3DApproachSlope Slope acam3DApproachANGLE or acam3DApproachPITCH

Double ApproachAngle Approach angle

Double ApproachPitch Appoach pitch

Double HoleDiaMultiplier

Double ZigZagLength

Bool CW True for CW, False for CCW

Path.Set3DLeadInOutAuto

Do automatic lead-in/out on this 3D tool path.

Syntax

path.Set3DLeadInOutAuto (LeadIn, RadiusIn, LengthIn, ArcAngleIn, SlopeIn, ZSlopeInAmount,


LeadInSide, XIn, YIn, ZIn, LeadOut, RadiusOut, LengthOut, ArcAngleOut, SlopeOut,
ZSlopeOutAmount, LeadOutSide, XOut, YOut, ZOut, Overlap, ChordTolerance)

AcamLeadType LeadIn eg acamLeadARC, see remarks

Double RadiusIn Radius of lead-in

Double LengthIn Length of lead-in

Double ArcAngleIn Included angle of arc lead-in, in degrees

Boolean SlopeIn True for sloping lead-in

Double ZSlopeInAmount Amount to slope in Z for lead-in

AcamToolSide LeadInSide Side to lead-in on

Double XIn, YIn, ZIn Point to lead-in from if using a line only

AcamLeadType LeadOut eg acamLeadARC, see remarks

[Link] 2026-03-29
Objects - Objects Page 289 of 375

Double RadiusOut Radius of lead-out

Double LengthOut Length of lead-out

Double ArcAngleOut Included angle of arc lead-out, in degrees

Boolean SlopeOut True for sloping lead-out

Double ZSlopeOutAmount Amount to slope in Z for lead-out

AcamToolSide LeadOutSide Side to lead-out on

Double XOut, YOut, ZOut Point to lead-in from if using a line only

Double Overlap Overlap

Double ChordTolerance tolerance for arcs

[Link] (Laser only)

Set the machining data for this path if it is a tool path.

Syntax

[Link] (LD)

LaserData LD LaserData object

Remarks

Can be used to edit the parameters of a tool path, usually starting with [Link]. The example
changes the cut feed of all the tool paths in the drawing to 50.

Dim Drw As Drawing


Set Drw = [Link]

Dim P As Path

For Each P In [Link]


Dim LD As LaserData
Set LD = [Link]

[Link] = 50

[Link] LD
Next P

[Link]

[Link] 2026-03-29
Objects - Objects Page 290 of 375

[Link]

Set the layer for the path.

Syntax

[Link] (layer)

Layer layer layer object

[Link]

Do automatic lead-in/out on this tool path.

Syntax

[Link] (LeadIn, LeadOut, LengthMultiplier, RadiusMultiplier, Angle, SlopeIn,


SlopeOut, Overlap)

AcamLeadType LeadIn eg acamLeadARC, see remarks

AcamLeadType LeadOut eg acamLeadARC, see remarks

Double LengthMultiplier Length of lead-in/out, as multiplier of tool radius

Double RadiusMultiplier Radius of lead-in/out, as multiplier of tool radius

Double Angle Angle with tool path, in degrees

Boolean SlopeIn True for sloping lead-in

Boolean SlopeOut True for sloping lead-out

Double Overlap Overlap, negative for tag

Remarks

See [Link] for an example.

AcamLeadType can have the values:

acamLeadARC = 1

acamLeadBOTH = 2

acamLeadLINE = 0

acamLeadNO_CHANGE = 4

acamLeadNONE = 3

[Link] 2026-03-29
Objects - Objects Page 291 of 375

acamLeadBOTH_NOT_TANGENTIAL = 10 (as acamLeadBOTH but with Line /Arc In (or Out)


Tangential unchecked)

[Link]

Apply manual lead-in/out to this tool path.

Syntax

[Link] (LeadIn, LeadOut, SlopeIn, SlopeOut, XIn, YIn, XOut, YOut, [Overlap],
[RadiusMultiplier])

AcamLeadType LeadIn eg acamLeadARC, see remarks

AcamLeadType LeadOut eg acamLeadARC, see remarks

Boolean SlopeIn True for sloping lead-in

Boolean SlopeOut True for sloping lead-out

Double XIn X coordinate of start of lead-in

Double YIn Y coordinate of start of lead-in

Double XOut X coordinate of end of lead-out

Double YOut Y coordinate of end of lead-out

Double Overlap (Optional) Overlap, negative for tag

Double RadiusMultiplier (Optional) Radius of arc, if "Both" option used, as multiplier of tool radius

Remarks

If Overlap is not given it will be 0. If RadiusMultiplier is not given it will use the current value given in
the Lead-In/Out dialog box.

AcamLeadType can have the values:

acamLeadARC = 1

acamLeadBOTH = 2

acamLeadLINE = 0

acamLeadNO_CHANGE = 4

acamLeadNONE = 3

acamLeadBOTH_NOT_TANGENTIAL = 10 (as acamLeadBOTH but with Line /Arc In (or

[Link] 2026-03-29
Objects - Objects Page 292 of 375

Out) Tangential unchecked)

[Link]

Make this geometry the material for solid simulation etc.

Syntax

[Link] (TopZ, BottomZ)

double TopZ Z coordinate of top of material

double BottomZ Z coordinate of bottom of material

[Return] boolean True if OK

Remarks

The geometry must be closed.

[Link] (Mill, Router, Stone, Lathe only)

Set the machining data for this path if it is a tool path.

Syntax

[Link] (MD)

MillData MD MillData object

Remarks

Can be used to edit the parameters of a tool path, usually starting with [Link]. The example
changes the rapid level of all the tool paths in the drawing to 50.

Dim Drw As Drawing


Set Drw = [Link]

Dim P As Path

For Each P In [Link]


Dim MD As MillData
Set MD = [Link]

[Link] = 50

[Link] MD
Next P

[Link] = True

[Link] 2026-03-29
Objects - Objects Page 293 of 375

[Link]

[Link] (Router Only)

Set this geometry to be the Panel in Router (Equivalent to the "Specify Panel" command).

Syntax

[Link] (TopZ, BottomZ)

Double TopZ Z level of top of panel

Double BottomZ Z level of bottom of panel

[Link]

Set the start point for the path, if path is closed.

Syntax

[Link] (X, Y)

double X Local X coordinate of new start point

double Y Local Y coordinate of new start point

[Link]

Change the tool used for this tool path.

Syntax

[Link](Tool)

MillTool Tool Tool object

Remarks

This routine should be used with care. The tool path will NOT be recalculated in any way, eg if an offset
path. If a bigger tool is used it may foul.

[Link]

Set the current work plane for the path.

Syntax

[Link] 2026-03-29
Objects - Objects Page 294 of 375

[Link] (wp)

WorkPlane wp WorkPlane object

[Link]

Make this geometry the work volume.

Syntax

[Link] (TopZ, BottomZ)

double TopZ Z coordinate of top of work volume

double BottomZ Z coordinate of bottom of work volume

[Return] boolean True if OK

Remarks

The geometry must be a rectangle.

[Link]

Show or remove the ghost tool marker for this path.

Syntax

[Link](show)

Boolean Show True to show, False to remove

[Link]

Do "Slow Down for Corners" command on this tool path. It will be split into multiple paths, each with a
different feed.

Syntax

[Link] (DecelerationDistance, NumberOfSteps, PercentOfFullSpeed, MaxRadius,


MaxAngle, AccelerateOut)

double DecelerationDistance Total deceleration distance

long NumberOfSteps Number of steps

double PercentOfFullSpeed Slow down to this % of full speed

[Link] 2026-03-29
Objects - Objects Page 295 of 375

double MaxRadius Do not slow down if radius is bigger than this

double MaxAngle Ignore angle bigger than this, eg 170 (degrees)

boolean AccelerateOut True to accelerate out of corner

[Link]

Store a path created with CopyTemporary or OffsetTemporary in the Alphacam database.

Syntax

[Link]

[Link]

See if a path is inside this path.

Syntax

[Link](Path2)

Path Path2 path to be tested

[Return] AcamResult Return result, see remarks

Remarks

Path2 should be closed, and must not cross this path, but it may touch.

Return acamResultTRUE if this path is inside Path2, acamResultFALSE if outside,

acamResultUNKNOWN if unable to determine it.

[Link]

See if a path intersects with this path.

Syntax

[Link] (Path2, XShift2, YShift2)

Path Path2 path to be tested

double XShift2 Local X shift for Path2

double YShift2 Local Y shift for Path2

[Return] boolean Return result, True if intersects

[Link] 2026-03-29
Objects - Objects Page 296 of 375

The example selects all geometries that intersect with the first geometry.

Dim Drw As Drawing


Set Drw = [Link]

[Link] False

Dim P1 As Path, P2 As Path


Set P1 = [Link](1)
For Each P2 In [Link]
If Not (P1 Is P2) Then
If [Link](P1, 0, 0) Then
[Link] = True
[Link]
End If
End If
Next P2

[Link]

Trim the path at intersection points with currently selected geometries, and discard one part.

Syntax

[Link] (X, Y)

double X X coord of point on part to delete

double Y Y coord of point on part to delete

Paths Object
A Collection of Path objects.

More:

Paths Properties

Paths Properties

Count - (long) Number of items in the collection (read-only)

Drawing - (Drawing) The drawing for this collection, if it is in the main drawing then the existing
drawing object will be returned otherwise a temporary one will be created (read-only)

Selected - (boolean) Set to True to select all Paths in the collection, set to False to deselect all paths
(write-only)

[Link]

[Link] 2026-03-29
Objects - Objects Page 297 of 375

Add a Path to the Collection. Only permitted if the Collection was created with
[Link] or [Link].

Syntax

[Link](Path)

Path Path Path object to add

[Link]

Add paths in one collection to this one. Any that are already in the collection will be ignored. Only
permitted if the Collection was created with [Link] or [Link].

Syntax

[Link](Paths, First, Last)

Paths Paths Paths object to append

First Int Index of first path to append

Last Int Index of last path to append

[Link]

Break the given path at all intersection points with geometries in the collection. Returned collection
includes all the resulting paths, including the first one.

Syntax

[Link] (Path)

Path Path Path to break.

[Return] Paths Returned resulting paths

[Link]

Let the user graphically drag the paths to a new location.

See [Link].

Paths.DragMove2

Let the user graphically drag the paths to a new location, not using XOR.

Syntax

paths.DragMove2 (Prompt, XBase, YBase, XNew, YNew)

[Link] 2026-03-29
Objects - Objects Page 298 of 375

String Prompt Text to display in prompt bar

double XBase X coordinate of base point

double YBase Y coordinate of base point

[Return] double XNew Returned X coordinate of new point

[Return] double YNew Returned Y coordinate of new point

[Return] long Return value is 0 if OK

Remarks

The cross-hair cursor will be centered on (XBase, YBase)

The required displacement is found by (XNew - XBase, YNew - YBase).

The example will drag the first geometry, if the user accepts the geometry is moved to the new position.

Dim Drw As Drawing


Set Drw = [Link]
Dim P1 As Path

Set P1 = [Link](1)
Dim Ret As Long
Dim XBase As Double, YBase As Double
Dim XNew As Double, YNew As Double

XBase = ([Link] + [Link]) / 2


YBase = ([Link] + [Link]) / 2
Ret = P1.DragMove2("Drag", XBase, YBase, 0, Nothing, XNew, YNew)

If Ret = 0 Then
[Link] XNew - XBase, YNew - YBase
End If

[Link]

Let the user graphically drag the path to a new orientation.

Syntax

[Link] (Prompt, XBase, YBase, Angle)

String Prompt Text to display in prompt bar

double XBase X coordinate of base point

double YBase Y coordinate of base point

[Link] 2026-03-29
Objects - Objects Page 299 of 375

[Return] double Angle Returned Angle in degrees

[Return] long Return value is 0 if OK

[Link]

Duplicate the collection. The paths are not copied - this method just creates a new Paths collection
referencing the same paths. The Add and Remove methods may be used on the new collection.

Syntax

[Link]

[Return] Paths Returned new collection

[Link]

Get local Max / Min XY of paths in this collection.

Syntax

[Link] (MinX, MinY, MaxX, MaxY)

Double MinX Returned Minimum X Local coordinate

Double MinY Returned Minimum Y Local coordinate

Double MaxX Returned Maximum X Local coordinate

Double MaxY Returned Maximum Y Local coordinate

[Link]

Get global Max / Min XY of paths in this collection.

Syntax

[Link] (MinX, MinY, MaxX, MaxY)

Double MinX Returned Minimum X Global coordinate

Double MinY Returned Minimum Y Global coordinate

Double MaxX Returned Maximum X Global coordinate

Double MaxY Returned Maximum Y Global coordinate

[Link]

For tool paths with a Saw tool, get a collection of Paths representing the external shape that the saw

[Link] 2026-03-29
Objects - Objects Page 300 of 375

would make at the material top.

Syntax

[Link]

Return Paths

Remarks

The paths are not in a drawing so to see them use [Link], for example:

Dim Ps As Paths

Set Ps = [Link]

Dim P As Path

For Each P In Ps

[Link] [Link]

Next P

[Link]

For tool paths with a Saw tool, get a collection of Paths representing the internal shape that the saw
would make at the material top.

Syntax

[Link]

Return Paths

Remarks

The paths are not in a drawing so to see them use [Link], for example:

Dim Ps As Paths

Set Ps = [Link]

Dim P As Path

For Each P In Ps

[Link] [Link]

[Link] 2026-03-29
Objects - Objects Page 301 of 375

Next P

[Link]

Return a member of the Collection. It is the default member of the object so VBA can use it without
specifing the word Item.

Syntax

[Link](Index)

OR

paths(Index)

Long Index Index of required Path, 1 to Count

th
For example, the following gives the 4 geometry in the drawing:

[Link](4)

([Link] is a Paths object representing the geometries in the current Alphacam


drawing).

See Collections.

[Link]

"Quick-join" the paths in the collection, geometries only. Paths will not be saved for undo, they will not
be redrawn, no callbacks will be called.

Syntax

[Link] (Tolerance)

Double Tolerance Tolerance, set to <0 for default tolerance.</P>

[Link]

See [Link].

[Link]

See [Link].

[Link]

[Link] 2026-03-29
Objects - Objects Page 302 of 375

Remove a Path from the Collection. Only permitted if the Collection was created with
[Link], or [Link]. The path is not deleted.

Syntax

[Link](Path)

Path Path Path object to remove

Polyline Object
An object used to create a 3D Polyline, ie a set of connected 3D lines. Create it with
Drawing.Create3DPolyline, use the [Link] method to add lines, then finish with
[Link], which returns a Path object.

[Link]

Add a line to a 3D polyline, start point is end point of last line, or point passed to
Drawing.Create3DPolyline if this is the first line.

Syntax

[Link] (X, Y, Z)

double X X coordinate of end point

double Y Y coordinate of end point

double Z Z coordinate of end point

[Link]

Finish 3D polyline.

Syntax

[Link]

[Return] Path Pointer to Path Dispatch object

RectangleProperties Object
Object used to get the properties of a rectangle if a geometry represents a rectangle, parallel to the X-
axis.

Use [Link] to get the object. If the geometry is a rectangle then this object will be
returned and its properties may be read (not written). If it is not a rectangle the special value Nothing
will be returned.

[Link] 2026-03-29
Objects - Objects Page 303 of 375

More:

RectangleProperties Properties

RectangleProperties Properties

Bottom - (double) Minimum Y coordinate (read-only)

Height - (double) Top - Bottom (read-only)

Left (double) Minimum X coordinate (read-only)

Right - (double) Maximum X coordinate (read-only)

Top - (double) Maximum Y coordinate (read-only)

Width - (double) Right - Left (read-only)

SnapData Object
An object storing the data about the last snapped point. (All properties are read-only)

Properties

Element (Element) The element snapped to

Path (Path) The path snapped to

SnapMode (AcamSnap) The snap mode

XLocal, YLocal (double) Local coordinates of point snapped to

XGlobal, YGlobal, ZGlobal (double) Global coordinates of point snapped to

Spline Object
A spline curve.

More:

Spline Properties

Spline Properties

Degree - (short) Degree eg 3 for cubic spline (read-only)

[Link] 2026-03-29
Objects - Objects Page 304 of 375

Drawing - (Drawing) The drawing for this spline, if it is in the main drawing then the existing drawing
object will be returned otherwise a temporary one will be created (read-only)

Knots - (Variant / Double (0 to NumberKnots - 1)) The parameter values of the knots (read-only)

Is3D - (boolean) True if the spline is 3D, False if 2D (planar, ie in flatland or in a work plane) (read-
only)

MaxS - (double) Maximum value of S parameter (read-only)

MaxXG - (double) Maximum X Global coordinate (read-only)

MaxXL - (double) Maximum X Local coordinate (read-only)

MaxYG - (double) Maximum Y Global coordinate (read-only)

MaxYL - (double) Maximum Y Local coordinate (read-only)

MaxZG - (double) Maximum Z Global coordinate (read-only)

MaxZL - (double) Maximum Z Local coordinate (read-only)

MinS - (double) Minimum value of S parameter (read-only)

MinXG - (double) Minimum X Global coordinate (read-only)

MinXL - (double) Minimum X Local coordinate (read-only)

MinYG - (double) Minimum Y Global coordinate (read-only)

MinYL - (double) Minimum Y Local coordinate (read-only)

MinZG - (double) Minimum Z Global coordinate (read-only)

MinZL - (double) Minimum Z Local coordinate (read-only)

NumberKnots - (short) Number of knots (read-only)

NumberVertices - (short) Number of vertices (control points) (read-only)

Periodic - (boolean) True if spline is periodic (read-only)

Rational - (boolean) True if spline is rational (some weights are not 1) (read-only)

Selected - (boolean) True if spline is selected

VerticesX - (Variant / Double (0 to NumberVertices - 1)) The X coordinates of the vertices (control
points) (read-only)

VerticesY - (Variant / Double (0 to NumberVertices - 1)) The Y coordinates of the vertices (control

[Link] 2026-03-29
Objects - Objects Page 305 of 375

points) (read-only)

VerticesZ - (Variant / Double (0 to NumberVertices - 1)) The Z coordinates of the vertices (control
points) (read-only)

Visible - (boolean) True if spline is visible, ie not hidden

Weights - (Variant / Double (0 to NumberVertices - 1)) The weights (read-only)

[Link]

Copy the spline and return a Spline object for the new spline.

Syntax

[Link]

[Return] Spline Spline object.

Remarks

The spline will be added to the end of the list of splines.

[Link]

Create a geometry path from the spline.

Syntax

[Link] (Tolerance)

double Tolerance Tolerance to fit path to

[Return] Path Path object

[Link]

Evaluate the spline at the given point, returning global coordinates. The coordinates will be returned,
and, optionally, the derivative values.

See EvaluateL for local coordinates.

Syntax

[Link] (S, Flags)

double S Parameter value

AcamSplineEvaluate Flags acamEvaluateCOORDS or acamEvaluateALL

[Link] 2026-03-29
Objects - Objects Page 306 of 375

[Return] Variant Returned array of doubles, see remarks

Remarks

If Flags is acamEvaluateCOORDS the returned array will contain the global X, Y and Z coordinates. For
example, the following code will display the XYZ coordinates at the point on the spline where the
parameter value is 0.5 (Usually the middle, but not always eg if the spline came from another CAD
system):

Dim V

V = [Link] (.5, acamEvaluateCOORDS)

MsgBox "X=" & V(0) & ", Y=" & V(1) & ", Z=" & V(2)

If Flags is acamEvaluateALL, the array will also contain the derivative values:

V(3) dx/ds

V(4) dy/ds

V(5) dz/ds

V(6), V(7), V(8) second derivatives.

[Link]

Evaluate the spline at the given point, returning local coordinates. The coordinates will be returned, and,
optionally, the derivative values.

See EvaluateG for global coordinates.

Syntax

[Link] (S, Flags)

double S Parameter value

AcamSplineEvaluate Flags acamEvaluateCOORDS or acamEvaluateALL

[Return] Variant Returned array of doubles, see remarks

Remarks

If Flags is acamEvaluateCOORDS the returned array will contain the local X, Y and Z coordinates. For
example, the following code will display the XYZ coordinates at the point on the spline where the
parameter value is 0.5 (Usually the middle, but not always eg if the spline came from another CAD
system):

Dim V

[Link] 2026-03-29
Objects - Objects Page 307 of 375

V = [Link] (.5, acamEvaluateCOORDS)

MsgBox "X=" & V(0) & ", Y=" & V(1) & ", Z=" & V(2)

If Flags is acamEvaluateALL, the array will also contain the derivative values:

V(3) dx/ds

V(4) dy/ds

V(5) dz/ds

V(6), V(7), V(8) second derivatives.

[Link]

Get the layer for the spline. An object of type Layer will be returned.

Syntax

[Link]

[Return] Layer Layer object

[Link]

Get the work plane for the spline. An object of type WorkPlane will be returned. If the spline is not in a
work plane the special value Nothing will be returned, which may be used in tests.

Syntax

[Link]

[Return] WorkPlane WorkPlane object

[Link]

Mirror the spline using a work plane in the 3D Global coordinate system.

Syntax

[Link] (WP)

WorkPlane WP Work plane to mirror in

Remarks

The spline (which may be any spline, in a work plane or 2D flat land or 3D global) will be mirrored in
global XYZ, using the given work plane as the plane to mirror in.

[Link] 2026-03-29
Objects - Objects Page 308 of 375

[Link]

Mirror the spline about a line in its 2D Local coordinate system.

Syntax

[Link] (X1, Y1, X2, Y2)

double X1 Local X coordinate of first point on mirror line

double Y1 Local Y coordinate of first point on mirror line

double X2 Local X coordinate of second point on mirror line

double Y2 Local Y coordinate of second point on mirror line

[Link]

Move the spline in the 3D Global coordinate system.

Syntax

[Link] (X, Y, Z)

double X Distance to move in global X

double Y Distance to move in global Y

double Z Distance to move in global Z

Remarks

If the spline is in a work plane it will be moved to a new work plane if necessary. If it is not in a work
plane it will be moved in global XYZ by the specified distances.

[Link]

Move the spline in its 2D Local coordinate system.

Syntax

[Link] (X, Y)

double X Distance to move in local X

double Y Distance to move in local Y

Remarks

If the spline is in a work plane it will be moved in that plane by the specified distances. If it is not in a

[Link] 2026-03-29
Objects - Objects Page 309 of 375

work plane it will be moved in global XY by the specified distances.

[Link]

Move the spline to another drawing.

Syntax

[Link] NewDrawing

Drawing NewDrawing The drawing to move the spline to

Remarks

This can be used to move splines between drawings for example, from the active drawing to a drawing
opened with OpenTempDrawing, or the other way.

[Link]

Project this spline to given work plane.

Syntax

[Link] (WP, Direction)

WorkPlane WP The work plane to project to

AcamProjectDirection Direction Project direction, acamProjectDirectionNORMAL_TO_OLD_PLANE


or acamProjectDirectionNORMAL_TO_NEW_PLANE

[Return] Spline Spline object.

Remarks

This will project the spline vertices so there is no step length or tolerance parameters as in the Drawing
project methods.

[Link]

Redraw this spline.

Syntax

[Link]

[Link]

[Link] 2026-03-29
Objects - Objects Page 310 of 375

Reverse this spline.

Syntax

[Link]

[Link]

Rotate the spline in the 3D Global coordinate system, about a specified axis.

Syntax

[Link] (Angle, X1, Y1, Z1, X2, Y2, Z2)

double Angle Angle in degrees to rotate by, CW -ve.

double X1

double Y1 Global XYZ coordinates of first point on axis to rotate about.

double Z1

double X2

double Y2 Global XYZ coordinates of second point on axis to rotate about.

double Z2

Remarks

The spline (which may be any spline, in a work plane or 2D flat land or 3D global) will be rotated in
global XYZ about the axis given by the 3D line from (X1, Y1, Z1) to (X2, Y2, Z2).

[Link]

Rotate the spline in its 2D Local coordinate system.

Syntax

[Link] (Angle, BaseX, BaseY)

double Angle Angle in degrees to rotate by, CW -ve.

double BaseX Local X coordinate of point to rotate about

double BaseY Local Y coordinate of point to rotate about

Remarks

If the spline is in a work plane it will be rotated in that plane. If it is not in a work plane it will be rotated

[Link] 2026-03-29
Objects - Objects Page 311 of 375

in global XY.

[Link]

Scale the spline in the 3D Global coordinate system, by a single factor.

Syntax

[Link] (Factor, BaseX, BaseY, BaseZ)

double Factor Scale factor

double BaseX Global X coordinate of point to scale about.

double BaseY Global Y coordinate of point to scale about.

double BaseZ Global Z coordinate of point to scale about.

Remarks

The spline (which may be any spline, in a work plane or 2D flat land or 3D global) will be scaled in
global XYZ about the given base point.

[Link]

Scale the spline in its 2D Local coordinate system, by a single factor.

Syntax

[Link] (Factor, BaseX, BaseY)

double Factor Scale factor

double BaseX Local X coordinate of point to scale about.

double BaseY Local Y coordinate of point to scale about.

Remarks

If the spline is in a work plane it will be scaled in that plane. If it is not in a work plane it will be scaled
in global XY.

Spline.ScaleL2

Scale the spline in its 2D Local coordinate system by different factors in X and Y.

Syntax

spline.ScaleL2 (FactorX, FactorY, BaseX, BaseY)

[Link] 2026-03-29
Objects - Objects Page 312 of 375

double FactorX Scale factor in X

double FactorY Scale factor in Y

double BaseX Local X coordinate of point to scale about.

double BaseY Local Y coordinate of point to scale about.

Remarks

If the spline is in a work plane it will be scaled in that plane. If it is not in a work plane it will be scaled
in global XY.

[Link]

Set the layer for the spline.

Syntax

[Link] (layer)

Layer layer layer object

[Link]

Set the current work plane for the spline.

Syntax

[Link] (wp)

WorkPlane wp WorkPlane object

SubOperation Object
A sub-operation, within an Operation.

More:

SubOperation Properties

SubOperation Properties

FeedDistance - (Double) The feed distance for this sub-operation (read-only)

Geometries - (Paths) The geometries associated within this sub-operation (read-only)

Name - (String) The name of this sub-operation, as in the Operation List dialog box (read-only)

[Link] 2026-03-29
Objects - Objects Page 313 of 375

Number - (Long) Operation Number (read-only)

OpGroup - (Long) Operation Group Number

Time - (Double) The time in seconds taken for this sub-operation (read-only)

Tool - (MillTool) The tool used in this sub-operation

ToolPaths - (Paths) The tool paths in this sub-operation (read-only)

Visible - (Boolean) True if the tool paths are visible

[Link]

Delete the sub-operation and the tool paths.

Syntax

[Link]

[Link] (Laser only)

Get the machining data for this sub-operation. An object of type LaserlData will be returned.

Syntax

[Link]

[Return] LaserData LaserData object

Remarks

The properties of the LaserData object may be read and/or written. If any are written, use
[Link] to regenerate the tool paths.

See [Link] for an example.

[Link]

Get the machining data for this sub-operation. An object of type MillData will be returned.

Syntax

[Link]

[Return] MillData MillData object

Remarks

The properties of the MillData object may be read and/or written. If any are written, use

[Link] 2026-03-29
Objects - Objects Page 314 of 375

[Link] to regenerate the tool paths.

See [Link] for an example.

[Link]

Order the tool paths in this sub-operation.

Syntax

[Link] (FirstPath)

Path FirstPath First path in the sub-operation

[Link]

Set the machining data for this sub-operation. The associated tool paths will be deleted and regenerated,
using the associated geometries.

Syntax

[Link] (LD)

LaserData LD LaserData object

Remarks

The LaserData object MUST be one returned by [Link].

See [Link] for an example.

[Link]

Set the machining data for this sub-operation. The associated tool paths will be deleted and regenerated,
using the associated geometries.

Syntax

[Link] (MD)

MillData MD MillData object

Remarks

The MillData object MUST be one returned by [Link].

Examples

[Link] 2026-03-29
Objects - Objects Page 315 of 375

The following examples assume that the referenced drawing file is available.

It is part of the standard release cdrom installed in English (UK).

Example 1, Change stock for operation 1 and regenerate tool paths

Public Sub EditOperation1()

[Link] [Link] & "licomdir\Tutorial\Mill Simple Shape + tool [Link]"


Dim Drw As Drawing
Set Drw = [Link]

Dim SubOp As SubOperation


Set SubOp = [Link](1).SubOperations(1)

Dim MD As MillData
Set MD = [Link]

[Link] = 2

[Link] MD

End Sub

Example 2, Change operation 2 from Drilling to Pecking

Public Sub EditOperation2()

' [Link] [Link] & "licomdir\Tutorial\Mill Simple Shape + tool [Link]"

Dim Drw As Drawing


Set Drw = [Link]

Dim SubOp As SubOperation


Set SubOp = [Link](2).SubOperations(1)

Dim MD As MillData
Set MD = [Link]

[Link] = acamPECK
[Link] = 1

[Link] MD

End Sub

Example3, Change the geometry for operation 3 and regenerate the tool paths

Public Sub EditOperation3()

[Link] 2026-03-29
Objects - Objects Page 316 of 375

' [Link] [Link] & "licomdir\Tutorial\Mill Simple Shape + tool [Link]"

Dim Drw As Drawing


Set Drw = [Link]

Dim SubOp As SubOperation


Set SubOp = [Link](3).SubOperations(1)

Dim P As Path
Set P = [Link](1)
[Link] 1.5, [Link](1).CenterXL, [Link](1).CenterYL

' To regenerate the tool paths after the geometries are changed
' just get and set the MillData object

Dim MD As MillData
Set MD = [Link]
[Link] MD

End Sub

SubOperations Object
A Collection of SubOperation objects.

More:

SubOperations Properties

SubOperations Properties

Count - (long) Number of items in the collection (read-only)

Surface Object
A 3D surface.

More:

Surface Properties

Surface Example

Surface Facets

Surface Properties

Attribute - See Attributes

[Link] 2026-03-29
Objects - Objects Page 317 of 375

CheckFoul - (boolean) True to check for fouling this surface while machining other surfaces. (write-
only)

DegreeS - (short) Degree in S direction eg 3 for cubic spline surface (read-only)

DegreeT - (short) Degree in T direction eg 3 for cubic spline surface (read-only)

Drawing - (Drawing) The drawing for this surface if it is in the main drawing then the existing drawing
object will be returned otherwise a temporary one will be created (read-only)

FacetsForMachining (see Facets) - (Variant / Double array) The facets for machining

FacetsForShading (see Facets) - (Variant / Double array) The facets for shading

KnotsS - (Variant / Double (0 to NumberKnotsS - 1)) The parameter values of the S knots (read-only)

KnotsT - (Variant / Double (0 to NumberKnotsS - 1)) The parameter values of the T knots (read-only)

MaxS - (double) Maximum value of S parameter (read-only)

MaxT - (double) Maximum value of T parameter (read-only)

MaxX - (double) Maximum X coordinate (read-only)

MaxY - (double) Maximum Y coordinate (read-only)

MaxZ - (double) Maximum Z coordinate (read-only)

McFacetsTolerance (see Facets) - (double) Tolerance for facets for machining

MinS - (double) Minimum value of S parameter (read-only)

MinT - (double) Minimum value of T parameter (read-only)

MinX - (double) Minimum X coordinate (read-only)

MinY - (double) Minimum Y coordinate (read-only)

MinZ - (double) Minimum Z coordinate (read-only)

NumberKnotsS - (short) Number of knots in S direction (read-only)

NumberKnotsT - (short) Number of knots in T direction (read-only)

NumberVerticesS - (short) Number of vertices (control points) in S direction (read-only)

NumberVerticesT - (short) Number of vertices (control points) in T direction (read-only)

PeriodicS - (boolean) True if surface is periodic in the S direction (read-only)

[Link] 2026-03-29
Objects - Objects Page 318 of 375

PeriodicT - (boolean) True if surface is periodic in the T direction (read-only)

Rational - (boolean) True if surface is rational (some weights are not 1) (read-only)

Selected - (boolean) True if surface is selected

Target - (boolean) True if surface was used for machining (read-only)

TrimBoundarys - (TrimBoundarys) Collection of trim boundaries for the surface (read-only)

Trimmed - (boolean) True if surface is trimmed (read-only)

VerticesX - (Variant / Double (0 to NumberVerticesS * NumberVerticesT - 1)) The X coordinates of the


vertices (control points) (read-only)

VerticesY - (Variant / Double (0 to NumberVerticesS * NumberVerticesT - 1)) The Y coordinates of the


vertices (control points) (read-only)

VerticesZ - (Variant / Double (0 to NumberVerticesS * NumberVerticesT - 1)) The Z coordinates of the


vertices (control points) (read-only)

Visible - (boolean) True if surface is visible, ie not hidden

Weights - (Variant / Double (0 to NumberVerticesS * NumberVerticesT - 1)) The weights (read-only)

[Link]

Copy the surface and return a Surface object for the new surface.

Syntax

[Link]

[Return] Surface Surface object.

Remarks

The surface will be added to the end of the list of surfaces.

[Link]

Evaluate the surface at the given point. The coordinates will be returned, and, optionally, the normal and
derivative values.

Syntax

[Link] (S, T, Flags)

double S S parameter value

[Link] 2026-03-29
Objects - Objects Page 319 of 375

double T T parameter value

AcamSurfaceEvaluate Flags acamEvaluateCOORDS, acamEvaluateCOORDS_AND_NORMAL or


acamEvaluateALL

[Return] Variant Returned array of doubles, see remarks

Remarks

If Flags is acamEvaluateCOORDS the returned array will contain the X, Y and Z coordinates. For
example, the following code will display the XYZ coordinates at the point on the surface where the
parameter values are 0.5 (Usually the middle, but not always eg if the surface came from another CAD
system):

Dim V

V = [Link] (.5, .5, acamEvaluateCOORDS)

MsgBox "X=" & V(0) & ", Y=" & V(1) & ", Z=" & V(2)

If Flags is acamEvaluateCOORDS_AND_NORMAL, the XYZ components of the unit normal will also
be returned, in V(3), V(4) and V(5)

See example Surface Example

If Flags is acamEvaluateALL, the array will also contain the derivative values:

V(6) dx/ds

V(7) dy/ds

V(8) dz/ds

V(9) dx/dt

V(10) dy/dt

V(11) dz/dt

V(12) d2x/ds2

V(13) d2y/ds2

V(14) d2z/ds2

V(15) d2x/dt2

V(16) d2y/dt2

V(17) d2z/dt2

[Link] 2026-03-29
Objects - Objects Page 320 of 375

V(18) d2x/dsdt

V(19) d2y/dsdt

V(20) d2z/dsdt

[Link]

Add surfaces to extend the surface by the given amount.

Syntax

[Link] (Distance)

double Distance Amount to extend by

[Link]

Call this when all trimming paths have been applied to the surface using TrimWithPath.

Syntax

[Link]

[Link]

Generate the facets for this surface.

Syntax

[Link] (Tolerance, Type)

double Tolerance Tolerance for facets

AcamFacetType Type Type of facets, acamFacetSHADING or acamFacetMACHINING

[Link]

Get the layer for the surface. An object of type Layer will be returned.

Syntax

[Link]

[Return] Layer Layer object

[Link] 2026-03-29
Objects - Objects Page 321 of 375

[Link]

Find the intersection of a 3D line with this surface.

Syntax

[Link] (X1, Y1, Z1, X2, Y2, Z2, XP, YP, ZP, S, T)

double X1 X Global coordinate of a point on the line

double Y1 Y…

double Z1 Z…

double X2 X Global coordinate of any other point on the line

double Y2 Y…

double Z2 Z…

double* XP Returned X Global coordinate of intersection point (If found)

double* YP Y…

double* ZP Z…

double* S Returned S coordinate of intersection point

double* T Returned T coordinate of intersection point

[Return] boolean True if OK, False if unable to find the intersection point.

Remarks

Note that the returned parameters (XP, YP, ZP, S and T) must be declared as double.

S and T can be used in a call to [Link], if the surface normal is required.

[Link]

Return True if the given S,T point is in a trimmed region of the surface.

Syntax

[Link] (S, T)

double S S parameter value

double T T parameter value

[Link] 2026-03-29
Objects - Objects Page 322 of 375

[Return] boolean True if point is in trimmed region of surface

See exampleSurface Example

[Link]

Mirror the surface using a work plane.

Syntax

[Link] (WP)

WorkPlane WP Work plane to mirror in

Remarks

The surface will be mirrored in global XYZ, using the given work plane as the plane to mirror in.

[Link]

Move the surface.

Syntax

[Link] (X, Y, Z)

double X Distance to move in global X

double Y Distance to move in global Y

double Z Distance to move in global Z

[Link]

Move the surface to another drawing.

Syntax

[Link] NewDrawing

Drawing NewDrawing The drawing to move the surface to

Remarks

This can be used to move surfaces between drawings for example, from the active drawing to a drawing
opened with OpenTempDrawing, or the other way.

[Link]

Redraw this surface.

[Link] 2026-03-29
Objects - Objects Page 323 of 375

Syntax

[Link]

[Link]

Reverse the tool side of the surface.

Syntax

[Link]

[Link]

Rotate the surface about a specified axis.

Syntax

[Link] (Angle, X1, Y1, Z1, X2, Y2, Z2)

double Angle Angle in degrees to rotate by, CW -ve.

double X1

double Y1 XYZ coordinates of first point on axis to rotate about.

double Z1

double X2

double Y2 XYZ coordinates of second point on axis to rotate about.

double Z2

Remarks

The surface will be rotated about the axis given by the 3D line from (X1, Y1, Z1) to (X2, Y2, Z2).

[Link]

Scale the surface

Syntax

[Link] (FactorX, FactorY, factorZ, BaseX, BaseY, BaseZ)

double FactorX X Scale factor

double FactorY Y Scale factor

[Link] 2026-03-29
Objects - Objects Page 324 of 375

double FactorZ Z Scale factor

double BaseX X coordinate of point to scale about.

double BaseY Y coordinate of point to scale about.

double BaseZ Z coordinate of point to scale about.

[Link]

Set the layer for the surface.

Syntax

[Link] (layer)

Layer layer layer object

[Link]

Set tool side using normal vector. If normal vector at centre of the surface is pointing downwards
reverse the surface.

Syntax

[Link]

[Link]

Create splines from the edges of the surface.

Syntax

[Link]

[Return] Splines Collection of Splines

[Link]

Add a trimming boundary to the surface. The path should be closed and orientated so that points to the
right are invalid, ie if the path is CW it represents a hole, if the path is CCW it represents an outer
boundary. The ToolSide property of the path should be acamRIGHT.

The path should be a 2D path, the X coordinate corresponds to the S parameter of the surface, Y
corresponds to T.

Syntax

[Link] 2026-03-29
Objects - Objects Page 325 of 375

[Link] (Path)

Path Path Trimming path

Remarks

Call FinishTrimming when all trim paths have been added.

[Link]

Remove all trimming boundaries from a surface.

Syntax

[Link]

Surface Example

The following routine draws a "Porcupine Map", that is, 3D polylines along the surface normal at points
on the surface.

Note:

MinS, MaxS, MinT and MaxT are used to find the range for the parametric variables S and T. Surfaces
created in Alphacam use the range 0 to 1, but surfaces imported from other systems can use any range.

IsPointTrimmed is used to suppress drawing where the surface is trimmed.

Public Sub SurfaceNormalVectors()

Dim Drw As Drawing


Dim SF As Surface
Set Drw = [Link]
Set SF = [Link]("Pick a Surface")
Dim S As Double, T As Double, L As Double
L=5
Dim V
For S = [Link] To [Link] Step 0.05
For T = [Link] To [Link] Step 0.05
If Not [Link](S, T) Then
V = [Link](S, T, acamEvaluateCOORDS_AND_NORMAL)
Dim P As PolyLine
Set P = Drw.Create3DPolyline(V(0), V(1), V(2))
[Link] V(0) + V(3) * L, V(1) + V(4) * L, V(2) + V(5) * L
[Link]
End If
Next T
Next S

[Link] 2026-03-29
Objects - Objects Page 326 of 375

End Sub

Surface Facets

The facets for the surface can be accessed using the properties FacetsForShading or
FacetsForMachining. The facets for shading are usually created using a larger tolerance than those for
machining. The tolerance used for the machining facets is the property McFacetsTolerance.

The facets can be read by storing the property in a Variant, and then accessing it as an array of doubles.
The VBA function UBound gives the size of the array. The lower bound is zero. Each facet is given as 9
numbers, that is, XYZ for 3 points: X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3.

The example extracts the facets and draws them as 3D polylines.

Public Sub CopyFacetsToPolylines(V As Variant) ' array of doubles

Dim I As Long, N As Long


N = UBound(V)
For I = 0 To N Step 9
Dim P As PolyLine
Set P = [Link].Create3DPolyline(V(I), V(I + 1), V(I + 2))
[Link] V(I + 3), V(I + 4), V(I + 5)
[Link] V(I + 6), V(I + 7), V(I + 8)
[Link] V(I), V(I + 1), V(I + 2)
[Link]
Next I

End Sub

Public Sub MachineFacetsToPolyline()

Dim Drw As Drawing


Dim SF As Surface
Set Drw = [Link]
Set SF = [Link]("Pick a Surface")
CopyFacetsToPolylines [Link]

End Sub

The facets can be set by creating an array in the same format and assigning it to the property.

Text Object
An object representing some text in the Alphacam drawing. The text may have one or more lines. Each
line is represented by an item in the Collection of TextLine objects, given by the Lines property. The
text in the drawing is found using the Text property of the Drawing object, which returns a Collection of
Text objects.

The example shows how to search the text in the drawing for a string:

[Link] 2026-03-29
Objects - Objects Page 327 of 375

Public Sub SearchForString(SearchStr As String)

Dim T As Text
For Each T In [Link]
Dim L As TextLine
For Each L In [Link]
Dim S As String
S = [Link]
If StrComp(S, SearchStr) = 0 Then
[Link] = True
[Link]
MsgBox S
[Link] = False
[Link]
End If
Next L
Next T

End Sub

More:

Text Properties

Text Properties

Attribute - See Attributes

BaseLine - (Path) The base-line for the text if it has one (read-only)

Bold - (boolean) True if the text is bold, if TrueType font used

CharacterWidthScale - (double) Scale factor in X direction

Drawing - (Drawing) The drawing for this text if it is in the main drawing then the existing drawing
object will be returned otherwise a temporary one will be created (read-only)

Font - (String) Font name for text. Starts with A for Alphacam font eg AStencil, or T for TrueType font
eg TArial

Group - (short) Number of group containing this text, 0 if none

Height - (double) Height of text

Italic - (boolean) True if the text is italic

ItalicAngle - (short) Slant angle for italic text

Justify - (AcamJustifyType) How the text is justified relative to the location point or base-
[Link], acamJustifyLEFT, acamJustifyRIGHT or acamJustifySCALED

[Link] 2026-03-29
Objects - Objects Page 328 of 375

Lines - (TextLines) The lines of text in the text object

LineSpacing - (double) Line spacing as a multiple of the height

LocationX - (double) X coordinate of base-point of text

LocationY - (double) Y coordinate of base-point of text

MaxXL -(double) Maximum X Local coordinate (read-only)

MaxYL - (double) Maximum Y Local coordinate (read-only)

MinXL - (double) Minimum X Local coordinate (read-only)

MinYL - (double) Minimum Y Local coordinate (read-only)

Reverse - (boolean) True if the text is reversed

Rotation - (double) Rotation of text

Selected - (boolean) True if text is selected

SpaceWidth - (double) Width of a space

Visible - (boolean) True if text is marked as visible (not hidden)

Spacing - (double) Character spacing as a multiple of the height

[Link]

Add a line of text to a text object.

Syntax

[Link] (Str)

String Str The text string to add

[Link]

Convert the text to geometry lines and arcs. The text will be deleted.

Syntax

[Link]

[Return] Paths The returned geometry as a Paths object

[Link]

[Link] 2026-03-29
Objects - Objects Page 329 of 375

Convert the text to temporary geometry lines and arcs. The text will NOT be deleted. The paths will
NOT be added to the database. Use [Link] if you want to store them in the database.

Syntax

[Link]

[Return] Paths The returned geometry as a Paths object

[Link]

Copy the text.

Syntax

[Link]

[Return] Text The new text.

[Link]

Copy text and do not add it to the Alphacam database.

Syntax

[Link]

See [Link]

[Link]

Erase the text from the screen by drawing it in the screen background colour. The text will not be
deleted. This is useful when a property of the text is to be changed, and you want to show the change
without redrawing the whole screen.

Syntax

[Link]

In the example the text is erased before the Font property is changed, the Redraw method then draws the
text in the new font.

Public Sub ChangeFont()

Dim Drw As Drawing


Set Drw = [Link]
[Link] = "AStencil"
Dim T As Text
Set T = Drw.CreateText2("Alphacam", 0, 0, 10)
MsgBox "Stencil Font"

[Link] 2026-03-29
Objects - Objects Page 330 of 375

[Link]
[Link] = "TArial"
[Link]
MsgBox "Arial Font"

End Sub

[Link]

Get the layer for the text. An object of type Layer will be returned.

Syntax

[Link]

[Return] Layer Layer object

[Link]

Get the work plane for the text. An object of type WorkPlane will be returned. If the text is not in a work
plane the special value Nothing will be returned, which may be used in tests.

Syntax

[Link]

[Return] WorkPlane WorkPlane object

[Link]

Move the text in the 3D Global coordinate system.

Syntax

[Link] (X, Y, Z)

double X Distance to move in global X

double Y Distance to move in global Y

double Z Distance to move in global Z

Remarks

If the text is in a work plane it will be moved to a new work plane if necessary. If it is not in a work
plane it will be moved in global XYZ by the specified distances.

See also

[Link]

[Link] 2026-03-29
Objects - Objects Page 331 of 375

[Link]

Move the text in its 2D Local coordinate system.

Syntax

[Link] (X, Y)

double X Distance to move in local X

double Y Distance to move in local Y

Remarks

If the text is in a work plane it will be moved in that plane by the specified distances. If it is not in a
work plane it will be moved in global XY by the specified distances.

See also

[Link]

[Link]

Move the text to another drawing.

Syntax

[Link] NewDrawing

Drawing NewDrawing The drawing to move the text to

Remarks

This can be used to move text between drawings for example, from the active drawing to a drawing
opened with OpenTempDrawing, or the other way.

[Link]

Redraw this text.

Syntax

[Link]

[Link]

Rotate the text in the 3D Global coordinate system, about a specified axis.

Syntax

[Link] 2026-03-29
Objects - Objects Page 332 of 375

[Link] (Angle, X1, Y1, Z1, X2, Y2, Z2)

double Angle Angle in degrees to rotate by, CW -ve.

double X1

double Y1 Global XYZ coordinates of first point on axis to rotate about.

double Z1

double X2

double Y2 Global XYZ coordinates of second point on axis to rotate about.

double Z2

Remarks

The text (which may be any text, in a work plane or 2D flat land) will be rotated in global XYZ about
the axis given by the 3D line from (X1, Y1, Z1) to (X2, Y2, Z2).

See also

[Link]

[Link]

Rotate the text in its 2D Local coordinate system.

Syntax

[Link] (Angle, BaseX, BaseY)

double Angle Angle in degrees to rotate by, CW -ve.

double BaseX Local X coordinate of point to rotate about

double BaseY Local Y coordinate of point to rotate about

Remarks

If the text is in a work plane it will be rotated in that plane. If it is not in a work plane it will be rotated in
global XY.

See also

[Link]

[Link]

[Link] 2026-03-29
Objects - Objects Page 333 of 375

Save the text in the undo list after changing its properties.

Syntax

[Link]

[Link]

Scale the text in its 2D Local coordinate system, by a single factor.

Syntax

[Link] (Factor, BaseX, BaseY)

double Factor Scale factor

double BaseX Local X coordinate of point to scale about.

double BaseY Local Y coordinate of point to scale about.

Remarks

If the text is in a work plane it will be scaled in that plane. If it is not in a work plane it will be scaled in
global XY.

[Link]

Set the layer for the text.

Syntax

[Link] (layer)

Layer layer layer object

[Link]

Set the current work plane for the text.

Syntax

[Link] (wp)

WorkPlane wp WorkPlane object

[Link]

Store a text object created with CopyTemporary in the Alphacam database.

Syntax

[Link] 2026-03-29
Objects - Objects Page 334 of 375

[Link]

[Link]

In Alphacam versions before V8, changing the settings in the API would change the GUI ones, which
was often not desired. This routine was added so it can still be done. After setting the properties of this
object call this method to make the user-interface default to the same settings.

Syntax

[Link]

TextLine Object
An object representing one line of text in a Text object.

More:

TextLine Properties

TextLine Properties

Text - (string) The text characters for this line

Texts Object
A Collection of Text objects.

More:

Texts Properties

Texts Properties

Count - (long) Number of items in the collection (read-only)

Selected - (boolean) Set to True to select all Text objects in the collection, set to False to deselect all
Text objects (write-only)

[Link]

Add a Text object to the Collection. Only permitted if the Collection was created with
[Link] or [Link].

Syntax

[Link](Text)

Text Text Text object to add

[Link] 2026-03-29
Objects - Objects Page 335 of 375

[Link]

Duplicate the collection. The text objects are not copied - this method just creates a new Texts collection
referencing the same objects. The Add and Remove methods may be used on the new collection.

Syntax

[Link]

[Return] Texts Returned new collection

[Link]

Return a member of the Collection. It is the default member of the object so VBA can use it without
specifing the word Item.

Syntax

[Link](Index)

OR

ts(Index)

Long Index Index of required Text object, 1 to Count

See Collections.

[Link]

See [Link].

[Link]

See [Link].

[Link]

Remove a Text object from the Collection. Only permitted if the Collection was created with
[Link] or [Link]. The text is not deleted.

Syntax

[Link](Text)

Text Text Text object to remove

ThreadDefinition Object

[Link] 2026-03-29
Objects - Objects Page 336 of 375

An object representing a defined thread, equivalent to a .ATH file in the [Link] folder. It is used to
define a thread which is written to a file.

More:

ThreadDefinition Properties

ThreadDefinition Properties

Angle - (float) Angle of thread

Depth - (float) Depth of thread

Diameter - (float) Diameter that thread should be used at

Pitch - (float) Pitch of thread

TPI - (float) Threads per Inch

TrimBoundary Object
A trim boundary on a surface.

A trimmed surface can have any number of trim boundaries. Each trim boundary consists of a Collection
of Path objects (Paths), or a Collection of Spline objects (Splines), which form a continuous closed
boundary. A trimmed surface has a Collection of trim boundaries (TrimBoundarys). The reason that it
may be Path or Spline objects is to preserve the boundary exactly as it was created, for example, an Iges
file may use Splines, Alphacam will use Paths.

More:

TrimBoundary Properties

TrimBoundary Properties

Paths - (Paths) The trim boundary as a Paths object, may be empty (read-only)

Splines - (Splines) The trim boundary as a Splines object, may be empty (read-only)

TurnData Object
Machining data for a Turning operation in Lathe, eg stock, feeds and speeds.

More:

TurnData Properties

Geometry for TurnData Examples

[Link] 2026-03-29
Objects - Objects Page 337 of 375

TurnData Properties

Most of these properties have the same name as the text in the dialog boxes in the English version of
Alphacam, in the corresponding commands.

Attribute - See Attributes

AutoLeadIn - (AcamAutoLeadType) Type of lead-in for Finish

AutoLeadLength - (float) Length of lead in/out for Finish

AutoLeadLengthIn - (float) Length of lead in for Finish

AutoLeadLengthOut - (float) Length of lead out for Finish

AutoLeadOut - (AcamAutoLeadType) Type of lead-out for Finish

BackOffDistancePerCut - (float) Back Off Distance Per Cut for Rough

Bidirectional - (boolean) True for bi-directional cuts in Pocket

Billet - (Path) The billet for roughing operations

CannedCycle - (Boolean) True to use a Canned Cycle instead of Linear Code

CheckClearanceAngle - (Boolean) True to Check Clearance Angle in Pocket

CleanProfileWithEachCut - (Boolean) True to Clean Profile With Each Cut in Rough

Coolant - (short) Coolant, acamCoolNONE = 0, acamCoolMIST = 1, acamCoolFLOOD = 2,


acamCoolTOOL = 3

DepthOfCut - (float) Depth of Cut in Rough, Pocket, Face, Groove

DiameterStock - (float) Diameter Stock in Rough

DwellTime - (float) Dwell for peck drilling

EndOfHole - (float) End Of Hole for Drill

EndOfTapThread - (float) End Of Tap Thread for Tap

FaceDownToRad - (float) Radius to face down to for Face

FaceStock - (float) Face Stock in Rough

FeedInDistance - (float) Feed-In Distance for Face

FeedX - (float) Feed in X direction

[Link] 2026-03-29
Objects - Objects Page 338 of 375

FeedXZ - (float) Feed in XZ direction

FeedZ - (float) Feed in Z direction

FoulAction - (AcamFoulAction) What to do when fouling occurs in Finish

GrooveHolderClearance - (float) Clearance for Tool Holder in Groove

GrooveProcess - (AcamGrooveProcess) Groove process to do eg acamGrooveFINISH

GrooveType - (AcamGrooveType) Type of Groove eg acamGrooveDIAMETER

HoleDepthIsShoulder - (boolean) True if hole depth is measured to drill shoulder

LagDistanceForSecondTool - (float) Lag distance for second tool in twin-turret roughing or finishing

McComp - (AcamComp) Machine compensation, acamCompTOOLCEN = 0, acamCompMC = 1

MoveBetweenSections - (AcamMoveType) Rapid or Feed between sections in Finish

OffsetForFirstCut - (float) Offset for first cut in Contour Roughing

OffsetNumber - (long) Tool offset number

OpNo - (short) Operation number

OpGroup - (long) Operation Group number

Part - (Path) The part for Face

PartOffChamferDiameter - (float) Outer Diameter of chamfer for Part-off

PartOffChamferWidth - (float) Width of chamfer for Part-off

PartOffFeedPerCent - (float) Final feed as % of first feed for Part-off

PartOffFinishDiameter - (float) Finish diameter for Part-off

PartOffFirstDiameter - (float) Diameter to feed to first for Part-off

PartOffMethod - (AcamPartOffMethod) Method for Part-off, acamPartOffCHAMFER,


acamPartOffREDUCE_FEED or acamPartOffSINGLE_CUT

PartOffSideClearance - (float) Groove side clearance for Part-off

PartOffZ - (float) End of part Z for Part-off

PeckDistance - (float) Peck distance for peck drilling

PocketType - (AcamTurnPocketType) Type of Pocket operation, acamPocketDIAMETER or

[Link] 2026-03-29
Objects - Objects Page 339 of 375

acamPocketFACE

ProcessType - (short) Type of machining process (read-only)

RapidApproach - (AcamPostRapidApproach) Type of rapids to approach the operation

RapidApproachSecurityX - (float)

RapidApproachSecurityZ - (float)

RapidOrtho - (Boolean) True to use rapid moves parallel to X or D axes only, for apporach and retract
rapids

RapidRetract - (AcamPostRapidRetract) Type of rapids to retract from the operation

RapidRetractSecurityX - (float)

RapidRetractSecurityZ - (float)

RetractPartial - (Boolean) True for Partial Retract in Drill

RoughType - (AcamRoughType) Type of roughing, acamRoughCONTOUR, acamRoughDIAMETER


or acamRoughFACE

Speed - (float) Speed, surface or spindle

StartOfHole - (float) Start of Hole for Drill

StartOfTapFeed - (float) Start of feed for Tap

Stock - (float) Stock allowance

StockForSecondTool - (float) Stock allowance for second tool in Balanced Finish

TapHolderIsFloating - (Boolean) True for floating tap holder

ThreadData - (TurnThreadData) Data for thread operation

ThreadFileName - (string) File name for thread to be used

ThreadPitch - (float) Pitch for tapping

ToolNumber - (long) Tool number

[Link]

Set the section of the part to be machined.

Syntax

[Link] 2026-03-29
Objects - Objects Page 340 of 375

[Link] (Path, StartZ, StartRad, EndZ, EndRad)

Path Path The part geometry

Double StartZ Z coordinate of start point

Double StartRad Radius coordinate of start point

Double EndZ Z coordinate of end point

Double EndRad Radius coordinate of end point

Remarks

Most turning operations work on one or more sections of a geometry. For example, Rough needs one
section, equivalent to the section between the two picked points when using it interactively. This method
defines that section, by specifying the Path object and the start and end points. Some methods, for
example Finish, allow more than one section. Call AddPartSection once for each section.

[Link]

Do twin-turret Balanced Finishing operation, using properties set for this object. Set the section (or
sections) to be machined with one (or more) calls to AddPartSection, for the top geometry only.

Syntax

[Link]

Remarks

Use [Link] to put a tool in the top turret and one in the bottom turret. Set the
properties as in the example for single turret finishing, and also set LagDistanceForSecondTool and
StockForSecondTool.

[Link]

Do twin-turret Balanced Roughing operation, using properties set for this object. Set the section to be
machined with AddPartSection, for the top geometry only.

Syntax

[Link]

Remarks

Use [Link] to put a tool in the top turret and one in the bottom turret. Set the
properties as in the example for single turret roughing, and also set LagDistanceForSecondTool.

[Link]

[Link] 2026-03-29
Objects - Objects Page 341 of 375

Do Drill operation, using properties set for this object, for example, StartOfHole and EndOfHole.

Syntax

[Link]

The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.

Public Sub Drill()

CreatePartGeo

Dim TD As TurnData
Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
Dim Tool As LatheTool
Set Tool = [Link]([Link] & "licomdat\[Link]\Drill - 10mm [Link]")
If Tool Is Nothing Then
MsgBox "Unable to Select Tool"
Exit Sub
End If
[Link] = acamFeedPER_MIN

.StartOfHole = 0
.EndOfHole = -10
.PeckDistance = 3
.RetractPartial = True
.HoleDepthIsShoulder = False
.SetRapidControlPoint 10, 0
.Drill

.SetRapidControlPoint 20, 0
.GotoToolChangePoint
End With

With [Link]
.[Link] = True
.ZoomAll
End With

End Sub

[Link]

Do Face operation, using properties set for this object, for example Billet and Part. AddPartSection is
NOT used.

Syntax

[Link] 2026-03-29
Objects - Objects Page 342 of 375

[Link]

The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.

Public Sub Face()

[Link]
Dim Drw As Drawing
Set Drw = [Link]

Dim P1 As Path, P2 As Path


Set P1 = CreateBilletGeo
Set P2 = CreatePartGeo

[Link] = acamRIGHT

Dim TD As TurnData
Set TD = [Link]

With TD
' Set Tool Change Position
.SetToolChangePoint 20, 50
' Select Tool
Dim Tool As LatheTool
Set Tool = [Link]([Link] & "licomdat\[Link]\Rough [Link]")
If Tool Is Nothing Then
MsgBox "Unable to Select Tool"
Exit Sub
End If
[Link] = acamFeedPER_REV

' Set geometry


.Billet = P1
.Part = P2

.DepthOfCut = 2
.FaceStock = 0.3
' Optional properties

' .FaceDownToRad = 5

' .FeedInDistance = 2

.Face
End With
[Link] = True
[Link]

End Sub

[Link] 2026-03-29
Objects - Objects Page 343 of 375

[Link]

Do Finish operation, using properties set for this object. Set the section (or sections) to be machined
with one (or more) calls to AddPartSection.

Syntax

[Link]

The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.

Public Sub Finish()

Dim Drw As Drawing


Set Drw = [Link]

Dim P2 As Path
Set P2 = CreatePartGeo
[Link] = acamRIGHT

Dim TD As TurnData
Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
[Link] [Link] & "licomdat\[Link]\Finish [Link]"

' Set two sections to be finished, skipping groove


.AddPartSection P2, -1, 10, -14.5, 10
.AddPartSection P2, -25.5, 10, -30, 10
.Stock = 0
.MoveBetweenSections = acamMoveRAPID

' Lead-in/out
.AutoLeadLength = 0.5
.AutoLeadIn = acamAutoLeadTANGENTIAL
.AutoLeadOut = acamAutoLeadPERPENDICULAR
.McComp = acamCompTOOLCEN

' Set point to control approach rapid from tool


' change point or end of last operation.
' Will approach parallel to Z-axis.
.SetRapidControlPoint 5, 10
.Finish

' Set point to control rapid to tool change point.


' Will rapid out parallel to X-axis. (Assuming tool nose rad = .4)
.SetRapidControlPoint -30.4, 20
.GotoToolChangePoint
End With

[Link] 2026-03-29
Objects - Objects Page 344 of 375

[Link] = True
[Link]

End Sub

[Link]

Goto Tool Change Point, set with SetToolChangePoint. Will be one move if SetRapidControlPoint is
not called first.

Syntax

[Link]

[Link]

Do Groove operation, using properties set for this object. Set the section to be machined with
AddPartSection. Set the type using GrooveProcess and GrooveType. SetToolSafePoint must be called to
set the point to approach the grooving.

Syntax

[Link]

The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here. Also, see SetGrooveFlatBottom for an example using a single cut.

Public Sub Groove()

Dim Drw As Drawing


Set Drw = [Link]

Dim P2 As Path
Set P2 = CreatePartGeo
[Link] = acamRIGHT

Dim TD As TurnData
Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
[Link] [Link] & "licomdat\[Link]\Groove Outside - Left [Link]"

.AddPartSection P2, -15, 10, -25, 10

' Must set this point, to set start radius of feeds


.SetToolSafePoint -20, 12

.GrooveType = acamGrooveDIAMETER

[Link] 2026-03-29
Objects - Objects Page 345 of 375

.GrooveProcess = acamGrooveROUGHANDFINISH

.PeckDistance = 4
.DepthOfCut = 2
.Stock = 0.5
.GrooveHolderClearance = 1

' Make approach rapid parallel to X-axis


.SetRapidControlPoint -20, 20
.Groove
End With

[Link] = True
[Link]

End Sub

[Link]

Start a manual tool path, using properties set for this TurnData object. An object of type
TurnManualToolPath will be returned. Its methods may then be used to build up one or more tool paths.

Syntax

[Link] (StartZ, StartRad)

double StartZ Z coordinate of start point

double StartRad Radius coordinate of start point

[Return] TurnManualToolPath returned TurnManualToolPath object

[Link]

Do Part-off operation, using properties set for this object.

Syntax

[Link]

The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.

Public Sub PartOff()

Dim Drw As Drawing


Set Drw = [Link]

Dim P2 As Path
Set P2 = CreatePartGeo

[Link] 2026-03-29
Objects - Objects Page 346 of 375

CreateBilletGeo
Dim TD As TurnData
Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
[Link] [Link] & "licomdat\[Link]\Parting Off - 4mm [Link]"

.PartOffMethod = acamPartOffCHAMFER

' Must set this point, to set start radius of feeds


.SetToolSafePoint -52, 22

.PartOffZ = -52
.PartOffFinishDiameter = 0
.PartOffFirstDiameter = 15
.PartOffFeedPerCent = 33.3
.PartOffChamferDiameter = 40
.PartOffChamferWidth = 2
.PartOffSideClearance = 0.025

.PartOff
End With

[Link] = True
[Link]

End Sub

[Link]

Do Pocket operation, using properties set for this object. Set the section to be machined with
AddPartSection.

Syntax

[Link]

The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.

Public Sub Pocket()

Dim Drw As Drawing


Set Drw = [Link]

Dim P2 As Path
Set P2 = CreatePartGeo
[Link] = acamRIGHT

Dim TD As TurnData

[Link] 2026-03-29
Objects - Objects Page 347 of 375

Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
[Link] [Link] & "licomdat\[Link]\Finish [Link]"

.AddPartSection P2, -30, 10, -40, 10

.PocketType = acamPocketDIAMETER

.FaceStock = 0.2
.DiameterStock = 0.3
.DepthOfCut = 0.5

.CheckClearanceAngle = True
.Bidirectional = False

.Pocket

.SetRapidControlPoint -35, 25
.GotoToolChangePoint
End With

[Link] = True
[Link]

End Sub

[Link]

Do Rough operation, using properties set for this object. Set the section to be machined with
AddPartSection.

Syntax

[Link]

Example 1: Diameter Roughing

The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.

Public Sub Rough()

Dim Drw As Drawing


Set Drw = [Link]

Dim P1 As Path, P2 As Path


Set P1 = CreateBilletGeo
Set P2 = CreatePartGeo

[Link] 2026-03-29
Objects - Objects Page 348 of 375

[Link] = acamRIGHT

Dim TD As TurnData
Set TD = [Link]

With TD
.SetToolChangePoint 20, 50

Dim Tool As LatheTool


Set Tool = [Link]([Link] & "licomdat\[Link]\Rough [Link]")
If Tool Is Nothing Then
MsgBox "Unable to Select Tool"
Exit Sub
End If

[Link] = 2500
[Link] = acamSpeedSURFACE
[Link] = acamFeedPER_REV

.RoughType = acamRoughDIAMETER

.Billet = P1
.AddPartSection P2, 0, 9, -55, 20

.FaceStock = 0.2
.DiameterStock = 0.1
.DepthOfCut = 4
.FeedInDistance = 0.1
.BackOffDistancePerCut = 0
.CleanProfileWithEachCut = True

.Speed = 5
.FeedZ = 0.2
.FeedX = 0.5
.Coolant = acamCoolFLOOD
.CannedCycle = False

' Set point to control roughing, allowing for material removed by Face operation
.SetToolSafePoint 1, 35
.Rough

.GotoToolChangePoint
End With
[Link] = True
[Link]

End Sub

Example 2: Contour Roughing with multiple sections

Public Sub ContourRough()

[Link] 2026-03-29
Objects - Objects Page 349 of 375

Dim Drw As Drawing


Set Drw = [Link]

Dim P2 As Path
Set P2 = CreatePartGeo
[Link] = acamRIGHT

Dim TD As TurnData
Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
[Link] [Link] & "licomdat\[Link]\Finish [Link]"

.RoughType = acamRoughCONTOUR

.AddPartSection P2, -1, 10, -14.5, 10


.AddPartSection P2, -25.5, 10, -30, 10
.AddPartSection P2, -40, 10, -50, 20

.OffsetForFirstCut = 3.5
.DepthOfCut = 1
.Stock = 0.5

.AutoLeadIn = acamAutoLeadTANGENTIAL
.AutoLeadOut = acamAutoLeadPERPENDICULAR
.AutoLeadLength = 1

.Rough
.GotoToolChangePoint
End With

[Link] = True
[Link]

End Sub

[Link]

Set the point on the flat bottom of the groove for single cut groove. (GrooveProcess =
acamGrooveSINGLECUT)

Syntax

[Link] (Z, Rad)

Double Z Z coordinate of point

Double Rad Radius coordinate of point

The example shows the use of this method with the Groove method. It uses the geometry drawn in

[Link] 2026-03-29
Objects - Objects Page 350 of 375

functions defined here.

Public Sub GrooveSingleCut()

Dim Drw As Drawing


Set Drw = [Link]

Dim P2 As Path
Set P2 = CreatePartGeo
[Link] = acamRIGHT

Dim TD As TurnData
Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
[Link] [Link] & "licomdat\[Link]\Groove Outside - Left [Link]"

.GrooveType = acamGrooveDIAMETER
.GrooveProcess = acamGrooveSINGLECUT

.Part = P2
.SetGrooveFlatBottom -20, 7

' Must set this point, to set start radius of feeds


.SetToolSafePoint -20, 12

.DepthOfCut = 2
.Stock = 0
.GrooveHolderClearance = 1

.Groove
End With

[Link] = True
[Link]

End Sub

[Link]

Set the point to control approach or retract rapids. If not set, rapid will be one move.

Syntax

[Link] (Z, Rad)

Double Z Z coordinate of point

Double Rad Radius coordinate of point

[Link] 2026-03-29
Objects - Objects Page 351 of 375

Remarks

This point controls the rapid moves for the NEXT method call. For example, if called before a
machining method (for example, Finish) the tool will rapid from the current position (the tool change
point, or the last point of the previous operation) to this point, and from this point to the first feed. If this
method is not called, only one rapid move will be used.

If this method is called before a call to GotoToolChangePoint, the tool will rapid to this point and then
to the tool change point.

See Finish for an example.

[Link]

Set synchronisation points for multi-turret machining.

Syntax

[Link] (Path1, Z1, Rad1, Path2, Z2, Rad2)

Path Path1 First Toolpath

Double Z1 Z coordinate of first sync point

Double Rad1 Radius coordinate of first sync point

Path Path2 Second Toolpath

Double Z2 Z coordinate of second sync point

Double Rad2 Radius coordinate of second sync point

[Link]

Set the tool change point.

Syntax

[Link] (Z, Rad)

Double Z Z coordinate of tool change point

Double Rad Radius coordinate of tool change point

[Link]

Set the tool change point for any turret.

Syntax

[Link] 2026-03-29
Objects - Objects Page 352 of 375

[Link] (Z, Rad, Turret, Station)

Double Z Z coordinate of tool change point

Double Rad Radius coordinate of tool change point

AcamLatheTurret Turret acamTurretABOVE_CL or acamTurretBELOW_CL

AcamLatheStation Station acamStationFRONT or acamStationBACK

[Link]

Set the point to control roughing, or to approach grooving.

Syntax

[Link] (Z, Rad)

Double Z Z coordinate of point

Double Rad Radius coordinate of point

Remarks

For Diameter Roughing, this point may be set to indicate that part of the billet has been removed for
example by Facing. This is equivalent to the "Set Area to be Cut (Click in Box)" prompt when Diameter
Roughing is used interactively.

If it is not set the whole billet will be used.

For Grooving, this point MUST be set. It sets the start of the first feed. For Single Cut (Diameter)
grooving, only the Radius coordinate will be used.

[Link]

Do Tap operation, using properties set for this object, for example StartOfTapFeed and
EndOfTapThread.

Syntax

[Link]

The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.

Public Sub Tap()

CreatePartGeo

Dim TD As TurnData

[Link] 2026-03-29
Objects - Objects Page 353 of 375

Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
[Link] [Link] & "licomdat\[Link]\C-Y Axis Mill Tools\Tap - 10mm x 1mm
[Link]"

.StartOfTapFeed = 0
.EndOfTapThread = -5

.TapHolderIsFloating = True
.DwellTime = 1.5

.Speed = 150

.SetRapidControlPoint 10, 0
.Tap

.SetRapidControlPoint 10, 0
.GotoToolChangePoint
End With

With [Link]
.[Link] = True
.ZoomAll
End With

End Sub

[Link]

Do Thread operation, using properties set for this object, and the TurnThreadData object.

Syntax

[Link]

Remarks

The thread to be used is set by the ThreadFileName property, and the data is set by the TurnThreadData
object, accessed by the ThreadData property, as in the example.

Example

Public Sub Thread()

Dim Drw As Drawing


Set Drw = [Link]

Dim P2 As Path

[Link] 2026-03-29
Objects - Objects Page 354 of 375

Set P2 = CreatePartGeo
[Link] = acamRIGHT

Dim TD As TurnData
Set TD = [Link]

With TD
.SetToolChangePoint 20, 50
[Link] [Link] & "licomdat\[Link]\Thread - External, [Link]"

' Set section


.AddPartSection P2, -1, 10, -14.5, 10

' Set the thread to be used


.ThreadFileName = [Link] & "licomdat\[Link]\Iso 20 [Link]"

' Set some thread data


With .ThreadData
.NumberOfPasses = 4
.LeadIn = acamThreadLeadTHREADANGLE
.LeadOut = acamThreadLeadHORIZONTAL
End With

.Thread

.GotoToolChangePoint
End With

[Link] = True
[Link]

End Sub

Geometry for TurnData Examples

Create the geometry for the billet and return the Path object.

Private Function CreateBilletGeo() As Path

Dim Drw As Drawing


Set Drw = [Link]
Dim G As Geo2D
Set G = Drw.Create2DGeometry(10, 0)
[Link] 10, 30
[Link] -55, 30
Set CreateBilletGeo = [Link]
[Link] 4, 4

End Function

[Link] 2026-03-29
Objects - Objects Page 355 of 375

Create the geometry for the part and return the Path object.

Private Function CreatePartGeo() As Path

Dim Drw As Drawing


Set Drw = [Link]
Dim G As Geo2D
Set G = Drw.Create2DGeometry(-10, 0)
[Link] -8, 5
[Link] 0, 5
[Link] 0, 10
[Link] -15, 10 ' start of groove
[Link] -15, 7
[Link] -25, 7
[Link] -25, 10 ' end of groove
[Link] -30, 10
G.AddArc2Point -35, 7, -40, 10 ' pocket
[Link] -50, 20
[Link] -55, 20
Set CreatePartGeo = [Link]
' Get the Element collection to do chamfer and fillet.
' The element numbers are not changed by the elements added by
' the chamfer and fillet, until the Elements property is read again.
Dim Elems As Elements
Set Elems = [Link]
' Chamfer the front end
Elems(3).Chamfer Elems(4), False, True, 1, 1
' Fillet the groove
Elems(4).Fillet Elems(5), False, True, 0.5
Elems(5).Fillet Elems(6), False, True, 0.5
Elems(6).Fillet Elems(7), False, True, 0.5
Elems(7).Fillet Elems(8), False, True, 0.5

End Function

TurnManualToolPath Object
An object used to create a manual turning tool path in Lathe.

To do a manual tool path first set the tool change position and select a tool, then use
[Link], set the feeds and speeds etc. if required, then use [Link] to
create a TurnManualToolPath object. Call the methods of this object to add lines and arcs to the manual
tool path. Call Finish to finish the tool path.

TurnManualToolPath.AddArc2Point

Add an arc, start point is end point of last line or arc, or point passed to [Link] if
this is the first line or arc.

[Link] 2026-03-29
Objects - Objects Page 356 of 375

Syntax

MTP.AddArc2Point (Z2, Rad2, Z3, Rad3)

double Z2 Z coordinate of second point

double Rad2 Radius coordinate of second point

double Z3 Z coordinate of end point

double Rad3 Radius coordinate of end point

[Link]

Add an arc, start point is end point of last line or arc, or point passed to [Link] if
this is the first line or arc.

[Link] (ZCen, RadCen, Angle)

double ZCen Z coordinate of center point

double RadCen Radius coordinate of center point

double Angle Included angle in degrees, CW -ve

[Link]

Add an arc, start point is end point of last line or arc, or point passed to [Link] if
this is the first line or arc.

Syntax

[Link] (Z, Rad, ZCen, RadCen, CW)

double Z Z coordinate of end point

double Rad Radius coordinate of end point

double ZCen Z coordinate of center point

double RadCen Radius coordinate of center point

boolean CW True for CW, False for CCW

[Link]

Add an arc, start point is end point of last line or arc, or point passed to [Link] if
this is the first line or arc.

Syntax

[Link] 2026-03-29
Objects - Objects Page 357 of 375

[Link] (Z, Rad, Radius, CW, Over180)

double Z Z coordinate of end point

double Rad Radius coordinate of end point

double Radius Arc radius

boolean CW True for CW, False for CCW

boolean Over180 True if included angle is more than 180 degrees

[Link]

Add a feed line, start point is end point of last line or arc, or point passed to [Link]
if this is the first line or arc.

Syntax

[Link] (Z, Rad)

double Z Z coordinate of end point

double Rad Radius coordinate of end point

[Link]

Add a rapid line, start point is end point of last line or arc, or point passed to [Link]
if this is the first line or arc.

Syntax

[Link] (Z, Rad)

double Z Z coordinate of end point

double Rad Radius coordinate of end point

[Link]

Add an arc, tangential to last line or arc, start point is end point of last line or arc. Can not be the first
line or arc in a geometry.

Syntax

[Link](Z, Rad)

double Z Z coordinate of end point

double Rad Radius coordinate of end point

[Link] 2026-03-29
Objects - Objects Page 358 of 375

[Link]

Finish the tool path. The tool path will be split into more than one path if necessary, and added to the
Alphacam database.

Syntax

[Link]

[Return] Paths Returned Paths object

Remarks

A tool path consists of usually one or more leading rapids, then feeds, then optionally one or more
trailing rapids. It may not have internal rapids. If it would have it will be split into more than one path.

The returned Paths object contains the resulting paths.

TurnProgrammingPoint Object
An object representing a programming point on a Turning Tool with multiple programming points. A
LatheTool object has a property which is a Collection of these objects, called TurnProgrammingPoints

Use the properties of this object to determine which programming point to use, and use
[Link] to set the point.

More:

TurnProgrammingPoint Properties

TurnProgrammingPoint Properties

OffsetNumber - (long) Offset Number for post

PositionX - (float) X Position of tip centre relative to first one

PositionY - (float) Y Position of tip centre relative to first one

RakeAngle - (float) Clearance angle

TipRadius - (float) Tip radius for this point

TipX - (float) X Position of virtual tip relative to tip centre

TipY - (float) Y Position of virtual tip relative to tip centre

TNV - (long) Tool nose vector number for post (FANUC numbers)

TurnThreadData Object

[Link] 2026-03-29
Objects - Objects Page 359 of 375

An object used to define the properties for a Thread operation. They should be set before
[Link] is called.

More:

TurnThreadData Properties

TurnThreadData Properties

AccelerationDistance - (float) Acceleration Distance

CutType - (AcamThreadCutType) acamThreadCutTypePLUNGE, acamThreadCutTypeFLANK or


acamThreadCutTypeZIGZAG

Direction - (AcamThreadDirection) acamThreadDirectionAS_LONGEST_LINE or


acamThreadDirectionFOLLOW_PROFILE

Hand - (AcamThreadHand) acamThreadHandRIGHT or acamThreadHandLEFT

InFeed - (AcamThreadInFeed) acamThreadInFeedVARIABLE_DEPTH or


acamThreadInFeedCONSTANT_DEPTH

LeadIn - (AcamThreadLead) acamThreadLeadHORIZONTAL, acamThreadLeadVERTICAL or


acamThreadLeadTHREADANGLE

LeadOut - (AcamThreadLead) acamThreadLeadHORIZONTAL, acamThreadLeadVERTICAL or


acamThreadLeadTHREADANGLE

NumberOfPasses - (long) Number of passes

NumberOfSpringPasses - (long) Number of spring passes

NumberOfStarts - (long) Number of starts

VersionInformation Object
An object storing version information for the Alphacam EXE or DLLs, introduced with V7.5.

The version number passed to InitAlphacamAddIn is frozen at 20070810. Add-in DLLs and VBA
projects should use the this object if they need to restrict the versions of Alphacam that they can run
with. First test that the Version is >= 20070810, then get the VersionInformation object using the
[Link] property. You can either restrict the add-in to work with a particular version by
testing the Major and Minor properties, currently 7 and 5 for version 7.5 or test Major * 1000 + Minor *
100 >= 7500. Then if necessary test the build number, which will always increment until the Major or
Minor numbers change.

[Link] 2026-03-29
Objects - Objects Page 360 of 375

Properties

Major - (long) Major version eg 7 for 7.5, 8 for 8.0

Minor - (long) Minor version eg 5 for 7.5, 0 for 8.0

Revision - (long) Revision number

Build - (long) Build number, incremented for each internal or released build

String - (String) [Link] as a string eg [Link]

ViewWindow Object
A ViewWindow object represents a window pane which contains a view onto the Alphacam drawing,
not a Project Manager page.

Use [Link] to get the view windows as a Collection.

ViewWindow Properties

Tmat(i) - (double) Element of view transformation array (I = 0 to 11) (read-only)

QuickShading - (boolean) True if Quick Shading is on

View - (AcamView) Type of view eg acamViewISO

ViewPort(i) - (double ) Pixel coordinates of viewport for this window 0 = X1, 1 = Y1, 2 = X2, 3 = Y2
(read-only)

ViewWindowHandle - (Long) The window handle for this view window (read-only)

[Link]

Redraw the view

Syntax

[Link]

[Link]

Rotate the view about the X axis

[Link] 2026-03-29
Objects - Objects Page 361 of 375

Syntax

[Link] (Angle)

double Angle Angle in degrees to rotate about

[Link]

Rotate the view about the Y axis

Syntax

[Link] (Angle)

double Angle Angle in degrees to rotate about

[Link]

Rotate the view about the Z axis

Syntax

[Link] (Angle)

double Angle Angle in degrees to rotate about

[Link]

Set view direction for this window

Syntax

[Link] (X, Y, Z)

double X component of view vector

double Y component of view vector

double Z component of view vector

[Link]

[Link] 2026-03-29
Objects - Objects Page 362 of 375

Save the view perspective to the given Handle

Syntax

[Link] (Handle)

long Handle variable to save the view handle into

See example.

[Link]

Restores the view perspective from the given Handle

Syntax

[Link] (Handle)

long Handle variable containing the saved view handle

See example.

WireData Object
Machining data for a Wire operation, eg Z levels, feeds and technology

More:

WireData Properties

WireData Properties

Most of these properties have the same name as the text in the dialog boxes in the English version of
Alphacam, in the corresponding commands eg Cut Single Shape.

Attribute - See Attributes

AuxiliaryZ - (double) Auxiliary Z level

BiDirectional - (boolean) True for bi-directional cuts

ChordTolerance - (float) Chord tolerance for Cut4AxisShape

ControlPoints - (AcamWireControlPoints) type of contorl points to use for Cut4AxisShape,


acamWireControlPointsCONS_OR_POLYLINES = 1,

[Link] 2026-03-29
Objects - Objects Page 363 of 375

acamWireControlPointsMATCHING_ELEMENTS = 2, acamWireControlPointsNONE = 3

CutFeed - (float) Feed

CutNumberToCutTag - (short) Number of cut to cut the tag on if SupportTags = acamTagCUT_TAG.


Value is cut number, 1 to NumberOfCuts

Generator - (long) Generator(I) I = 1 to NumberOfCuts, Generator value for cut I

LeadInLength - (float) Length of Lead In

LeadOutLength - (float) Length of Lead Out

LoopRadius - (float) Radius of loop corners

MakeLeadInPerp - (boolean) True if start point is to be moved to make the lead-in perpendicular

McComp - (short) Machine compensation, acamCompTOOLCEN = 0, acamCompMC = 1,


acamCompBOTH = 2

NumberOfCuts - (short) Number of cuts

OffsetNumber - (long) OffsetNumber(I) I = 1 to NumberOfCuts, OffsetNumber for cut I

OpNo - (short) Operation Number

ProgramingZ - (double) Programming Z level

StartInMaterial - (boolean) True to start in material. SetStartCircle must be used to set the circle to start
in

Stock - (float) Stock(I) I = 1 to NumberOfCuts, Stock amount for cut I

SupportTags - (short) Type of Support Tag, if TagLength not zero. acamTagBREAK_GEO = 0,


acamTagCUT_TAG = 1, acamTagLEAVE_TAG = 2

TagLength - (double) Length of tag, 0 for no tag

WireAngle - (double) Angle of Wire, CCW angle is positive looking along the direction of cut

WireDiameter - (double) Diameter of Wire

XYCorners - (short) Type of corners. acamCornersROUND = 0, acamCornersSTRAIGHT = 1,


acamCornersLOOP = 2

WireData.Cut2AxisShape

Do 2-axis cuts on currently selected geometries using properties set for this WireData object.

Syntax

[Link] 2026-03-29
Objects - Objects Page 364 of 375

wd.Cut2AxisShape

Example:

Sub CutShape

Dim drw As Drawing

Set drw = [Link]

Dim width As Double

Dim height As Double

width = 100

height = 50

Dim geo As Path

[Link]

Set geo = [Link] (-width / 2, 0, width / 2, height)

[Link] 0,0

[Link] = True

[Link] = acamOUTSIDE

Dim mc As WireData

Set mc = [Link]

[Link] = acamCornersSTRAIGHT

[Link] = acamCompMC

[Link] = 0

[Link] = 15

[Link] = 10

[Link] = .5

[Link] = 1

[Link] = 200

[Link] 2026-03-29
Objects - Objects Page 365 of 375

[Link] = 10

[Link] = 5

[Link] = 4

[Link] = acamTagLEAVE_TAG

mc.Cut2AxisShape

[Link] = true

End Sub

WireData.Cut4AxisShape

Do 4-axis cuts using properties set for this WireData object.

Syntax

wd.Cut4AxisShape

Example:

Sub Cut4AxisShape

Dim drw As Drawing

Set drw = [Link]

Dim width As Double, height As Double, corner_rad As Double

width = 100

height = 50

corner_rad = 8

Dim Geo1 As Path, Geo2 As Path

Dim p1 As Path, p2 As Path

[Link]

Set Geo1 = [Link](100, 0, 0)

[Link] -20, 15

[Link] = acamINSIDE

[Link] 2026-03-29
Objects - Objects Page 366 of 375

[Link] = True

Set Geo2 = [Link](5, 5, 25, 25)

[Link] -20, 15

[Link] = acamOUTSIDE

[Link] = True

Dim mc As WireData

Set mc = [Link]

[Link] Geo1

[Link] Geo2

[Link] = acamCornersROUND

[Link] = acamCompTOOLCEN

[Link] = 0

[Link] = 25

[Link] = 0.5

[Link] = 3

[Link](1) = 10

[Link](2) = 20

[Link](3) = 30

[Link](1) = 2.5

[Link](2) = 0.5

[Link](3) = 0

[Link](1) = 77

[Link](2) = 88

[Link](3) = 34

[Link] = 200

[Link] 2026-03-29
Objects - Objects Page 367 of 375

[Link] = 10

[Link] = 5

'[Link] = true

[Link] = 4

[Link] = 1

[Link] = 3

Dim circle1 As Path

Set circle1 = [Link](5, -20, 15)

[Link] = True

[Link] circle1

[Link] [Link]

[Link] = acamWireControlPointsNONE

'DrawConnectingLines Geo1, Geo2

mc.Cut4AxisShape

End Sub

[Link]

Set the auxiliary geometry for Cut4AxisShape.

Syntax

[Link] (Geo)

Path Geo, a Path object

[Link]

Set the programming geometry for Cut4AxisShape.

Syntax

[Link] 2026-03-29
Objects - Objects Page 368 of 375

[Link] (Geo)

Path Geo, a Path object

[Link]

Set the start circle if StartInMaterial is True.

Syntax

[Link] (Geo)

Path Geo geometry of circle, as a Path object

Remarks

There can be only one start circle for each call to Cut2AxisShape so if multiple geometries are to be cut
they will have to use the same start circle. If this is not satisfactory call SetStartCircle and
Cut2AxisShape once for each geometry, eg:

[Link] = True

[Link] circle1

wd.Cut2AxisShape

[Link] = True

[Link] circle2

wd.Cut2AxisShape

[Link]

Set the start element if StartInMaterial and MakeLeadInPerp are True.

Syntax

[Link] (Elem)

Element Elem line or arc, as an Element object

WorkPlane Object
A work plane defines a local coordinate system. The array Tmat(I), I = 0 to 11 gives the transformation
matrix from local to global coordinates.

[Link] 2026-03-29
Objects - Objects Page 369 of 375

XGlobal = [Link](0) * X + [Link](1) * Y + [Link](2) * Z + [Link](3)

YGlobal = [Link](4) * X + [Link](5) * Y + [Link](6) * Z + [Link](7)

ZGlobal = [Link](8) * X + [Link](9) * Y + [Link](10) * Z + [Link](11)

Replace Tmat with Imat to transform from global to local.

Use [Link] to create a new work plane or to find an existing one.

Use [Link] to get the work planes as a Collection.

More:

WorkPlane Properties

WorkPlane Properties

Attribute See Attributes

Code - (long) Offset Number

Drawing - (Drawing) The drawing for this work plane, if it is in the main drawing then the existing
drawing object will be returned otherwise a temporary one will be created (read-only)

Flat - (boolean) True if work plane is for a flat panel (read-only)

Geometries - (Paths) The geometries on this work plane, as a Paths Collection (read-only)

Id - (long) ID number, unique for each work plane (read-only)

Imat(i) - (double) Element of inverse transformation array (I = 0 to 11) (read-only)

ImatFlat(i) - (double) Element of inverse transformation array for flat panel(I = 0 to 11) (read-only)

IsIdentity - (boolean) True if work plane axes and origin are the same as global (read-only)

IsGlobal - (boolean) True if work plane axes (but not origin) are the same as global (read-only)

Name - (String) Name of work plane

PartRad - (double) Radius of cylinder if this is an unfolded work plane (read-only)

PartZ1 - (double) Start Z coordinate of cylinder if this is an unfolded work plane (read-only)

PartZ2 - (double) End Z coordinate of cylinder if this is an unfolded work plane (read-only)

Splines - (Splines) The splines on this work plane, as a Splines Collection (read-only)

Text - (Texts) The text on this work plane, as a Texts Collection (read-only)

[Link] 2026-03-29
Objects - Objects Page 370 of 375

Tmat(i) - (double) Element of transformation array (I = 0 to 11) (read-only)

TmatFlat(i) - (double) Element of transformation array for flat panel (I = 0 to 11) (read-only)

UnFolded - (boolean) True if this is an unfolded work plane (read-only)

[Link]

If the work plane is an unfolded work plane (property UnFolded = True), convert local coordinates to
global.

Syntax

[Link] (XLocal, YLocal, ZLocal, XGlobal, YGlobal, ZGlobal)

double XLocal X local coordinate

double YLocal Y local coordinate

double ZLocal Z local coordinate

double XGlobal X global coordinate

double YGlobal Y global coordinate

double ZGlobal Z global coordinate

[Link]

Create a new work plane parallel to this one.

Syntax

[Link] (dist)

double dist Distance to offset work plane by

[Return] WorkPlane Pointer to WorkPlane Dispatch object for new work plane

[Link]

Find the intersection of a 3D line with this work plane.

Syntax

[Link] (X1, Y1, Z1, X2, Y2, Z2, XP, YP, ZP)

double X1 X Global coordinate of a point on the line

[Link] 2026-03-29
Objects - Objects Page 371 of 375

double Y1 Y…

double Z1 Z…

double X2 X Global coordinate of any other point on the line

double Y2 Y…

double Z2 Z…

double* XP Returned X Global coordinate of intersection point (If found)

double* YP Y…

double* ZP Z…

[Return] boolean True if OK, False if unable to find the intersection point.

Remarks

Note that the returned parameters (XP, YP and ZP) must be declared as double.

Example:

Dim drw As Drawing

Set drw = [Link]

Dim wp As WorkPlane

Set wp = [Link]

If wp Is Nothing Then

MsgBox "There must be a Current Work Plane"

end

End If

Dim p As Path

Set p = [Link]("Select Geometry to find Intersection with WP")

If Not (p Is Nothing) Then

Dim e1 As Element

Set e1 = [Link]

[Link] 2026-03-29
Objects - Objects Page 372 of 375

Dim xp As Double, yp As Double, zp As Double

ok = [Link] ([Link], [Link], [Link], [Link], [Link], [Link], xp, yp,


zp)

If ok Then

' Draw a vertical 3D polyline at the intersection point

Dim p3 As PolyLine

Set p3 = drw.Create3DPolyline(xp, yp, zp)

[Link] xp, yp, zp + 10

[Link]

Else

MsgBox "Unable to find intersection point"

End If

End If

[Link]

Find the intersection of the line elements in the given path with this work plane. Return number of
intersections found.

Syntax

[Link] (Path, XP, YP, ZP)

Path Path The path to intersect with - only line elements will be used

Variant XP Returned X Global coordinate of intersection point (If found)

Variant YP Y…

Variant ZP Z…

[Return] long, number of intersection points found

Remarks

Note that the returned parameters (XP, YP and ZP) must be declared as Variant. They are arrays, first
element at 0.

Example:

[Link] 2026-03-29
Objects - Objects Page 373 of 375

[Link]

Dim Drw As Drawing

Set Drw = [Link]

Dim WP As WorkPlane

Set WP = [Link](0, 0, 0, 0, 1, 0, 0, 0, 1)

Dim P As Path

Set P = [Link](0, 0, 10, 10)

Dim X, Y, Z ' default is Variant

Dim N As Long

N = [Link](P, X, Y, Z)

If N = 2 Then

Dim PL As PolyLine

Set PL = Drw.Create3DPolyline(X(0), Y(0), Z(0))

[Link] X(1), Y(1), Z(1)

[Link]

End If

[Link]

Do what the command "Make Local Axis Horizontal" does.

Syntax

[Link] (LocalX, ClockwiseTilt)

Bool LocalX True to make the local X axis horizontal, false for Y

Bool ClockwiseTilt True for clockwise tilt

[Link] 2026-03-29
Objects - Objects Page 374 of 375

[Link]

As MakeLocalAxisHorizontal but allow extra types in typeAcamPostLocalXorYAxis (5 and 6)

Do what the command "Make Local Axis Horizontal" does.

Syntax

[Link] (Type)

AcamPostLocalXorYAxis Type Type to convert to

[Link]

Move the work plane by a relative amount

Syntax

[Link] (X, Y, Z)

double X X amount to move by

double Y Y amount to move by

double Z Z amount to move by

[Link]

Set local origin for this work plane.

Syntax

[Link] (XG, YG, ZG)

double XG Global X coordinate of new origin

double YG Global Y coordinate of new origin

double ZG Global Z coordinate of new origin

Remarks

XG, YG, ZG must be the global coordinates of a point on the work plane.

[Link]

Set the transformation matrix for this work plane.

[Link] 2026-03-29
Objects - Objects Page 375 of 375

Syntax

[Link] (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

double T0 - T11 Components of the matrix

[Link] 2026-03-29

You might also like