Alphacam API Reference - Objects
Alphacam API Reference - Objects
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:
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:
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:
[Link] 2026-03-29
Objects - Objects Page 2 of 375
Dim mc As MillData
Set mc = [Link]
In Delphi, import the Type Library using Project | Import Type Library.
var
disp: IDispatch;
acam: IAlphaCamApp;
begin
In a Delphi DLL it is passed as the first parameter to the routine called from Alphacam, eg
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
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.
PolyLine A 3D polyline.
Geo2D An object used to create a 2D Geometry using individual lines and arcs.
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..
[Link] 2026-03-29
Objects - Objects Page 4 of 375
Surface A surface.
Operation An operation.
[Link] 2026-03-29
Objects - Objects Page 5 of 375
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
[Link]
Syntax
[Link](Object)
[Link]
Syntax
[Link](Object)
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)
[Link] 2026-03-29
Objects - Objects Page 8 of 375
ChangeNumber - (Long) The number of changes made to the drawing, NOT including changes to the
display eg Zoom. (read-only)
Example
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.
InAParametricMacro - (boolean) True if currently running a Parametric Macro (not a VBA macro)
(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
PreviewFlag - (Bool) True if Previews are shown and saved with Alphacam drawings
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)
Visible - (boolean) True if Alphacam should be visible on the screen, False to hide Alphacam
[Link]
Syntax
[Link]
[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)
[Link]
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 10 of 375
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]
[Link]
Create object representing Lead-In/Out data for use with a Machining Style or MillData.
Syntax
[Link]
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]
[Link]
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 11 of 375
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
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]
End Sub
[Link]
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.
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]
[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]
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]
[Link]
Syntax
[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
[Return] String FullName Returned full path name of the selected file
[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]
Get the number of Attributes used in the current post, defined in $3000.
Syntax
[Link]
[Link]
Get the name of an Attribute used in the current post, defined in $3000.
Syntax
[Link] (Index)
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)
[Link]
Syntax
[Link] (Name)
[Link]
Input Nc file.
Syntax
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)
[Link]
[Link]
Syntax
Remarks
See CadInputSettings.
[Link]
Syntax
Remarks
See CadInputSettings.
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 17 of 375
[Link] (Name)
[Link]
Syntax
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]
Syntax
Remarks
For example, if the "Parasolid Input" Add-In is loaded (Utils | Add-Ins | Parasolid Input), the following
line will read a Parasolid file:
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]
Syntax
[Link] (Name)
[Link]
Syntax
Remarks
acamIgesSTD (= 0) Standard
See CadInputSettings.
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 19 of 375
[Link]
Syntax
Remarks
acamStepSURFACES (= 0) Surfaces
[Link]
Syntax
[Link]
Open Alphacam drawing file into a temporary drawing, which will not be displayed.
Syntax
[Link] (Name)
[Link] 2026-03-29
Objects - Objects Page 20 of 375
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.
End Sub
[Link]
Open DXF or DWG file into a temporary drawing, which will not be displayed.
Syntax
[Link] (Name)
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.
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)
Example
[Link]
End If
[Link] 2026-03-29
Objects - Objects Page 22 of 375
End If
[Link]
Syntax
[Link] (Name)
[Link]
Syntax
[Link] (Name)
[Link]
Syntax
[Link]
[Link]
Syntax
[Link] (MacroName, [Parm1], [Parm2], [Parm3], [Parm4], [Parm5], [Parm6], [Parm7], [Parm8])
[Link] 2026-03-29
Objects - Objects Page 23 of 375
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.
[Link]
Syntax
[Link]
[Link]
Syntax
[Link] (MacroName)
[Link]
Syntax
[Link] (Name)
[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)
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.
End Function
[Link] "Post1"
End Sub
[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
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.
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
String Name Full path name of tool file to open, "$USER" to let user select it from normal dialog box
[Link]
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 26 of 375
Syntax
Example
[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)
Remarks
[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.
[Link] "Rectangles"
[Link] "Circles"
[Link]
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
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
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
CircleProperties Methods
None.
CircleProperties Example
The example will loop for all the geometries in the drawing and display the diameter of each circle.
Dim p As Path
Dim c As CircleProperties
Set c = [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
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)
MaxX, MaxY, MaxZ, MinX, MinY, MinZ - (double) Extents of this clamp (read-only)
Parent - (Clamp) This clamp's parent, will be empty if clamp does not have one (read-only)
[Link]
Associate a geometry with this clamp. The geometry will move with the clamp.
Syntax
[Link] (Geo)
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 31 of 375
See also
Clamp.Move2
Clamp.Move2
Syntax
Example
Cl.Move2 , , 100
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:
[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
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
Text - (String) If not empty, text to use for dimension instead of measured value, equivalent to Text =
Manual in General page
[Link] 2026-03-29
Objects - Objects Page 33 of 375
[Link]
Syntax
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)
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
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)
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]
Syntax
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:
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]
Syntax
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)
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]
Syntax
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
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
[Link]
[Link] 2026-03-29
Objects - Objects Page 39 of 375
Syntax
[Link] (Path)
Remarks
An arrow will be drawn at the first point, and lines to the remaining points.
Example:
End Sub
[Link]
Create a horizontal dimension for the maximum and minimum X coordinates of a collection of
geometries.
Syntax
[Link] 2026-03-29
Objects - Objects Page 40 of 375
The example asks the user to select some geometries and draws a Max XX dimension:
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
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
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]
Syntax
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
End Sub
[Link]
Syntax
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)
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]
Syntax
End Sub
[Link]
[Link] 2026-03-29
Objects - Objects Page 44 of 375
Syntax
Remarks
Example:
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]
Syntax
[Link] 2026-03-29
Objects - Objects Page 45 of 375
Remarks
Example:
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]
Syntax
[Link] (X, Y)
[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
BackgroundColor - (AcamColor) Background colour for Alphacam window, as a standard colour. Use
Redraw method to see the change
ColorRGB - (OLE_COLOR) RGB Colour used for various items in Alphacam, as in File | Configure |
Colours
syntax ColorRGB(AcamColorIndex i)
DrawingColor - (AcamColor) Colour for drawing with DrawTo, the 16 standard colours
Font - (String) Font name for text. Must start with A for Alphacam font eg AStencil, or T for TrueType
font eg TArial
[Link] 2026-03-29
Objects - Objects Page 47 of 375
Id - (int) number identifying this drawing, 0 = the main drawing, > 0 = temporary drawings (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)
OperationsForTurret - (Operations) Collection of the operations in the drawing, for a given Lathe Turret,
specified by Turret and Station parameters (read-only)
Path - (String) Path of drawing file, no name or extension or trailing "\" (read-only)
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
SolidFacets - (Variant) array of facets for the objects of given type in the drawing, formatted as for
surfaces (read-only)
STLFacets - (Variant) array of facets for the STL objects in the drawing, formatted as for surfaces (read-
only)
[Link] 2026-03-29
Objects - Objects Page 49 of 375
Drawing.AddBsplineCurve2
Create a B-Spline curve given the curve data: knots, vertices etc.
Syntax
drw.AddBsplineCurve2 V
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.
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]
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
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[1].ival[1] = T order
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:
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:
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.
[Link] 2026-03-29
Objects - Objects Page 52 of 375
P[n+1].ival[1] = T order
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]
[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] 2026-03-29
Objects - Objects Page 53 of 375
[Link]
Syntax
[Link]
[Link]
Syntax
[Link]
[Link]
Syntax
Remarks
[Link] 2026-03-29
Objects - Objects Page 54 of 375
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)
[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
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)
[Link] 20, 0, 0
[Link]
[Link]
Create an empty AlphacamObjects Collection. The Add method may then be used to add
AlphacamObjects objects to it.
Syntax
[Link]
[Link]
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 56 of 375
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
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
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]
Syntax
[Link]
[Link]
Create an ellipse and add to geometry database. A Path object will be returned.
Syntax
[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]
[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].
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]
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)
Remarks
APS GEOMETRY
CONSTRUCTION
TOOLPATHS
DIMENSIONS
SPLINES
SURFACES
For example:
[Link]("APS GEOMETRY")
[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]
Example:
[Link] 2026-03-29
Objects - Objects Page 60 of 375
[Link] = False
[Link] = 850
[Link] mat
[Link]
Syntax
[Link] (FileName)
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]
[Link]
Create a polygon and add to geometry database. A Path object will be returned.
Syntax
[Link] 2026-03-29
Objects - Objects Page 61 of 375
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
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]
Drawing.CreateSurfaceCoons3
[Link] 2026-03-29
Objects - Objects Page 62 of 375
Syntax
Drawing.CreateSurfaceCoons4
Syntax
[Link]
Create an extruded surface for each line or arc in the given geometry.
Syntax
[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]
Syntax
[Link] (Boundary)
Remarks
This method uses a different algorithm to CreateFlatSurface2 so the results for a single surface may not
be the same.
Drawing.CreateSurfaceFlat2
Syntax
[Link] 2026-03-29
Objects - Objects Page 64 of 375
drw.CreateSurfaceFlat2 (Boundaries)
Remarks
This method uses a different algorithm to CreateFlatSurface so the results for a single surface may not
be the same.
[Link]
Syntax
[Link] (X1, Y1, Z1, X2, Y2, Z2, StartAngle, EndAngle, CrossSection,
Tolerance)
double X1
double Z1
double X2
double Z2
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 65 of 375
Drawing.CreateSurfaceSwept2
Syntax
Drawing.CreateSurfaceSwept3
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 66 of 375
Syntax
[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)
[Link] 2026-03-29
Objects - Objects Page 67 of 375
Remarks
[Link] = "AStencil"
[Link] = "TArial"
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)
Remarks
The example creates some text and then changes the style of some of it:
[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
Remarks
Example:
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]
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
Remarks
Example:
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
[Link]
End Sub
[Link]
Create an empty Text Collection. The Add method may then be used to add Text objects to it.
Syntax
[Link]
[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)
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
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 wp As WorkPlane
[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 wp As WorkPlane
Dim p As Path
[Link] wp
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)
[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
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]
Remarks
If the work plane already exists this will raise an error. Use [Link] first to
see if it exists.
[Link] 2026-03-29
Objects - Objects Page 73 of 375
[Link]
Syntax
[Link]
Remarks
[Link]
Syntax
[Link] (X, Y, Z)
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)
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
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)
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.
[Link]
[Link] 2026-03-29
Objects - Objects Page 75 of 375
Syntax
[Link] (HatchColor)
[Link]
Syntax
[Link] (HatchColor)
[Link]
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] 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]
Get the first geometry in the drawing. An object of type Path will be returned.
Syntax
[Link]
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]
[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]
See Also
[Link]
[Link]
[Link]
[Link]
Syntax
[Link]
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]
See Also
[Link]
[Link]
[Link]
Get the last tool path in the drawing. An object of type Path will be returned.
Syntax
[Link]
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]
The example gets the active user layer and displays the name, or "No active user layer" if there is no
active layer.
[Link] 2026-03-29
Objects - Objects Page 79 of 375
Else
End If
[Link]
Get the number of layers (Alphacam and User layers) in the drawing.
Syntax
[Link]
See Also
[Link]
[Link]
[Link]
Example
[Link]
Syntax
[Link]
[Link]
Get the current material geometry as a Path object and top and bottom Z levels.
Syntax
[Link] 2026-03-29
Objects - Objects Page 80 of 375
[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]
Remarks
Example:
Dim p As Path
[Link] 2026-03-29
Objects - Objects Page 81 of 375
x = [Link]
y = [Link]
[Link]
Get X Local coordinate of point that was picked by the user in the last call to
[Link].
Syntax
[Link]
[Link]
Get Y Local coordinate of point that was picked by the user in the last call to
[Link].
Syntax
[Link]
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
Remarks
[Link]
Syntax
[Link]
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]
The example gets the current work plane and displays the name, or "Flat Land" if there is no current
work plane.
Dim wp As WorkPlane
Set wp = [Link]
If wp is Nothing then
[Link] 2026-03-29
Objects - Objects Page 83 of 375
Else
End If
[Link]
Syntax
Example
End Sub
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 84 of 375
Example
End Sub
[Link]
Syntax
[Link] (Name, X, Y, 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
Remarks
If no tool paths are selected the joined paths will be geometries, else they will be tool paths.
Example:
[Link]
Syntax
[Link]
[Link]
Mirror selected geometries, tool paths and text in given work plane.
Syntax
[Link]
Syntax
[Link](X, Y, Z)
[Link] 2026-03-29
Objects - Objects Page 86 of 375
[Link]
Syntax
[Link] (X, Y, Z)
[Link]
Syntax
[Link] (Ordered)
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:
Dim I As Integer
Dim PS1 As Paths, PS2 As Paths
Set PS1 = [Link]
Set PS2 = [Link]
[Link] PS2
End Sub
This example will order the paths on the second nested sheet on the Y coordinate:
[Link] 2026-03-29
Objects - Objects Page 87 of 375
Dim NI As NestInformation
Set NI = [Link]
OrderOnY [Link](2).Paths
End Sub
End Sub
[Link]
[Link] 2026-03-29
Objects - Objects Page 88 of 375
Syntax
[Link] (FirstPath)
The example will order the geometries starting with the last one:
[Link] True
[Link] P
End Sub
[Link]
Syntax
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 OnlyPlanesWithToolPaths True to order only work planes containing tool paths
Remarks
[Link] 2026-03-29
Objects - Objects Page 89 of 375
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
[Link]
Output the NC code for the current drawing to disk or machine or both.
Syntax
String Name Complete path name to save code to (unless Machine only)
Remarks
[Link] 2026-03-29
Objects - Objects Page 90 of 375
acamOutNcBOTH = 2 to both
[Link]
Syntax
[Link]
Syntax
Remarks
The geometries to be projected and the surfaces should be selected by setting the Selected property
before calling this routine.
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 91 of 375
Remarks
The geometries to be projected should be selected by setting the Selected property before calling this
routine.
[Link]
Syntax
Remarks
The tool paths to be projected and the surfaces should be selected by setting the Selected property before
calling this routine.
Drawing.ProjectGeometriesToSurfaces2
Syntax
[Link] 2026-03-29
Objects - Objects Page 92 of 375
Remarks
The geometries to be projected and the surfaces should be selected by setting the Selected property
before calling this routine.
[Link]
Syntax
Remarks
The tool paths to be projected should be selected by setting the Selected property before calling this
routine.
[Link]
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 93 of 375
[Link]
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]
Syntax
[Link]
[Link]
Syntax
[Link]
[Link]
Syntax
double X1
double Z1
double X2
[Link] 2026-03-29
Objects - Objects Page 94 of 375
double Z2
[Link]
Syntax
[Link](FileName)
[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]
Syntax
[Link] (Name)
[Link]
Save the current drawing to given file name, compatible with the specified version.
Syntax
AcamSaveAsVersion Version
Remarks
[Link] 2026-03-29
Objects - Objects Page 95 of 375
[Link]
Save a DXF File for the current drawing to given file name.
Syntax
[Link]
Save an Enhanced Meta File for the current drawing to given file name.
Syntax
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]
[Link] 2026-03-29
Objects - Objects Page 96 of 375
Save an IGES File for the current drawing to given file name.
Syntax
[Link]
Save an STL File for specified items in the current drawing to given file name.
Syntax
[Link]
Save a Windows Meta File for the current drawing to given file name.
Syntax
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
[Link]
Produce a section of all the geometry (surfaces, splines, geometries) in the drawing, using a work plane.
Syntax
[Link]
Produce sections of the current STL model, parallel to the current work plane.
Syntax
[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)
[Link] 2026-03-29
Objects - Objects Page 98 of 375
[Link]
Syntax
[Link] (Name)
The example will make the material "Cast Iron" in the material data file the current material.
[Link]
Set the selected property for all geometries, and redraw them.
Syntax
[Link] (Selected)
[Link]
Syntax
[Link] (Layer)
[Link]
Syntax
[Link] (Material)
[Link] 2026-03-29
Objects - Objects Page 99 of 375
Remarks
[Link]
Set the snap mode to be used for the next user-input command.
Syntax
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
Syntax
[Link] (ZShift)
Remarks
[Link]
Set the selected property for all tool paths, and redraw them.
Syntax
[Link] (Selected)
[Link]
[Link] 2026-03-29
Objects - Objects Page 100 of 375
Syntax
[Link] (Type)
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]
Syntax
[Link] wp
Example 1, create a work plane and make it the current work plane:
Dim wp As WorkPlane
[Link] wp
Example 2, get the work plane for the last geometry and make it the current work plane:
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
[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)
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)
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
long YPixelTop
long XPixelRight
long YPixelBottom
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.
See Addin1-V75 in the ExampleFiles\API\VisualCPP folder on the Alphacam DVD for an example.
[Link]
Syntax
[Link]
Remarks
See StartDrawingInDC.
[Link]
[Link] 2026-03-29
Objects - Objects Page 103 of 375
Syntax
[Link]
[Link]
Syntax
drw.SurfaceFromGeoSections2 (Tolerance)
[Link]
Syntax
[Link]
Drawing.UserGet2DPoint
Syntax
drw.UserGet2DPoint(Prompt, X, Y)
Drawing.UserGet2DPointWithCallBack
Ask the user for a 2D point, calling a user-defined function as the pointer moves.
Syntax
[Link] 2026-03-29
Objects - Objects Page 104 of 375
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.
Private X1 As Double
Private Y1 As Double
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
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
[Link] 2026-03-29
Objects - Objects Page 105 of 375
AFX_MANAGE_STATE(AfxGetStaticModuleState());
IDrawingPtr pDrw(pApp->ActiveDrawing);
pDrw->DrawTo(X, Y, 0.);
AFX_MANAGE_STATE(AfxGetStaticModuleState());
IDrawingPtr pDrw(pApp->ActiveDrawing);
double x = 0, y =0;
if(ret == acamUserSELECT)
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
Remarks
The Type parameter determines what is drawn while the mouse pointer moves. It can be:
AcamRubberBandLINE
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
AcamRubberBandARC_3POINTS
AcamRubberBandARC_CENTER
[Link] 2026-03-29
Objects - Objects Page 107 of 375
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.
End Sub
Drawing.UserGet3DPoint
Syntax
drw.UserGet3DPoint(Prompt, X, Y, Z)
[Link] 2026-03-29
Objects - Objects Page 108 of 375
Drawing.UserGet3DPointWithCallBack
Ask the user for a 3D point, calling a user-defined function as the pointer moves.
Syntax
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.
Private X1 As Double
Private Y1 As Double
Private Z1 As Double
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
End Sub
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
AFX_MANAGE_STATE(AfxGetStaticModuleState());
IDrawingPtr pDrw(pApp->ActiveDrawing);
pDrw->DrawTo(X, Y, Z);
AFX_MANAGE_STATE(AfxGetStaticModuleState());
IDrawingPtr pDrw(pApp->ActiveDrawing);
[Link] 2026-03-29
Objects - Objects Page 110 of 375
double x = 0, y = 0, z = 0;
if(ret == acamUserSELECT)
// Use x, y, z
[Link]
Syntax
[Link](Prompt, Flags)
Drawing.UserSelectMultiAddinObjects2
Syntax
String AddinFileName File name (no path or extension) or complete path name of add-in
[Link]
[Link] 2026-03-29
Objects - Objects Page 111 of 375
Syntax
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.
[Link]
Ask the user to select multiple geometries, and return a Paths Collection.
Syntax
[Link](Prompt, Flags)
[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:
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.
[Link] 2026-03-29
Objects - Objects Page 113 of 375
[Link] acamToolSideCUT
[Link]
Next IPass
End Sub
Drawing.UserSelectMultiGeosCollection2
Ask the user to select multiple geometries, and return a Paths Collection.
Syntax
drw.UserSelectMultiGeosCollection2(Prompt, Flags)
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] 2026-03-29
Objects - Objects Page 114 of 375
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]
Syntax
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]
[Link] 2026-03-29
Objects - Objects Page 115 of 375
Syntax
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]
Syntax
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.
[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]
Syntax
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.
[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)
[Link]
Syntax
[Link] (Prompt)
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]
Syntax
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
[Link]
Syntax
[Link] (Prompt)
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.
Example:
Dim p As Path
[Link] = True
[Link]
Syntax
[Link] (Prompt)
[Link] 2026-03-29
Objects - Objects Page 119 of 375
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.
VBA Example:
Dim O As Object
Dim P As Path
Dim S As Spline
Set P = O
Set S = O
On Error GoTo 0
End If
MsgBox "Spline"
End If
C++ Example:
[Link] 2026-03-29
Objects - Objects Page 120 of 375
if(pPath != NULL)
// Geometry Selected
pPath->MoveL(1000., 1000);
// Spline Selected
else
// Nothing selected
[Link]
Syntax
[Link] (Prompt)
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.
[Link] 2026-03-29
Objects - Objects Page 121 of 375
[Link]
Syntax
[Link] (Prompt)
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]
Syntax
[Link] (Prompt)
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
Syntax
[Link] (Prompt)
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.
Example:
Dim p As Path
[Link] = True
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 123 of 375
Remarks
The geometries to be wrapped and the surfaces should be selected by setting the Selected property
before calling this routine.
[Link]
Syntax
Remarks
The tool paths to be wrapped and the surfaces should be selected by setting the Selected property before
calling this routine.
[Link]
Syntax
[Link]
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 124 of 375
[Link]
Syntax
[Link]
Syntax
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
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:
More:
DrawingOptions Properties
DrawingOptions Properties
DrawToolPathRapidsInWhite - (boolean) True to show tool path rapids in white, False to show in tool
colour
ShowMaterialCut - (boolean) True to show the material cut by the tool paths
Element Object
Element Properties
Element Properties
[Link] 2026-03-29
Objects - Objects Page 126 of 375
LeadExtra - (boolean) True if this is an extra lead-in/out line when multiple-lines used for lead-in or out
(read-write)
[Link] 2026-03-29
Objects - Objects Page 127 of 375
SawAngle - (double) Angle of Saw for this Geometry element when [Link] next used. (read-
write)
[Link]
Syntax
[Link] (Element2)
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:
End Sub
[Link]
Syntax
[Link] (X, Y)
[Return] Element New element representing the section after the break point
[Link] 2026-03-29
Objects - Objects Page 129 of 375
[Link]
Syntax
[Link] 0, 20
[Link] 40, 20
[Link] 40, 0
Set p1 = [Link]
Set e1 = [Link]
Set e2 = [Link]
[Link]
[Link] 2026-03-29
Objects - Objects Page 130 of 375
Syntax
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.
[Link]
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 131 of 375
Syntax
[Link]
Syntax
[Link]
[Link]
Syntax
[Link]
[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] 2026-03-29
Objects - Objects Page 132 of 375
Remarks
(X1, Y1) are only valid if the return value is > 0. (X2, Y2) are only valid if the return value is 2.
The example draws 2 circles and draws a line between the intersection points.
Set e1 = [Link]
Set e2 = [Link]
If n = 2 Then
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
Remarks
(X1, Y1) are only valid if the return value is > 0. (X2, Y2) are only valid if the return value is 2.
The example draws 2 lines and draws a circle at the imaginary intersection point.
Set e1 = [Link]
Set e2 = [Link]
If n = 1 Then
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)
[Link]
Syntax
[Link] (Fraction, X, Y, Z)
Remarks
[Link] (0.5, X, Y, Z)
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 135 of 375
[Link] (Fraction, X, Y, Z)
Remarks
[Link] (0.5, X, Y, Z)
[Link]
Syntax
[Link](Type)
[Link]
Syntax
[Link] (X, Y, Z)
Remarks
[Link] 2026-03-29
Objects - Objects Page 136 of 375
[Link]
Syntax
[Link] (X, Y, Z)
Remarks
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:
[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]
[Link] 2026-03-29
Objects - Objects Page 137 of 375
Syntax
[Link]
Syntax
[Link]
Add a turn based on the first turn to close and finish the geometry.
Syntax
[Link]
[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])
[Link] 2026-03-29
Objects - Objects Page 138 of 375
[Link]
Syntax
[Link]
Syntax
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]
Syntax
[Link] 2026-03-29
Objects - Objects Page 139 of 375
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]
Syntax
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
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)
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]
Syntax
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.
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 142 of 375
[Link] (Function)
Remarks
This would normally be used to add a command that can be called by [Link].
[Link]
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
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:
[Link] 2026-03-29
Objects - Objects Page 143 of 375
[Link] 2026-03-29
Objects - Objects Page 144 of 375
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 menu item called Name to a new menu called Extras, which calls the function MyName.
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
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:
Function OnUpdateCircles()
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
Syntax
String MenuName Name for new menu if Location = acamMenuNEW, else ""
[Link] 2026-03-29
Objects - Objects Page 146 of 375
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.
Frame.AddMenuItem4
Syntax
Boolean After True to add new item after existing item, False for before.
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]
Syntax
[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]
Syntax
[Link] (Text)
[Link]
Call function in Events module in VBA projects and exported by add-in DLLs.
Syntax
[Link] (FunctionName)
[Link]
Syntax
[Link]
[Link]
Syntax
[Link]
[Link]
[Link] 2026-03-29
Objects - Objects Page 148 of 375
Syntax
[Link] (Name)
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)
Example
Dim X As Double
X = [Link]("atan2(1,3)")
MsgBox "Atan(1/3) = " & X, vbInformation
Remarks
[Link]
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]
Syntax
[Link] (Type)
[Link]
Get a floating point number using a dialog box, allowing expression evaluation, and rejecting invalid
values.
Syntax
Float Value On input, the default value, on return, the entered value
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] 2026-03-29
Objects - Objects Page 150 of 375
Long Value On input, the default value, on return, the entered value
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)
[Link]
Syntax
[Link] (ID)
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] 2026-03-29
Objects - Objects Page 151 of 375
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:
$10
Select Tool
Tool Library
S$ = [Link]("[Link]", 10, 1)
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)
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
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:
[Link]
Register a function in this add-in which can import a file of a specified type.
Syntax
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:
Example (VBA)
In InitAlphacamAddin:
[Link] 2026-03-29
Objects - Objects Page 153 of 375
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
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:
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)
[Link]
Syntax
[Link] (ID)
[Link]
Remove a page from the project bar. Only pages added by this addin may be removed.
Syntax
[Link] (Hwnd)
[Link] 2026-03-29
Objects - Objects Page 155 of 375
Remarks
See AddProjectBarPage.
[Link]
Syntax
[Link] (Text)
See [Link].
[Link]
Syntax
[Link] (ID)
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)
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 156 of 375
Example
Dim F As Frame
Set F = [Link]
[Link]
[Link] "A", 10
[Link] "B", 25
MsgBox [Link]("A+B")
[Link]
Syntax
[Link] Text
Remarks
[Link]
Syntax
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:
.. 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)
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)
[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
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
[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)
[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
Syntax
[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]
Finish 2D geometry.
Syntax
[Link]
[Link]
Syntax
[Link]
[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]
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.
Properties
ActualFileName - (String) The file containing the image, which may be temporary, eg if the bitmap is
stored in the Alphacam drawing file
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
[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)
[Link] 2026-03-29
Objects - Objects Page 162 of 375
[Link]
Add a 3D line. The start and end points must be given in 3D Global coordinates.
Syntax
[Link]
Add a 3D line with an attribute. The start and end points must be given in 3D Global coordinates.
Syntax
[Link] 2026-03-29
Objects - Objects Page 163 of 375
[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]
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.
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)
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.
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
RapidToStart - (boolean) True to rapid to start from safe rapid level for Cut Between Contours
Use3DPolylines - (boolean) True to use 3D polylines to control the tool path in Cut Between Contours
[Link] 2026-03-29
Objects - Objects Page 166 of 375
[Link]
Do Clear Area on currently selected geometries using properties set for this LaserData object.
Syntax
[Link]
Example:
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
Path ProgrammingGeometry
Path AuxiliaryGeometry
Example:
Set LD = [Link]
[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]
Example:
[Link] 2026-03-29
Objects - Objects Page 168 of 375
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
.CutHoles
End With
[Link]
End Sub
[Link]
Do Cut Path on currently selected geometries using properties set for this LaserData object.
Syntax
[Link]
Example:
[Link] 2026-03-29
Objects - Objects Page 169 of 375
[Link] = acamOUTSIDE
[Link] = True
With LD
.McComp = acamCompTOOLCEN
.XYCorners = acamCornersROUND
.OffsetNumber = 66
.BeamWidth = 0.5
.CutFeed = 250
Dim PS As Paths
Set PS = .CutPath
End With
[Link]
End Sub
[Link]
Do Cut Polyline operation on currently selected geometries using properties set for this LaserData
object.
Syntax
[Link]
[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] 2026-03-29
Objects - Objects Page 170 of 375
Remarks
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
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
[Link] 2026-03-29
Objects - Objects Page 171 of 375
[Link]
Syntax
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).
[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]
[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
[Link]
Set the programming point to be used for a turning tool with multiple programming points.
Syntax
[Link] I
LatheTool Example
The example shows how to define a groving tool with two programming points.
[Link] 2026-03-29
Objects - Objects Page 173 of 375
[Link] P1
' 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
' 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.
More:
Layer Properties
Layer Examples
Layer Properties
LineType - (AcamLineType) Line type for this layer, see key below
Special - (short) Non-zero if this is a special layer ie not a user layer (read-only)
[Link] 2026-03-29
Objects - Objects Page 175 of 375
Key
Colours
Line Types
[Link]
Syntax
[Link]
[Link]
Syntax
[Link]
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)
This example will swap the "work" layer order with the "nc" layer:
[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.
[Link] = acamRED
[Link] lyr
[Link] 20, 0, 0
Layer Example 2
This example will display the names of the user layers only, ignoring the special Alphacam layers.
[Link] 2026-03-29
Objects - Objects Page 177 of 375
If [Link] = 0 Then
End If
Next lyr
Layer Example 3
This example will fillet all the geometries on user layer "BOXES".
Dim P As Path
For Each P In [Link]
[Link] 5
Next P
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:
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
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
Overlap - (Single) Overlap distanced between end of lead-out and start of lead-in
[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
Syntax
[Link]
Example...
Dim LD As LeadData
Set LD = [Link]
If [Link] Then
MsgBox "In Length =" & [Link] & vbCrLf & "Out Length =" & [Link]
Else
End If
LeadData3D Object
An object used to set the values for Lead-In/Out in a Machining Style or MillData.
Properties
[Link] 2026-03-29
Objects - Objects Page 181 of 375
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)
Overlap - (Single) Overlap distanced between end of lead-out and start of lead-in
[Link] 2026-03-29
Objects - Objects Page 182 of 375
FeedDownDistance - (Double)
[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]
Example...
Dim LD As LeadData3D
Set LD = App.CreateLeadData3D
If [Link] Then
MsgBox "In Length =" & [Link] & vbCrLf & "Out Length =" & [Link]
Else
[Link] 2026-03-29
Objects - Objects Page 183 of 375
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)
[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]
[Link]
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 184 of 375
acamLicenseNoError = 0
acamNoModuleLicense = 4
acamNoNetworkModuleLicense = 10
acamTooManyUsersModule = 14
acamClockTamperDetected = 16
acamLicenseVersionTooOld = 17
[Link]
Syntax
[Link]
[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)
[Link] 2026-03-29
Objects - Objects Page 185 of 375
[Link]
Release the handle, only handles acquired by this instance of the License object can be released.
Syntax
[Link] (Handle)
MachineComponent Object
An object storing the data for a machine component for simulation, for a Mill or Router.
Properties
GeometryPath (Path) Path for this MachineComponent, will be empty if MachineComponent is a Solid
Part (read-only)
[Link] 2026-03-29
Objects - Objects Page 186 of 375
MachineConfiguration Object
An object storing the machine configuration data for simulation, for a Mill or Router.
Properties
[Link] 2026-03-29
Objects - Objects Page 187 of 375
RotateBothAtSameTime (Bool) True if both axes should rotate at the same time
Method
[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 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.
More:
Material Properties
Material Properties
Inch - (boolean) True if speed units are feet / minute, false if metres / minute
[Link] 2026-03-29
Objects - Objects Page 189 of 375
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.
AutoZRapidLevelIsAbsolute - (float) True if rapid level is absolute for Auto Z, False for relative
CheckFoulCurrentSurface - (boolean) True to check for fouling the current surface in 3D Surface
Machining using Parameter Lines
[Link] 2026-03-29
Objects - Objects Page 190 of 375
DepthsOfCutSpecified - (boolean) True for specified depths of cut, also set ThicknessFirstCut and
ThicknessLastCut
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
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
[Link] 2026-03-29
Objects - Objects Page 191 of 375
HelicalInterpolation - (boolean) True to use helical interpolation for rough/finish. Pitch is given by
MaxDepthPerCut, or [Link] if zero
InitialStock - (single) Initial Stock amount when using multiple number of cuts (for XY stock) for
Rough/Finish
NoUpdate - (boolean) True to suppress association of geometry and tool paths for this process
[Link] 2026-03-29
Objects - Objects Page 192 of 375
PolylineMcComp - (Boolean) True if Machine Comp (G41/42) is to be used for Machine Polyline
ProcessType2
SawAngle - (double) Angle for saw. (For elements whose angles are not set by element property
SawAngle)
[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.
SurfaceMC5AxisAngle - (double) Angle between tool and surface normal for 5-axis surface machining
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
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
[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
WidthsOfCutSpecified - (boolean) True for specified widths of cut (if RoughFinishNumberOfCuts > 1),
also set WidthFirstCut and WidthLastCut
[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]
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
' .RotationAngle = 45
' .TiltAngle = 10
' .ToolVectorX = 1
' .ToolVectorY = 1
' .ToolVectorZ = 1
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]
The example draws an array of circles, lets the user select ones to drill, and drills and taps them.
[Link]
[Link] 2026-03-29
Objects - Objects Page 198 of 375
[Link] = acamDRILL
[Link] = 20
[Link] = 1
[Link] = -15
[Link] = acamTAP
[Link] = 20
[Link] = 1
[Link] = -10
[Link] = 100
[Link] = [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]
Remarks
The properties EngraveCornerAngleLimit, ChordError and StepLength control the engraving, they can
be left at default values if desired.
[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] = acamINSIDE
[Link] = True
[Link] = acamEngraveGEOMETRIES
[Link] = acamCornersSTRAIGHT
[Link] = 20
[Link] = 1
[Link] = -4
[Link] = 120
[Link] 2026-03-29
Objects - Objects Page 200 of 375
End Sub
[Link]
Get the lead data for this operation. An object of type LeadData will be returned.
Syntax
[Link]
See example.
MillData.GetLeadData3D
Get the 3D lead data for this operation. An object of type LeadData3D will be returned.
Syntax
MillData.GetLeadData3D
See example.
[Link]
Machine currently selected surfaces, using properties set for this MillData object.
Syntax
[Link]
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
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]
See examples
[Link]
Do Pocket operation on currently selected geometries, using properties set for this MillData object.
Syntax
[Link]
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()
[Link] 2026-03-29
Objects - Objects Page 202 of 375
width = 150
height = 100
corner_rad = 10
[Link] width / 2, 0
Set p1 = [Link]
[Link] corner_rad
[Link] = acamINSIDE
[Link] = True
[Link] = acamOUTSIDE
[Link] = True
[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
Syntax
[Link] (Angle)
[Link]
Do Rough / Finish operation on currently selected geometries, using properties set for this MillData
object.
Syntax
[Link]
The example draws a rectangle and creates a finish path with lead-in/out.
' 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
[Link] 2026-03-29
Objects - Objects Page 204 of 375
Set MD = [Link]
[Link] = acamCornersSTRAIGHT
[Link] = 20
[Link] = 1
[Link] = -10
[Link]
End Sub
[Link]
Do Saw operation on currently selected geometries, using properties set for this MillData object.
Syntax
[Link]
The example defines and selects a Saw tool, then draws a rectangle, puts the ghost tool on the outside,
selects it and saws it.
ToolName = DefineSaw
[Link] ToolName
Dim P2 As Path
[Link] 2026-03-29
Objects - Objects Page 205 of 375
[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
[Link] 2026-03-29
Objects - Objects Page 206 of 375
With Tool
.Number = 85
.Diameter = 100
.FixedFeed = 10
.FixedDownFeed = 3
.FixedSpeed = 100
.Units = 0
.SaveAs DefineSaw
End With
End Function
[Link]
Syntax
[Link] (LD)
See example.
MillData.SetLeadData3D
[Link] 2026-03-29
Objects - Objects Page 207 of 375
Syntax
MillData.SetLeadData3D (LD)
See example.
[Link]
Syntax
[Link]
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)
[Link]
Syntax
[Link] (Paths)
[Link] 2026-03-29
Objects - Objects Page 208 of 375
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
double X1
double Z1
double X2
double Z2
[Link]
Set the start points for machining using parameter lines or tool-side.
Syntax
double X1
double Z1
double X2
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.
Set the geometry to be used as the work area for Y-axis machining.
Syntax
[Link] (Geo)
MachineSurfaces Examples
Example 2: Machine a surface using Parameter Lines, checking against another surface.
[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.
[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
[Link] 2026-03-29
Objects - Objects Page 211 of 375
[Link] = acamSurfaceMCActionROUGHING
[Link] = acamPocketCONTOUR
[Link] = 10
[Link] = 2.5
[Link] = 5
[Link] = 3
[Link] = 0.5
[Link]
End Sub
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] = 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 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]
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]
See example
[Link]
Specify the Path and/or STL to be used as material for a Z Contour Roughing.
Syntax
[Link](Materials)
Example...
Dim SP As SolidPart
Dim MD As MillData
[Link] 2026-03-29
Objects - Objects Page 215 of 375
' material
[Link] PMat
Set SP = [Link](2)
[Link] SP
Set MD = [Link]
[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
[Link] Materials
[Link] = AcamMillTypeOptimised
[Link]
[Link]
Clear the list of drilled points. Should be called before calling AddDrillPoint for each drill point.
Syntax
[Link]
' 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.
' Part
' Material
[Link] 2026-03-29
Objects - Objects Page 217 of 375
[Link] 25, 0
' Create and drill holes that can be used to plunge into.
MakeDrillHoles
' Tool
Dim MD As MillData
Set MD = [Link]
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
[Link] = AcamMillTypeClimb
[Link] = acamMEApproachPreDrilledHoles
[Link] = True
[Link]
Dim P As Path
Dim CP As CircleProperties
Set CP = [Link]
End If
End If
Next P
[Link] 2026-03-29
Objects - Objects Page 219 of 375
[Link]
SelectSolidsNotMat
[Link] = True
[Link] = 2
[Link] = 1
[Link] = acamMEApproachHelix
[Link] = 20
[Link] = 1
[Link] = True
[Link]
End Sub
Dim S As SolidPart
[Link] = ([Link]("LicomUKDMBStockType") = 0)
Next S
End Sub
[Link] 2026-03-29
Objects - Objects Page 220 of 375
Dim P As Path
[Link](ATTR_GEO_Z_LEVEL_TOP) = 25#
[Link](ATTR_GEO_Z_LEVEL_BOTTOM) = 0#
[Link] = True
[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
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
' Part
' Material
[Link] 0, -25
' Tool
Dim MD As MillData
Set MD = [Link]
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
[Link] = AcamMillTypeClimb
[Link] = acamMEApproachAutomatic
[Link] = 1
[Link]
End Sub
Dim S As Surface
[Link] 2026-03-29
Objects - Objects Page 223 of 375
[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
[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.
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
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
[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)
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)
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)
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
[Link] 2026-03-29
Objects - Objects Page 226 of 375
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
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.
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
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
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
[Link] 2026-03-29
Objects - Objects Page 228 of 375
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
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
[Link] 2026-03-29
Objects - Objects Page 229 of 375
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)
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
[Link] 2026-03-29
Objects - Objects Page 230 of 375
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)
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
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)
[Link] 2026-03-29
Objects - Objects Page 231 of 375
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
[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]
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.
[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] 2026-03-29
Objects - Objects Page 232 of 375
MillManualToolPath Examples
Note that because 2D methods are used the tool will rapid up to the safe rapid level automatically
between each tool path.
[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)
Dim PS As Paths
Set PS = [Link]
[Link] 2026-03-29
Objects - Objects Page 233 of 375
End Sub
A single helical arc. Note that the Post Processor must use the Z value (eg post variable AZ) in the dollar
numbers for arc.
[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 PS As Paths
Set PS = [Link]
End Sub
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.
[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 MD As MillData
Set MD = [Link]
[Link] = RapidLevel
[Link] = ZDepth
[Link] = ZDepth
[Link]("LicomUKDMBOperationName") = "FACING"
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
[Link]
[Link] [Link] & "LICOMDAT\[Link]\User - Cone - 10mm x 45
[Link]"
Dim MD As MillData
Set MD = [Link]
[Link] = 150
[Link] = 2
[Link] = -20
MTP.Add3DLine 100, 0, 50
MTP.Add3DLine 100, 50, 50
MTP.Add3DLine 0, 50, -20
[Link]
End Sub
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.
[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 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
End Sub
MillStyle Object
An object representing a Mill Machining Style.
[Link] 2026-03-29
Objects - Objects Page 237 of 375
Properties
LayerGeometry - (String) If not empty, the name of the layer containing the geometries to be used for
this style
ShowProgressBox - (Boolean) True to show the progress box while applying the style
[Link]
Syntax
[Link]
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 238 of 375
[Link]
Syntax
[Link] (Name)
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
[Link]
Get the machining data for this operation. An object of type MillData will be returned.
Syntax
[Link]
[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:
Dim S As MillStyle
Dim SS As MillSubStyle
Dim MD As MillData
Set MD = [Link]
End If
Next SS
Next S
End Sub
[Link]
Syntax
[Link] (MD)
[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]
[Link]
Syntax
[Link] (LD)
MillSubStyle.GetLeadData3D
Get the 3D lead data for this operation. An object of type LeadData3D will be returned.
Syntax
SubStyle.GetLeadData3D
MillSubStyle.SetLeadData3D
Syntax
SubStyle.SetLeadData3D (LD)
[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
DiameterAndLengthSet - (boolean) True if diameter and length were set for a user-defined tool using a
line and circle (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
FixedDownFeed - (float) Fixed down 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
OffsetNumber - (long) Offset Number, if this is not set tool number (property Number) will be used
ToolTipToGaugeLine - (float) Distance from tool tip to gauge line length (position of tool home point
when tool is at home).
[Link] 2026-03-29
Objects - Objects Page 243 of 375
[Link]
Get the geometries for the disk guard (Marble module only).
Syntax
[Link]
Remarks
[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]
Remarks
See GetProfile.
The example gets the geometry for the current tool (if user-defined) and copies it to the Alphacam
database.
Dim P As Path
Set P = [Link]
[Link] 2026-03-29
Objects - Objects Page 244 of 375
[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]
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]
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]
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)
[Link]
Save tool to disk. The tool will not be selected. See Select for this.
Syntax
[Link] (PathName)
[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.
[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]
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)
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] 2026-03-29
Objects - Objects Page 247 of 375
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)
[Link]
Show tool on mouse pointer and ask user to confirm that it is the required tool, eg before using Select.
Syntax
[Link]
Remarks
MillTool Examples
MillTool Example 1
MillTool Example 2
MillTool Example 3
MillTool Example 4
MillTool Example 1
With tool
.type = acamToolBALL
[Link] 2026-03-29
Objects - Objects Page 248 of 375
.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] = 82
MillTool Example 2
The following code will create and select a user-defined tool. The geometry is a cone with a flat bottom.
[Link] 2026-03-29
Objects - Objects Page 249 of 375
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.
With tool
.Type = acamToolBALL
.Number = 83
.FeedPerTooth = .1
.Diameter = 22
.Length = 50
.NumberOfTeeth = 4
.TPD(1) = 2.2345
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.
' 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
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]
Syntax
[Link]
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.
[Link] 2026-03-29
Objects - Objects Page 252 of 375
[Link]
[Link]
[Link]
[Link]
Operation Object
An operation.
More:
Operation Properties
[Link]
Syntax
[Link]
[Link]
Syntax
[Link] (FirstPath)
[Link] 2026-03-29
Objects - Objects Page 253 of 375
Operation Properties
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
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
[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)
[Link]
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] 2026-03-29
Objects - Objects Page 255 of 375
AcamOpRenumberAction
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.
End Sub
' 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]
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.
End Sub
Path Object
A single geometry or tool path - contains a list of line and arc elements.
More:
Path Properties
Path Properties
[Link] 2026-03-29
Objects - Objects Page 257 of 375
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
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)
IsDrilling - (boolean) True if this tool path contains just rapid elements and drilling elements. Drilling
elements are zero length in XY
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)
[Link] 2026-03-29
Objects - Objects Page 258 of 375
LineType - (AcamLineType) Line type for this path, see key in Layer object
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
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
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]
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)
Remarks
[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)
Remarks
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.
[Link] 2026-03-29
Objects - Objects Page 260 of 375
Set P1 = [Link](1)
Dim MD As MillData
Set MD = [Link]
Set P2 = [Link](1)
[Link] P2
End Sub
[Link]
Syntax
[Link]
Syntax
[Link] (X, Y)
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]
Remarks
The returned object is a Collection of Path objects, starting with the first broken-off part of the path.
Example:
[Link]
Syntax
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.
Dim P1 As Path
Dim P2 As Path
[Link]
End Sub
[Link]
Syntax
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
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]
Syntax
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)
[Link]
Copy part of the path and return a Path object for the new path.
Syntax
[Link] 2026-03-29
Objects - Objects Page 264 of 375
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:
End Sub
[Link]
Syntax
[Link]
See [Link]
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 265 of 375
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]
[Link]
Syntax
[Link] (Tolerance)
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]
Syntax
[Link] 2026-03-29
Objects - Objects Page 266 of 375
[Link]
Syntax
Remarks
The example will drag the first geometry, if the user accepts the geometry is moved to the new position.
Set P1 = [Link](1)
Dim Ret As Long
Dim XBase As Double, YBase As Double
Dim XNew As Double, YNew As Double
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)
[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
End Sub
[Link]
Explode path - each element (line or arc) is put into a separate path.
Syntax
[Link]
[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:
[Link]
Syntax
[Link] (Start)
[Link]
Syntax
[Link] (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]
Syntax
[Link] (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]
Syntax
double ChordTolerance Tolerance within which arcs must match line end-points
[Link]
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
double ChordTolerance Tolerance within which lines / arcs must match line end-points
[Link]
Syntax
[Link] (HatchColor)
[Link] 2026-03-29
Objects - Objects Page 270 of 375
[Link]
Syntax
[Link]
[Link]
Syntax
[Link] (Index)
[Link]
Get the Bitmap associated with the path. An object of type GeoBitmap will be returned.
Syntax
[Link]
[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]
[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
Example:
' Ask user for an XY point and draw a line from this point
Dim P As Path
Dim X1 As Double, Y1 As Double
Dim Drw As Drawing
Set Drw = [Link]
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
[Link]
Syntax
[Link]
[Link]
Get local Max / Min XY of this tool path, ignoring rapids. Return False if there are no feeds.
Syntax
[Link]
Get global Max / Min XY (not Z) of this tool path, ignoring rapids. Return False if there are no feeds.
Syntax
[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]
See Also
[Link]
[Link]
[Link]
Get the machining data for this path if it is a tool path. An object of type LaserData will be returned.
Syntax
[Link]
[Link]
Get the last element (line or arc) in the path. An object of type Element will be returned.
Syntax
[Link]
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]
Get the machining data for this path if it is a tool path. An object of type MillData will be returned.
Syntax
[Link]
[Link]
Syntax
[Link]
[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]
[Link]
[Link]
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 275 of 375
[Link]
Get the tool for this path if it is a tool path. An object of type MillTool will be returned.
Syntax
[Link]
Get the machining data for this path if it is a tool path. An object of type WireData will be returned.
Syntax
[Link]
[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]
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 276 of 375
boolean IncludeTangents True to include points where it does not cross, just meets tangentially
Remarks
The example draws a rectangle and finds the intersection points with a line, and draws a line between
the two intersection points.
Dim P1 As Path
Set P1 = [Link](0, 0, 100, 100)
Dim N As Long
Dim XInt, YInt
[Link]
Syntax
[Link]
[Link]
Syntax
[Link](X, Y)
[Link] 2026-03-29
Objects - Objects Page 277 of 375
[Link]
See if two objects represent the same path. This is NOT a geometric comparison.
Syntax
[Link](Path2)
[Link]
Compare the geometry of this path with a second path. If they are the same shape the return value will
be True.
Syntax
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:
If [Link](P2, A, X, Y) Then
[Link] A, 0, 0
[Link] 2026-03-29
Objects - Objects Page 278 of 375
[Link] X, Y
End If
[Link]
Mirror the path using a work plane in the 3D Global coordinate system.
Syntax
[Link] (WP)
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]
Syntax
See also
[Link]
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 279 of 375
[Link] (X, Y, 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]
Syntax
[Link] (X, 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]
Syntax
[Link] NewDrawing
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]
Syntax
Remarks
Example:
[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
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
[Link]
Syntax
Remarks
Example:
See [Link]
[Link]
Find Global coordinates of the point at the given distance along the path.
Syntax
[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
Note the Dim statements declaring the parameters xp, yp, zp and elem, these variables must be of the
specified types.
Sub main()
Dim p As Path
End If
End Sub
[Link]
Find Local coordinates of the point at the given distance along the path.
Syntax
[Link] 2026-03-29
Objects - Objects Page 283 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
Note the Dim statements declaring the parameters xp, yp and elem, these variables must be of the
specified types.
Sub main()
Dim p As Path
path_len = [Link]
if ok then
[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]
Syntax
[Link]
[Link]
[Link]
[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)
Remarks
[Link]
[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
double X1
double Z1
double X2
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]
Syntax
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]
Syntax
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]
Syntax
[Link] 2026-03-29
Objects - Objects Page 287 of 375
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
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
Syntax
[Link] 2026-03-29
Objects - Objects Page 288 of 375
Double HoleDiaMultiplier
Double ZigZagLength
Path.Set3DLeadInOutAuto
Syntax
Double XIn, YIn, ZIn Point to lead-in from if using a line only
[Link] 2026-03-29
Objects - Objects Page 289 of 375
Double XOut, YOut, ZOut Point to lead-in from if using a line only
Syntax
[Link] (LD)
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 P As Path
[Link] = 50
[Link] LD
Next P
[Link]
[Link] 2026-03-29
Objects - Objects Page 290 of 375
[Link]
Syntax
[Link] (layer)
[Link]
Syntax
Remarks
acamLeadARC = 1
acamLeadBOTH = 2
acamLeadLINE = 0
acamLeadNO_CHANGE = 4
acamLeadNONE = 3
[Link] 2026-03-29
Objects - Objects Page 291 of 375
[Link]
Syntax
[Link] (LeadIn, LeadOut, SlopeIn, SlopeOut, XIn, YIn, XOut, YOut, [Overlap],
[RadiusMultiplier])
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.
acamLeadARC = 1
acamLeadBOTH = 2
acamLeadLINE = 0
acamLeadNO_CHANGE = 4
acamLeadNONE = 3
[Link] 2026-03-29
Objects - Objects Page 292 of 375
[Link]
Syntax
Remarks
Syntax
[Link] (MD)
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 P As Path
[Link] = 50
[Link] MD
Next P
[Link] = True
[Link] 2026-03-29
Objects - Objects Page 293 of 375
[Link]
Set this geometry to be the Panel in Router (Equivalent to the "Specify Panel" command).
Syntax
[Link]
Syntax
[Link] (X, Y)
[Link]
Syntax
[Link](Tool)
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]
Syntax
[Link] 2026-03-29
Objects - Objects Page 294 of 375
[Link] (wp)
[Link]
Syntax
Remarks
[Link]
Syntax
[Link](show)
[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] 2026-03-29
Objects - Objects Page 295 of 375
[Link]
Syntax
[Link]
[Link]
Syntax
[Link](Path2)
Remarks
Path2 should be closed, and must not cross this path, but it may touch.
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 296 of 375
The example selects all geometries that intersect with the first geometry.
[Link] False
[Link]
Trim the path at intersection points with currently selected geometries, and discard one part.
Syntax
[Link] (X, Y)
Paths Object
A Collection of Path objects.
More:
Paths Properties
Paths Properties
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)
[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]
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)
[Link]
See [Link].
Paths.DragMove2
Let the user graphically drag the paths to a new location, not using XOR.
Syntax
[Link] 2026-03-29
Objects - Objects Page 298 of 375
Remarks
The example will drag the first geometry, if the user accepts the geometry is moved to the new position.
Set P1 = [Link](1)
Dim Ret As Long
Dim XBase As Double, YBase As Double
Dim XNew As Double, YNew As Double
If Ret = 0 Then
[Link] XNew - XBase, YNew - YBase
End If
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 299 of 375
[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]
[Link]
Syntax
[Link]
Syntax
[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
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)
th
For example, the following gives the 4 geometry in the drawing:
[Link](4)
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)
[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)
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)
[Link]
Finish 3D polyline.
Syntax
[Link]
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
SnapData Object
An object storing the data about the last snapped point. (All properties are read-only)
Properties
Spline Object
A spline curve.
More:
Spline Properties
Spline Properties
[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)
Rational - (boolean) True if spline is rational (some weights are not 1) (read-only)
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)
[Link]
Copy the spline and return a Spline object for the new spline.
Syntax
[Link]
Remarks
[Link]
Syntax
[Link] (Tolerance)
[Link]
Evaluate the spline at the given point, returning global coordinates. The coordinates will be returned,
and, optionally, the derivative values.
Syntax
[Link] 2026-03-29
Objects - Objects Page 306 of 375
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
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
[Link]
Evaluate the spline at the given point, returning local coordinates. The coordinates will be returned, and,
optionally, the derivative values.
Syntax
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
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
[Link]
Get the layer for the spline. An object of type Layer will be returned.
Syntax
[Link]
[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]
[Link]
Mirror the spline using a work plane in the 3D Global coordinate system.
Syntax
[Link] (WP)
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]
Syntax
[Link]
Syntax
[Link] (X, Y, 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]
Syntax
[Link] (X, 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
[Link]
Syntax
[Link] NewDrawing
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]
Syntax
Remarks
This will project the spline vertices so there is no step length or tolerance parameters as in the Drawing
project methods.
[Link]
Syntax
[Link]
[Link]
[Link] 2026-03-29
Objects - Objects Page 310 of 375
Syntax
[Link]
[Link]
Rotate the spline in the 3D Global coordinate system, about a specified axis.
Syntax
double X1
double Z1
double X2
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]
Syntax
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]
Syntax
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]
Syntax
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
[Link] 2026-03-29
Objects - Objects Page 312 of 375
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]
Syntax
[Link] (layer)
[Link]
Syntax
[Link] (wp)
SubOperation Object
A sub-operation, within an Operation.
More:
SubOperation Properties
SubOperation Properties
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
Time - (Double) The time in seconds taken for this sub-operation (read-only)
[Link]
Syntax
[Link]
Get the machining data for this sub-operation. An object of type LaserlData will be returned.
Syntax
[Link]
Remarks
The properties of the LaserData object may be read and/or written. If any are written, use
[Link] to regenerate the tool paths.
[Link]
Get the machining data for this sub-operation. An object of type MillData will be returned.
Syntax
[Link]
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]
Syntax
[Link] (FirstPath)
[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)
Remarks
[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)
Remarks
Examples
[Link] 2026-03-29
Objects - Objects Page 315 of 375
The following examples assume that the referenced drawing file is available.
Dim MD As MillData
Set MD = [Link]
[Link] = 2
[Link] MD
End Sub
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
[Link] 2026-03-29
Objects - Objects Page 316 of 375
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
Surface Object
A 3D surface.
More:
Surface Properties
Surface Example
Surface Facets
Surface Properties
[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)
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)
[Link] 2026-03-29
Objects - Objects Page 318 of 375
Rational - (boolean) True if surface is rational (some weights are not 1) (read-only)
[Link]
Copy the surface and return a Surface object for the new surface.
Syntax
[Link]
Remarks
[Link]
Evaluate the surface at the given point. The coordinates will be returned, and, optionally, the normal and
derivative values.
Syntax
[Link] 2026-03-29
Objects - Objects Page 319 of 375
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
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)
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]
Syntax
[Link] (Distance)
[Link]
Call this when all trimming paths have been applied to the surface using TrimWithPath.
Syntax
[Link]
[Link]
Syntax
[Link]
Get the layer for the surface. An object of type Layer will be returned.
Syntax
[Link]
[Link] 2026-03-29
Objects - Objects Page 321 of 375
[Link]
Syntax
[Link] (X1, Y1, Z1, X2, Y2, Z2, XP, YP, ZP, S, T)
double Y1 Y…
double Z1 Z…
double Y2 Y…
double Z2 Z…
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, ZP, S and T) must be declared as double.
[Link]
Return True if the given S,T point is in a trimmed region of the surface.
Syntax
[Link] (S, T)
[Link] 2026-03-29
Objects - Objects Page 322 of 375
[Link]
Syntax
[Link] (WP)
Remarks
The surface will be mirrored in global XYZ, using the given work plane as the plane to mirror in.
[Link]
Syntax
[Link] (X, Y, Z)
[Link]
Syntax
[Link] NewDrawing
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]
[Link] 2026-03-29
Objects - Objects Page 323 of 375
Syntax
[Link]
[Link]
Syntax
[Link]
[Link]
Syntax
double X1
double Z1
double X2
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]
Syntax
[Link] 2026-03-29
Objects - Objects Page 324 of 375
[Link]
Syntax
[Link] (layer)
[Link]
Set tool side using normal vector. If normal vector at centre of the surface is pointing downwards
reverse the surface.
Syntax
[Link]
[Link]
Syntax
[Link]
[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)
Remarks
[Link]
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.
[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.
End Sub
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
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
BaseLine - (Path) The base-line for the text if it has one (read-only)
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
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
[Link]
Syntax
[Link] (Str)
[Link]
Convert the text to geometry lines and arcs. The text will be deleted.
Syntax
[Link]
[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]
[Link]
Syntax
[Link]
[Link]
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.
[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]
[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]
[Link]
Syntax
[Link] (X, Y, 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]
Syntax
[Link] (X, 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]
Syntax
[Link] NewDrawing
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]
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
double X1
double Z1
double X2
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]
Syntax
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]
Syntax
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]
Syntax
[Link] (layer)
[Link]
Syntax
[Link] (wp)
[Link]
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
Texts Object
A Collection of Text objects.
More:
Texts Properties
Texts Properties
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)
[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]
[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)
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)
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
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
[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.
[Link] 2026-03-29
Objects - Objects Page 338 of 375
LagDistanceForSecondTool - (float) Lag distance for second tool in twin-turret roughing or finishing
[Link] 2026-03-29
Objects - Objects Page 339 of 375
acamPocketFACE
RapidApproachSecurityX - (float)
RapidApproachSecurityZ - (float)
RapidOrtho - (Boolean) True to use rapid moves parallel to X or D axes only, for apporach and retract
rapids
RapidRetractSecurityX - (float)
RapidRetractSecurityZ - (float)
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 340 of 375
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.
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.
[Link]
Dim Drw As Drawing
Set Drw = [Link]
[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
.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.
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]"
' Lead-in/out
.AutoLeadLength = 0.5
.AutoLeadIn = acamAutoLeadTANGENTIAL
.AutoLeadOut = acamAutoLeadPERPENDICULAR
.McComp = acamCompTOOLCEN
[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.
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
[Link] 2026-03-29
Objects - Objects Page 345 of 375
.GrooveProcess = acamGrooveROUGHANDFINISH
.PeckDistance = 4
.DepthOfCut = 2
.Stock = 0.5
.GrooveHolderClearance = 1
[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]
Syntax
[Link]
The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.
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
.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.
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]"
.PocketType = acamPocketDIAMETER
.FaceStock = 0.2
.DiameterStock = 0.3
.DepthOfCut = 0.5
.CheckClearanceAngle = True
.Bidirectional = False
.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]
The example shows the properties that should be set for this method. It uses the geometry drawn in
functions defined here.
[Link] 2026-03-29
Objects - Objects Page 348 of 375
[Link] = acamRIGHT
Dim TD As TurnData
Set TD = [Link]
With TD
.SetToolChangePoint 20, 50
[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
[Link] 2026-03-29
Objects - Objects Page 349 of 375
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
.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
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
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
.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] 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.
[Link]
Syntax
[Link]
Syntax
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 352 of 375
[Link]
Syntax
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.
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.
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
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]"
.Thread
.GotoToolChangePoint
End With
[Link] = True
[Link]
End Sub
Create the geometry for the billet and return the Path object.
End Function
[Link] 2026-03-29
Objects - Objects Page 355 of 375
Create the geometry for the part and return the Path object.
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
[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]
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]
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]
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]
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]
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)
[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]
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.
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
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
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
Build - (long) Build number, incremented for each internal or released build
ViewWindow Object
A ViewWindow object represents a window pane which contains a view onto the Alphacam drawing,
not a Project Manager page.
ViewWindow Properties
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]
Syntax
[Link]
[Link]
[Link] 2026-03-29
Objects - Objects Page 361 of 375
Syntax
[Link] (Angle)
[Link]
Syntax
[Link] (Angle)
[Link]
Syntax
[Link] (Angle)
[Link]
Syntax
[Link] (X, Y, Z)
[Link]
[Link] 2026-03-29
Objects - Objects Page 362 of 375
Syntax
[Link] (Handle)
See example.
[Link]
Syntax
[Link] (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.
[Link] 2026-03-29
Objects - Objects Page 363 of 375
acamWireControlPointsMATCHING_ELEMENTS = 2, acamWireControlPointsNONE = 3
MakeLeadInPerp - (boolean) True if start point is to be moved to make the lead-in perpendicular
StartInMaterial - (boolean) True to start in material. SetStartCircle must be used to set the circle to start
in
WireAngle - (double) Angle of Wire, CCW angle is positive looking along the direction of cut
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
width = 100
height = 50
[Link]
[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
Syntax
wd.Cut4AxisShape
Example:
Sub Cut4AxisShape
width = 100
height = 50
corner_rad = 8
[Link]
[Link] -20, 15
[Link] = acamINSIDE
[Link] 2026-03-29
Objects - Objects Page 366 of 375
[Link] = True
[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
[Link] = True
[Link] circle1
[Link] [Link]
[Link] = acamWireControlPointsNONE
mc.Cut4AxisShape
End Sub
[Link]
Syntax
[Link] (Geo)
[Link]
Syntax
[Link] 2026-03-29
Objects - Objects Page 368 of 375
[Link] (Geo)
[Link]
Syntax
[Link] (Geo)
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]
Syntax
[Link] (Elem)
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
More:
WorkPlane Properties
WorkPlane Properties
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)
Geometries - (Paths) The geometries on this work plane, as a Paths Collection (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)
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
TmatFlat(i) - (double) Element of transformation array for flat panel (I = 0 to 11) (read-only)
[Link]
If the work plane is an unfolded work plane (property UnFolded = True), convert local coordinates to
global.
Syntax
[Link]
Syntax
[Link] (dist)
[Return] WorkPlane Pointer to WorkPlane Dispatch object for new work plane
[Link]
Syntax
[Link] (X1, Y1, Z1, X2, Y2, Z2, XP, YP, ZP)
[Link] 2026-03-29
Objects - Objects Page 371 of 375
double Y1 Y…
double Z1 Z…
double Y2 Y…
double Z2 Z…
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 wp As WorkPlane
Set wp = [Link]
If wp Is Nothing Then
end
End If
Dim p As Path
Dim e1 As Element
Set e1 = [Link]
[Link] 2026-03-29
Objects - Objects Page 372 of 375
If ok Then
Dim p3 As PolyLine
[Link]
Else
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
Path Path The path to intersect with - only line elements will be used
Variant YP Y…
Variant ZP Z…
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 WP As WorkPlane
Set WP = [Link](0, 0, 0, 0, 1, 0, 0, 0, 1)
Dim P As Path
Dim N As Long
N = [Link](P, X, Y, Z)
If N = 2 Then
Dim PL As PolyLine
[Link]
End If
[Link]
Syntax
Bool LocalX True to make the local X axis horizontal, false for Y
[Link] 2026-03-29
Objects - Objects Page 374 of 375
[Link]
Syntax
[Link] (Type)
[Link]
Syntax
[Link] (X, Y, Z)
[Link]
Syntax
Remarks
XG, YG, ZG must be the global coordinates of a point on the work plane.
[Link]
[Link] 2026-03-29
Objects - Objects Page 375 of 375
Syntax
[Link] (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
[Link] 2026-03-29