Overview

The AptStepMaker class creates AP-238 files from APT-like tool movement data. APT is a legacy language from the 1950’s that defines tool path geometries. In the beginning it was used in a similar way to FORTRAN except it created machine tool programs rather than computer programs. In recent years CAM systems have replaced APT systems but many CAM systems still write APT data so it is the most widely available common denominator for tool path information.

APT is the most important but not the only source of data for the STEP-NC API. There are functions to read several flavors of RS274D/ISO 6983 files, for example, see the ImportHass, ImportSiemens and ImportFanuc functions, and there are functions to read STEP files to define the geometries and tolerances of the workpiece, stock, fixtures and cutting tools, for example see the Workpiece and Rawpiece functions.

The legacy APT programming language is state driven. Each time a new tool path is created the current feed, speed and other quantities are added to that tool path as necessary. The APT object has been written for APT parsers so it is also state driven. Hence, at any time there is a current workpiece, workplan, workingstep, feed, speed and so on (see the GetCurrent functions).

STEP-NC is NOT state driven. The APT object takes the state driven commands of APT and converts them into a graph of STEP-NC objects where every quality of every object is explicitly attached to that object. Only the APT object has a state model in the STEP-NC API. The other objects use navigation models in which a given argument is used as the starting point to find other objects. It can be argued that another version of the APT object should be written for more modern applications that is not state driven. The process object contains some of the required functionality.

A Note on Identifiers

Every entity in a STEP file has an identifier. The Part 21 format requires this entity to be a number, and the XML (Part 28) format uses the same rule in order to maintain compatibilty. Many functions in the API return these numbers and many other functions require them to be supplied as arguments. This is especially the case for the functions in the Feature, Process and Tolerance object that build various kinds of data.

The identifier used for an entity instance is only persistent until the data is saved to a file. An application CANNOT store the identifier somewhere and use it to find the entity when the file is read into memory again. If an application needs this functionality then you should check to see if the object has another relevanat attribute. For example, many of the STEP-NC objects have an its_id attribute that can be used as an identifier.

Universally Unique IDentifiers (UUID's) are a new solution for persistent identity that has been added to the latest edition of the Part 21 format. New functions have been added to the APT object to set these identifiers. See the SetUUID...() functions for more details.

ArcABC()

void ArcABC(
	System::String^ label,
	double new_x,
	double new_y,
	double new_z,
	double cx,
	double cy,
	double cz,
	double radius,
	System::Boolean ccw,
	double a,
	double b,
	double c
	);

The ArcABC() function defines a curve with a contact normal. The curve is in the plane defined by the current axis.

Arguments

new_x, new_y, new_z:
(x, y, z) components for the end of the arc.
cx, cy, cz:
(i, j, k) components for the center of the arc.
radius:
The radius of the circle.
ccw:
If non-zero then the arc will travel from the current point to the new end point in a counter clockwise direction.
a, b, c:
(a, b, c) components for the contact normal at the end of the arc.

Related Functions

ArcGeneralPlane()

void ArcGeneralPlane(
	System::String^ label,
	double new_x,
	double new_y,
	double new_z,
	double cx,
	double cy,
	double cz,
	double ci,
	double cj,
	double ck,
	double ca,
	double cb,
	double cc,
	double radius,
	System::Boolean ccw
	);

The ArcGeneralPlane() function defines an arc in a given plane. All the other arguments are the same as for the arc function.

Arguments

new_x, new_y, new_z:
(X, y, z) components for the normal of the plane.
ci, cj, ck:
(i, j, k) components for the normal of the plane.
ca, cb, cc:
(a, b, c) components for the reference direction
radius:
The radius of the circle.
ccw:
If non-zero then the arc will travel from the current point to the new end point in a counter clockwise direction.

ArcRefABC()

void ArcRefABC(
	System::String^ label,
	double x,
	double y,
	double z,
	double cx,
	double cy,
	double cz,
	double radius,
	System::Int64 ccw,
	double a,
	double b,
	double c
	);

The ArcRefABC() function defines an arc for a non-spinning tool. The a, b and c components define the reference direction for this non-spinning tool at the end of the arc.

Arguments

new_x, new_y, new_z:
(i, j, k) components for the end of the arc.
cx, cy, cz:
(i, j, k) components for the center of the arc.
radius:
The radius of the circle.
ccw:
If non-zero then the arc will travel from the current point to the new end point in a counter clockwise direction.
a, b, c:
(a, b, c) components for the tool refernce direction at the end of the arc.

Related Functions

ArcXYPlane(), ArcYZPlane(), ArcZXPlane()

void ArcXYPlane(				
	System::String^ label,
	double dstx, double dsty, double dstz,
	double ctrx, double ctry, double ctrz,
	double radius,
	System::Boolean ccw
	);

void ArcYZPlane(
	System::String^ label,
	double dstx, double dsty, double dstz,
	double ctrx, double ctry, double ctrz,
	double radius,
	System::Boolean ccw
	);

void ArcZXPlane(
	System::String^ label,
	double dstx, double dsty, double dstz,
	double ctrx, double ctry, double ctrz,
	double radius,
	System::Boolean ccw
	);



void ArcXYPlane(				
	string label,
	double dstx, double dsty, double dstz,
	double ctrx, double ctry, double ctrz,
	double radius,
	bool ccw
	);

void ArcYZPlane(
	string label,
	double dstx, double dsty, double dstz,
	double ctrx, double ctry, double ctrz,
	double radius,
	bool ccw
	);

void ArcZXPlane(
	string label,
	double dstx, double dsty, double dstz,
	double ctrx, double ctry, double ctrz,
	double radius,
	bool ccw
	);

The ArcZXPlane(), ArcXYPlane() and ArcYZPlane() functions add an arc to the current tool path. The tool path is assumed to have a start point defined by the last geometry item added to the path. The arc command moves the cutting tool tip to a new point that then becomes the current point for the next geometry command.

If the current workplan does not contain any workingsteps then one will be created implicitly. If the workingstep does not contain any tool paths then one will be created implicitly and the new arc wil become the first item in that tool path.

If the arc is the first item in a new tool path after a tool change then the point defined using the FirstPathStartPoint function will be used as the start point for the arc. If no such point has been defined then there will be an error.

If this is the first point in a new tool path but there was not a tool change then the last point defined in the last tool path will be used as the start point.

If no feedrate has been defined then the feedrate will be zero. If no spindle speed has been defined then the spindle speed will be zero. If no tool has been loaded then the tool number will be zero.

Arguments

label:
A string argument that defines a name for the geometry item. Typically this will be the empty string but it can be any identifier.
x, y, z:
The x, y, z coordinates of the end point of the arc.
cx, cy, cz:
The x, y, z coordinates of the center of the circle that defines the arc.
radius:
The radius of the circle.
ccw
If non-zero then the arc will travel from the current point to the new end point in a counter clockwise direction.

The above arguments are partially redundant, for example, the requirement to give a z coordinate for the circle center is redundant if this arc is in the XY plane.

Related Functions

Common Errors

CamModeOn/Off()

void CamModeOn();	 
void CamModeOff();	 

The CamModeOn() and CamModeOff() functions control how the API separates moves into workingsteps. By default, CAM mode is Off and the API creates a new workingstep whenever the spindle speed changes. This default should normally used by APT parsers because otherwise the workingsteps made by the parsers will be very long and difficult to manage.

When CAM mode is On, your applicaton must create new workingsteps explicitly by changing the tool or calling the Workingstep function.

Related Functions

CenterOn()

void CenterOn();

After the CenterOn() function is called, all subsequent toolpaths will be in Cutter Center mode. In this mode the tool path describes the center line of the cutting tool tip. The other mode is Cutter Contact mode – see the ContactOn, Left and Right functions.

If the API is in the middle of creating a tool path and if that tool path is not in Cutter Center mode then the current tool path is ended and the next geometry item is added to a new cutter center tool path.

Related Functions

Common Errors

ChangeParallelToWorkplan(), -Selective(), -NonSequential()

System::Int64 ChangeParallelToWorkplan(
	System::Int64 pl_id
	);

System::Int64 ChangeParallelToSelective(		
	System::Int64 pl_id
	);

System::Int64 ChangeParallelToNonSequential(		
	System::Int64 pl_id
	);

The ChangeParallelToWorkplan() function changes a parallel into a workplan.

The ChangeParallelToSelective() function changes a parallel into a selective.

The ChangeParallelToNonSequential() function changes a parallel into a Non-Seuential.

A workplan is a sequence of executables that will be executed consecutively. A selective is a sequence of executables from which one will be selected for execution. A non-sequential is a sequence of executables that may be executed in any order. A parallel is a sequence of executables that will be executed concurrently.

The functions copy all of the data in the old construct into the new construct and change all references to the old construct to the new one.

If the new construct is a non-sequential then the executables will be given a random order.

Arguments

pl_id:
The identity of the parallel that is to be replaced by a workplan, non-sequential or parallel.

Common Errors

ChangeSelectiveToWorkplan(), -Parallel(), -NonSequential()

System::Int64 ChangeSelectiveToWorkplan(		
	System::Int64 sel_id
	);

System::Int64 ChangeSelectiveToParallel(		
	System::Int64 sel_id
	);

System::Int64 ChangeSelectiveToNonSequential(		
	System::Int64 sel_id
	);

The ChangeSelectiveToWorkplan() function changes a selective into a workplan.

The ChangeSelectiveToParallel() function changes a selective into a parallel.

The ChangeSelectiveToNonSequential() function changes a selective into a non-sequential.

A workplan is a sequence of executables that will be executed consecutively. A selective is a sequence of executables from which one will be selected for execution. A non-sequential is a sequence of executables that may be executed in any order. A parallel is a sequence of executables that will be executed concurrently.

The functions copy all of the data in the old construct into the new construct and change all references to the old construct to the new one.

If the new construct is a non-sequential then the executables will be given a random order.

Arguments

sel_id:
The identity of the selective that is to be replaced by a non-sequential, workplan or parallel.

Common Errors

ChangeWorkplanToSelective(), -Parallel(), -NonSequential()

System::Int64 ChangeWorkplanToSelective(		
	System::Int64 wp_id
	);

System::Int64 ChangeWorkplanToParallel(		
	System::Int64 wp_id
	);

System::Int64 ChangeWorkplanToNonSequential(		
	System::Int64 wp_id
	);

The ChangeWorkplanToSelective() function changes a workplan into a selective.

The ChangeWorkplanToParallel() function changes a workplan into a parallel.

The ChangeWorkplanToParallel() function changes a workplan into a non-sequential.

A workplan is a sequence of executables that will be executed consecutively. A selective is a sequence of executables from which one will be selected for execution. A non-sequential is a sequence of executables that may be executed in any order. A parallel is a sequence of executables that will be executed concurrently.

The functions copy all of the data in the old construct into the new construct and change all references to the old construct to the new one.

If the new construct is a non-sequential then the executables will be given a random order.

Arguments

wp_id:
The identity of the workplan that is to be replaced by a non-sequential, selective or parallel.

Common Errors

ChangeNonSequentialToSelective(), -Parallel(), -Workplan()

System::Int64 ChangeNonSequentialToSelective(		
	System::Int64 wp_id
	);

System::Int64 ChangeNonSequentialToParallel(		
	System::Int64 wp_id
	);

System::Int64 ChangeNonSequentialToWorkplan(		
	System::Int64 wp_id
	);

The CChangeNonSequentialToSelective() function changes a non-sequential into a selective.

The ChangeNonSequentialToParallel() function changes a non-sequential into a parallel.

The ChangeNonSequentialToWorkplan() function changes a non-sequential into a workplan.

A workplan is a sequence of executables that will be executed consecutively. A selective is a sequence of executables from which one will be selected for execution. A non-sequential is a sequence of executables that may be executed in any order. A parallel is a sequence of executables that will be executed concurrently.

The functions copy all of the data in the old construct into the new construct and change all references to the old construct to the new one.

Arguments

wp_id:
The identity of the workplan that is to be replaced by a non-sequential, selective or parallel.

Common Errors

ChangeWorkingstepTool()

void ChangeWorkingstepTool(
	System::Int64 ws_id,
	System::Int64 tl_id
	);

The ChangeWorkingstepTool() function changes the workingstep of a tool. The two tools should be compatible. The function checks to make sure they have the same diameter. Theis can be used to clean up a project after another workplan has been inserted into that project. If the inserted workplan uses the same tools as workingsteps already in the project then those tools can be assigned to the inserted workingsteps.

Arguments

ws_id:
The identity of the workingstep.
tl_id:
The identity of the new tool.

Related Functions

Common Errors

CircleGeneralPlane()

void CircleGeneralPlane(
	System::String^ label,
	double cx,
	double cy,
	double cz,
	double ci,
	double cj,
	double ck,
	double ca,
	double cb,
	double cc,
	double radius,
	System::Boolean ccw
	);

The CircleGeneralPlane() function defines a circle in any plane.

Arguments

cx, cy, cz:
(x, y, z) components for the center of the arc.
ci, cj, ck:
(i, j, k) axis direction components for the center of the arc.
ca, cb, cc:
(a, b, c) reference direction components for the center of the arc.
radius:
The radius of the circle.
ccw:
If non-zero then the arc will travel from the current point to the new end point in a counter clockwise direction.

CircleXYPlane()

void CircleXYPlane(
	System::String^ label,
	double cx,
	double cy,
	double cz,
	double radius,
	System::Boolean ccw
	);

The CircleXYPlane() function defines a circle in the XY plane.

Arguments

cx, cy, cz:
(x, y, z) components for the center of the arc.
radius:
The radius of the circle.
ccw:
If non-zero then the arc will travel from the current point to the new end point in a counter clockwise direction.

CircleYZPlane()

void CircleYZPlane(
	System::String^ label,
	double cx,
	double cy,
	double cz,
	double radius,
	System::Boolean ccw
	);

The CircleYZPlane() function defines a circle in the YZ plane.

Arguments

cx, cy, cz:
(x, y, z) components for the center of the arc.
radius:
The radius of the circle.
ccw:
If non-zero then the arc will travel from the current point to the new end point in a counter clockwise direction.

CircleZXPlane()

void CircleZXPlane(
	System::String^ label,
	double cx,
	double cy,
	double cz,
	double radius,
	System::Boolean ccw
	);

The CircleZXPlane() function defines a circle in the ZX plane.

Arguments

cx, cy, cz:
(x, y, z) components for the center of the arc.
radius:
The radius of the circle.
ccw:
If non-zero then the arc will travel from the current point to the new end point in a counter clockwise direction.

Clean()

void Clean();

The Clean() function removes any data in the workspace that is not connected to the current project. If the application is short of memory space then the clean function may be able to find enough space to allow for completion of the program. If an application loses data because an object is not attached to the project then the clean function may be able to help reveal when this is happening.

Related Functions

Common Errors

ClearancePlane()

void ClearancePlane(
	double z_coordinate
	);

The ClearancePlane() function defines a safety plane for rapid movements. If an application is generating its own tool paths then it can use the clearance plane to move the tool between operations.

In the STEP-NC standard the clearance plane is called the "Security Plane" and it can be any arbitrary plane. In the API the Clearance plane has to be an XY plane and the clearance is defined by a positive Z value.

Arguments

z:
The clearance is defined to be an XY plane at Z distance from the origin. All subsequent workingstep will be given this clearance plane until it is reset. If the z value is zero or negative then the clearance plane is set to NULL for subsequent workingsteps.

A more powerful security plane function needs to be written that allows the security plane to be any plane.

Related Functions

Common Errors

CompressTechnology()

System::Int64 CompressTechnology();

The CompressTechnology() function removes duplicate technology descriptions. A technology is a feed, speed pair. If two technologies have the same feeds and speeds then the second one will be eliminated.

Result

Related Functions

Common Errors

Connector()

void Connector();

The Connector() function

ContactOn()

void ContactOn();

The ContactOn() function creates all subsequent toolpaths will be in Cutter Contact mode. Cutter contact mode enables three and five axis tool diameter wear compensation. In this mode the tool path describes the normal of the point of contact between the cutting tool and workpiece. If the part is being made using three axis milling then the contact point between the cutting tool and workpiece can be described using the Left and Right functions. If five axis milling is being used then the point must be defined using versions of the Arc and GoTo functions that include a, b and c parameters.

If the API is in the middle of creating a tool path and if that tool path is not in Cutter Contact mode then the tool path is ended and the next geometry item will start a new cutter contact tool path.

Related Functions

Common Errors

CoolantOn/Off/Mist/Flood/Thru/ChipRemoval()

void CoolantOn();			 
void CoolantOff();			 
void CoolantMist();			 
void CoolantFlood();			 
void CoolantThru();			 
void CoolantChipRemoval();		 
void CoolantPressure(double value);	 

The coolant functions control the coolant state for subsequent tool paths. CoolantFlood() turns coolant on and sets it to flood. CoolantMist() turns coolant on and sets it to mist. CoolantThru() turns through spindle coolant on. CoolantOff() stops coolant, regardless of type. CoolantOn() turns the coolant back on if it was previously turned off, and sets it to flood if it was not previosly on.

CoolantChipRemoval() turns coolant on and enables chip removal.

The CoolantPressure() function sets the coolant pressure. The function assumes that the given pressure is in pounds per square inch (PSI) and is to be applied to the through coolant.

Common Errors

CutterDiameterCompensationAssignment()

void CutterDiameterCompensationAssignment(
	double value
	);

The CutterDiameterCompensationAssignment() function sets a value in the cutter compensation register to compensate for tool wear. To operate effectively this function requires deep integration between the STEP-NC API and the underlying CNC control.

Arguments

value:
The tool wear compensation value.

Related Functions

Common Errors

DefaultToInches(), -Millimeters()

void DefaultToInches();
void DefaultToMillimeters();

Some APT tool path programs do not define their units for distance measurements.

The DefaultToInches() function tells the system to use a default of inches and the DefaultToMillimeters() function tells the system to use a default of millimeters.

The ratio of inches to millimeters is 1:25.4 so there is a considerable difference in size if the wrong units are applied to a file. If items cannot be seen in the visualization then this may be the reason and you should try again with different default units.

Related Functions

DefineTool()

void DefineTool(			 
	double tool_diameter,
	double tool_radius,
	double horizontal_distance,
	double vertical_distance,
	double unused,
	double angle,
	double height
	);

The DefineTool() function defines the parameters of a cutting tool. There are a large number of parameters. For a full definition see an APT reference manul. In practice the parameters defined in most programs are, in order of popularity, the cutting tool diameter, the cutting tool radius, the cutting tool length, and the cutting tool taper angle.

The cutting tool diameter is different to the cutting tool radius and a frequent cause of confusion to new CNC users. The diameter describes the diameter of the tool, but the radius describes the radius of a fillet between the diameter and the length of the cylinder.

In APT programs a tool is identified by a tool number that corresponds to the placement position of the tool in a tool holder. The SELCTLTool and LoadTool functions in the API allow tools to be selected and loaded using these numbers.

The DefineTool function is only recommended for APT programs. Modern CAM systems use more specific types of tools and these are available as separate functions.

Arguments

tool_diameter:
The diameter of the cutting tool. Called Effective_cutting_diameter in the STEP-NC standard.
tool_radius:
The radius of the fillet at the bottom of the tool. Called Corner_radius in the STEP-NC standard.
horizontal_distance:
Called Corner_radius_horizontal in the STEP-NC standard.
horizontal_vertical:
Called Corner_radius_vertical in the STEP-NC standard.
unused:
As per the name this field is not often used in APT programs. Called tip_outer_angle in the STEP-NC standard.
angle:
Called Taper_angle in the STEP-NC standard.
height:
The length of the tool. Called Overall_assembly_length in the STEP-NC standard.

Related Functions

Common Errors

DefineToolCoolantThrough()

void DefineToolCoolantThrough(
	System::Int64 on_off
	);

The DefineToolCoolantThrough() function sets the coolant flag for the current tool to on or off. The tool must be a milling cutting tool which means it cannot be an APT tool.

Arguments

on_off:
If non-zero then the through coolant attribute of the tool is set to on.

Related Functions

DefineToolSpotDrill(), DefineToolSpotDrillNumber(), FindOrMakeSpotDrill(), GetToolSpotDrill

void DefineToolSpotDrill(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double point_angle
	);

void DefineToolSpotDrillNumber(
	System::Int64 tool_number,
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double point_angle
	);

void FindOrMakeSpotDrill(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double point_angle
	);

void GetToolSpotDrill(
	System::Int64 tool_number,
	[System::Runtime::InteropServices::Out] double %ret_diameter,
	[System::Runtime::InteropServices::Out] double %ret_overall_assembly_length,
	[System::Runtime::InteropServices::Out] double %ret_functional_length,
	[System::Runtime::InteropServices::Out] double %ret_max_depth_of_cut,
	[System::Runtime::InteropServices::Out] double %ret_point_angle
	);

The DefineToolSpotDrill() function defines a spot drill tool with the given parameters.

The FindOrMakeSpotDrill() function finds a spot drill tool with the given parameters and makes one if not found.

The DefineToolSpotDrillNumber() function replaces a tool with a given number with a spot drilling tool.

The GetToolSpotDrill() gets the parameters of a spot drilling tool and can be used to check if a tool has already been defined.

Arguments

tool_number:
The number of the tool to be checked.
diameter:
The diameter of the cutting tool. Called Effective_cutting_diameter in the STEP-NC standard.
overall_assembly_length:
The total length of the tool – used for collision detection.
functional_length:
The functional length used for 5-axis compensation calculations.
max_depth_of_cut:
The maximum allowed depth of cut for this tool.
point_angle:
The angle at the tip of the drill.

Related Functions

Common Errors

DefineToolTwistDrill(), DefineToolTwistDrillNumber(), FindOrMakeTwistDrill(), GetToolTwistDrill()

void DefineToolTwistDrill(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double point_angle
	);

void FindOrMakeTwistDrill(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double point_angle
	);

void DefineToolTwistDrillNumber(
	System::Int64 tool_number,
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double point_angle
	);

void GetToolTwistDrill(
	System::Int64 tool_number,
	[System::Runtime::InteropServices::Out] double %ret_diameter,
	[System::Runtime::InteropServices::Out] double %ret_overall_assembly_length,
	[System::Runtime::InteropServices::Out] double %ret_functional_length,
	[System::Runtime::InteropServices::Out] double %ret_max_depth_of_cut,
	[System::Runtime::InteropServices::Out] double %ret_point_angle
	);

The DefineToolTwistDrill() function defines a drilling tool with the given parameters.

The FindOrMakeTwistDrill() function finds a drilling tool with the given parametersa and makes one if not found.

The DefineToolTwistDrillNumber() function replaces a tool with a given number with a drilling tool.

The GetToolTwistDrill() gets the parameters of a drilling tool and can be used to check if a tool has already been defined.

Arguments

tool_number:
The number of the tool to be checked.
diameter:
The diameter of the cutting tool. Called Effective_cutting_diameter in the STEP-NC standard.
overall_assembly_length:
The total length of the tool – used for collision detection.
functional_length:
The functional length used for 5-axis compensation calculations.
max_depth_of_cut:
The maximum allowed depth of cut for this tool.
point_angle:
The angle at the tip of the drill.

Related Functions

Common Errors

DefineToolEndmill(), DefineToolEndmillNumber(), FindOrMakeEndmill(), GetToolEndmill()

void DefineToolEndmill(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double num_effective_teeth,
	double cutting_edge_angle
	);

void DefineToolEndmillNunber(
	System::Int64 tool_number,
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double num_effective_teeth,
	double cutting_edge_angle
	);

void FindOrMakeEndmill(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double num_effective_teeth,
	double cutting_edge_angle
	);

void GetToolEndmill(
	System::Int64 tool_number,
	[System::Runtime::InteropServices::Out] double %ret_diameter,
	[System::Runtime::InteropServices::Out] double %ret_overall_assembly_length,
	[System::Runtime::InteropServices::Out] double %ret_functional_length,
	[System::Runtime::InteropServices::Out] double %ret_max_depth_of_cut,
	[System::Runtime::InteropServices::Out] double %ret_num_effective_teeth,
	[System::Runtime::InteropServices::Out] double %ret_cutting_edge_angle
	);

The DefineToolEndmill() function defines an endmill with the given parameters.

The FindOrMakeEndmill() function finds an endmill with the given parameters and makes one if not found.

The DefineToolEndmillNumber() function replaces a tool with a given number with a milling tool.

The GetToolEndmill() function gets the parameters of an endmill and can be used to check if a tool has already been defined.

Arguments

tool_number:
The number of the tool being checked.
diameter:
The diameter of the cutting tool. Called Effective_cutting_diameter in the STEP-NC standard.
overall_assembly_length:
The total length of the tool – used for collision detection.
functional_length:
The functional length used for 5-axis compensation calculations.
max_depth_of_cut:
The maximum allowed depth of cut for this tool.
num_effective_teeth:
The number of flutes on the tool.
cutting_edge_angle:
The angle at the edge of the tool.

Related Functions

Common Errors

DefineToolFacemill(), DefineToolFacemillNumber(), FindOrMakeFacemill(), GetToolFacemill()

void DefineToolFacemill(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double num_effective_teeth,
	double cutting_edge_angle
	);

void DefineToolFacemillNumber(
	System::Int64 tool_number,
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double num_effective_teeth,
	double cutting_edge_angle
	);

void FindOrMakeFacemill(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	double num_effective_teeth,
	double cutting_edge_angle
	);

void GetToolFacemill(
	System::Int64 tool_number,
	[System::Runtime::InteropServices::Out] double %ret_diameter,
	[System::Runtime::InteropServices::Out] double %ret_overall_assembly_length,
	[System::Runtime::InteropServices::Out] double %ret_functional_length,
	[System::Runtime::InteropServices::Out] double %ret_max_depth_of_cut,
	[System::Runtime::InteropServices::Out] double %ret_num_effective_teeth,
	[System::Runtime::InteropServices::Out] double %ret_cutting_edge_angle
	);

The DefineToolFacemill() function defines a facemill with the given parameters.

The FindOrMakeFacemill() function finds a facemill with the given parameters and makes one if not found.

The DefineToolFacemillNumber() function replaces a tool with a given number with a face milling tool.

The GetToolFacemill() function gets the parameters of an facemill and can be used to check if a tool has already been defined.

Arguments

tool_number:
The number of the tool being checked.
diameter:
The diameter of the cutting tool. Called Effective_cutting_diameter in the STEP-NC standard.
overall_assembly_length:
The total length of the tool – used for collision detection.
functional_length:
The functional length used for 5-axis compensation calculations.
max_depth_of_cut:
The maximum allowed depth of cut for this tool.
num_effective_teeth:
The number of flutes on the tool.
cutting_edge_angle:
The angle at the edge of the tool.

Related Functions

Common Errors

DefineToolFeedAndSpeed()

void DefineToolFeedAndSpeed(
	double tool_feedrate,
	double tool_spindle_speed
	);

The DefineToolFeedAndSpeed() function sets a default feed and speed for the current tool. The tool must be a milling cutting tool.

Arguments

feedrate:
The default federate for the tool in the current feederate units.
spindle_speed:
The default spindle speed for the tool in the current rotation units.

Related Functions

DefineToolHandOfCut()

void DefineToolHandOfCut(
	System::String^ left_right_or_neutral
	);

The DefineToolHandOfCut() function sets the hand of cut for the current tool. The tool must be a milling cutting tool.

Arguments

left_right_or_neutral:
The value left, right or neutral.

Related Functions

DefineToolMaterial()

void DefineToolMaterial(
	System::String^ standard_identifier,
	System::String^ material_identifier
	);

The DefineToolMaterial() function sets the material for the current tool. The tool must be a milling cutting tool.

Arguments

standard:
Reference standard that defines the material.
material:
Name of the material in the standard.

Related Functions

DefineToolRadius()

void DefineToolRadius(
	double radius
	);

The DefineToolRadius() function sets the edge_radius for the current tool. The tool must be a milling cutting tool.

Arguments

radius:
The edge radius for the tool.

Related Functions

Common Errors

DefineToolRotatingBoreTool(), DefineToolRotatingBoreNumber(), FindOrMakeRotatingBoreTool(), GetToolRotatingBoreTool()

void DefineToolRotatingBoreTool(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut
	);

void DefineToolRotatingBoreNumber(
	System::Int64 tool_number,
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut
	);

void FindOrMakeRotatingBoreTool(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut
	);

void GetToolRotatingBoreTool(
	System::Int64 tool_number,
	[System::Runtime::InteropServices::Out] double %ret_diameter,
	[System::Runtime::InteropServices::Out] double %ret_overall_assembly_length,
	[System::Runtime::InteropServices::Out] double %ret_functional_length,
	[System::Runtime::InteropServices::Out] double %ret_max_depth_of_cut,
	[System::Runtime::InteropServices::Out] double %	);

The DefineToolRotatingBoreTool() function defines a rotating, boring cutting tool with the given parameters.

The FindOrMakeRotatingBoreTool() function finds a boring tool with the given parameters and makes one if not found.

The DefineToolRotatingBoreToolNumber() function replaces a tool with a rotating, boring cutting tool.

The GetToolRotatingBoreToolNumber() function returns the parameters of a rotating, boring cutting tool.

Arguments

tool_number:
The tool number.
diameter:
The diameter of the cutting tool. Called Effective_cutting_diameter in the STEP-NC standard.
overall_assembly_length:
The total length of the tool – used for collision detection.
functional_length:
The functional length used for 5-axis compensation calculations.
max_depth_of_cut:
The maximum allowed depth of cut for this tool.

Related Functions

Common Errors

DefineToolStraightReamer(), DefineToolStraightReamerNumber(), FindOrMakeStraightReamer(), GetToolStraightReamer()

void DefineToolStraightReamer(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut
	);

void DefineToolStraightReamerNumber(
	System::Int64 tool_number,
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut
	);

void FindOrMakeStraightReamer(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut
	);

void GetToolStraightReamer(
	System::Int64 tool_number,
	[System::Runtime::InteropServices::Out] double %ret_diameter,
	[System::Runtime::InteropServices::Out] double %ret_overall_assembly_length,
	[System::Runtime::InteropServices::Out] double %ret_functional_length,
	[System::Runtime::InteropServices::Out] double %ret_max_depth_of_cut,

The DefineToolStraightReamer() function defines the parameters of a straight reamer tool (no taper).

The FindOrMakeStraightReamer() function finds a reamer with the given parameters and makes one if not found.

The DefineToolStraightReamerNumber() function replaces a tool with a straight reamer.

The GetToolStraightReamer() function returns the parameters of a straight reamer tool.

Arguments

Tool_number:
The tool number.
diameter:
The diameter of the cutting tool. Called Effective_cutting_diameter in the STEP-NC standard.
overall_assembly_length:
The total length of the tool – used for collision detection.
functional_length:
The functional length used for 5-axis compensation calculations.
max_depth_of_cut:
The maximum allowed depth of cut for this tool.

Related Functions

Common Errors

DefineToolTapping(), DefineToolTappingNumber(), FindOrMakeTapping(), GetToolTapping()

void DefineToolTapping(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	System::String^ thread_form_type,
	double pitch,
	double size
	);

void DefineToolTappingNumber(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	System::String^ thread_form_type,
	double pitch,
	double size
	);

void FindOrMakeTapping(
	double diameter,
	double overall_assembly_length,
	double functional_length,
	double max_depth_of_cut,
	System::String^ thread_form_type,
	double pitch,
	double size
	);

void GetToolToolTapping(
	System::Int64 tool_number,
	[System::Runtime::InteropServices::Out] double %ret_diameter,
	[System::Runtime::InteropServices::Out] double %ret_overall_assembly_length,
	[System::Runtime::InteropServices::Out] double %ret_functional_length,
	[System::Runtime::InteropServices::Out] double %ret_max_depth_of_cut,
	[System::Runtime::InteropServices::Out] System::String^ %ret_thread_type,
	[System::Runtime::InteropServices::Out] double %ret_thread_pitch,
	[System::Runtime::InteropServices::Out] double %ret_thread_size
	);

The DefineToolTapping() function defines the parameters of a tapping tool. A tapping tool is used to add a screw thread to a drilled hole.

The FindOrMakeTapping() function finds a tapping tool with the give parameters and makes one if not found.

The DefineToolTappingNumber() function replaces a tool with a thread tapper.

The GetToolTapping() function returns the parameters of a tapping tool.

Arguments

tool_number:
The tool number.
diameter:
The diameter of the cutting tool. Called Effective_cutting_diameter in the STEP-NC standard.
overall_assembly_length:
The total length of the tool – used for collision detection.
functional_length:
The functional length used for 5-axis compensation calculations.
max_depth_of_cut:
The maximum allowed depth of cut for this tool.
thread_form_type:
The form type described as a string.
pitch:
The pitch of the thread.
size:
The size of the thread.

Related Functions

Common Errors

DefineToolTouchProbe(), DefineToolTouchProbeNumber(), GetToolTouchProbe()

void DefineToolTouchProbe(
	double ball_radius,
	double overall_assembly_length,
	double styles_diameter
	);

void DefineToolTouchProbeNumber(
	System::Int64 tool_number,
	double ball_radius,
	double overall_assembly_length,
	double styles_diameter
	);

void GetToolTouchProbe(
	System::Int64 tool_number,
	[System::Runtime::InteropServices::Out] double %ret_ball_radius,
	[System::Runtime::InteropServices::Out] double %ret_overall_assembly_length,
	[System::Runtime::InteropServices::Out] double %ret_stylus_diameter
	);

The DefineToolTouchProbe() function defines the parameters of a touch probe tool. A touch probe is used to validate the coordinates of a workpiece model before, after or between machining.

The DefineToolTouchProbeNumber() function replaces the tool with the given number with this touch probe.

The GetToolTouchProbe() function returns the parameters of a touch probe.

Arguments

tool_number:
The tool number.
ball_radius:
The radius of the ball on the touch probe.
stylus_diameter:
The diameter of the stick that holds the ball.
overall_assembly_length:
The total length of the tool from the top of the stick to the bottom of the ball

Related Functions

Common Errors

DeleteAllUnusedTools()

void DeleteAllUnusedTools();

The DeleteAllUnusedTools() function deletes any tool definitions that are not currently used by a workingstep.

DeleteAllUnusedWorkpieces()

void DeleteAllUnusedWorkpieces();

The DeleteAllUnusedWorkpieces() function deletes any workpiece that is not currently used to define the geometry of a fixture, stock (as-is), final part (to-be) or cutting tool.

Related Functions

DeleteExecutable()

void DeleteExecutable(
	System::Int64 exe_id
	);

The DeleteExecutable() function deletes the given workingstep, nc function, workplan or selective from the STEP-NC program.

Arguments

ex_id:
The identity of the workinstep, workplan, nc function or selective to be deleted.

Related Functions

Common Errors

DeleteFixture()

void DeleteFixture(
	System::Int64 plan_id
	);

The DeleteFixture() function removes the fixture data from a workplan. After the deletion the workplan will have no fixture data or it will inherit its fixture data from its parent workplan. After the deletion the fixture may be deleted if it is not used by any other workplan.

Arguments

plan_id:
The identity of the workplan whose fixture reference is to be deleted.

Related Functions

DeleteToolParameters()

void DeleteToolParameters(
	System::Int64 tl_id
	);

The DeleteToolParameters() function deletes a tool description provided it is not being used by any workingstep.

Arguments

tl_id:
The identity of the tool to be deleted.

Related Functions

Common Errors

DeleteWorkpiece()

void DeleteWorkpiece(
	System::Int64 wp_id
	);

The DeleteWorkpiece() function deletes a specific workpiece. The finder contains many functions that can be used to find a workpiece. A workpiece may define geometry for an as-is, to-be or delta model, fixture or tool.

Arguments

wp_id:
The identity of the workpiece to be deleted.

Related Functions

Common Errors

EditAddPoint()

void EditAddPoint(	
	System::Int64 point_id,
	double x,
	double y,
	double z
);

The EditAddPoint() function adds a cartesian point to a polyline curve. If the curve is part of a toolpath then the new point will be in that toolpath.

The new toolpath must be valid after all the points have been added. There are two issues to consider. The first is that if the path is made up of many curves, for example a curve for the coordinates, a curve for the axis direction and a curve for the contact normals, then points must be added to all those curves as well. The second is that when a path is made up of a sequence of curves the end of the previous curve must be the start of the next.

Unfortunately these issues will not be detected until a system tries to render toolpaths again.

Arguments

point_id:
The identity of a polyline curve.
x, y, z:
Coordinate values for the added point.

Related Functions

Common Errors

EditChangePoint()

void EditChangePoint(	
	System::Int64 point_id,
	double x,
	double y,
	double z
);

The EditChangePoint() function replaces the coordinates in a cartesian point with a new set of values. The point may represent many kinds of data within the STEP-NC program. The most common case is for the point to represent a location on a tool path. However, it could also be an axis direction (in which case the values should be normalized) or a model boundary. In the latter case no checking will be made to make sure that the modified model is still valid.

Arguments

point_id:
The identity of a cartesian point.
x, y, z:
New coordinate values for the point.

Related Functions

Common Errors

EmptyOperation()

void EmptyOperation(
	);

The EmptyOperaion() function creates an empty operation for the current workingstep. Normally APT tries to avoid creating a new operation until new data has been presented to the interface. The EmptyOperation function forces any object that was previously being created to be finished / closed.

After the operation has been created it can be filled with data using many functions in the APT interface. This will be easier while the new operation continues to be the current operation.

EndWorkplan()

void EndWorkplan();

The APT object puts all new process items into the current workplan. When a new project is started a main_workplan is created and it is made the current workplan. When a new workplan is created using the NestWorkplan function it is added to the current workplan, then the current workplan is saved onto a stack and the new workplan becomes the current workplan. This procedure also applies to workplans that are selectives and parallels.

The EndWorkplan() function reverses this process by closing the current workplan, poping the last nested workplan of the stack and making it the current workplan.

Related Functions

Common Errors

EstimateDepths()

void EstimateDepths(
	System::Int64 wp_or_sh_id,
	[System::Runtime::InteropServices::Out] double %top,
	[System::Runtime::InteropServices::Out] double %bot,
	[System::Runtime::InteropServices::Out] double %front,
	[System::Runtime::InteropServices::Out] double %back,
	[System::Runtime::InteropServices::Out] double %left,
	[System::Runtime::InteropServices::Out] double %right,
	[System::Runtime::InteropServices::Out] System::Int64 %top_id,
	[System::Runtime::InteropServices::Out] System::Int64 %bot_id,
	[System::Runtime::InteropServices::Out] System::Int64 %front_id,
	[System::Runtime::InteropServices::Out] System::Int64 %back_id,
	[System::Runtime::InteropServices::Out] System::Int64 %left_id,
	[System::Runtime::InteropServices::Out] System::Int64 %right_id
	);

The EstimateDepths() function

ExecutableMoveAfter()

void ExecutableMoveAfter(
	System::Int64 exe_id,
	System::Int64 index,
	System::Int64 plan_id
	);

The ExecutableMoveAfter() function places an executable into a workplan after a given location function, and removes it from its old location

Arguments

exe_id:
The identity of the executable that is to be placed in the workplan. The executable may be a workingstep, workplan, NC function or selective.
index:
The location where the executable is placed. The first location is zero, so an argument value of "1" will make the the executable the second in the workplan. If the argument is less than zero then the executable will be first. If the argument is greater than the current size then the executable will be the last.

Related Functions

Common Errors

ExecutableReuse()

void ExecutableReuse(
	System::Int64 exe_id
	);

The ExecutableReuse() function repeats an executable by putting it into the current workplan. For example, if the same operation is needed in more than one alternative of a Selective.

Arguments

exe_id:
The identity of the executable that is to be repeated. The executable may be a workingstep, workplan, NC function or selective.

Related Functions

Common Errors

ExecutableReuseAfter()

void ExecutableReuseAfter(
	System::Int64 exe_id,
	System::Int64 index,
	System::Int64 plan_id
	);

The ExecutableReuseAfter() function repeats an executable at a given location in the STEP-NC program.

Arguments

exe_id:
The identity of the executable that is to be repeated. The executable may be a workingstep, workplan, NC function or selective.
index:
The desired position for the executable in the workplan.
plan_id:
The identity of the workplan that is to contain the new executable.

Related Functions

Common Errors

ExecutableWorkpieceAsIs()

void ExecutableWorkpieceAsIs(		
	System::Int64 ws_id,
	System::String^ file_name
	);

void ExecutableWorkpieceAsIs(		
	int ws_id,
	string file_name
	);

The ExecutableWorkpieceAsIs() function defines the geometry of a workingstep as-is volume from a STEP CAD file (AP203, AP214, or AP242). The model describes what the geometry of the workpiece should look like before the workingstep begins executing.

The function assumes that all of the geometry in the file should be the as-is model. Any STEP file can be used, and if it is a newer file then tolerances and dimensions can be included on the model. See the Tolerance object for more information.

The intent of the ExecutableWorkpieceAsIs, ExecutableWorkpieceToBe and ExecutableWorkpieceRemoval functions is to define additional geometry for a workingstep or other executable so that work instructions can be given to the operator.

Arguments

File name:
The name of the STEP file that defines a geometry model.
exe_id:
The identity of an workingstep, nc function, workplan or selective.

Related Functions

Common Errors

ExecutableWorkpieceRemoval()

void ExecutableWorkpieceRemoval(		
	System::Int64 ws_id,
	System::String^ file_name
	);

void ExecutableWorkpieceRemoval(		
	int ws_id,
	string file_name
	);

The ExecutableWorkpieceRemoval() function define a model of the geometry that will be removed while the workingstep is executing. See ExecutableWorkpieceAsIs for more information.

ExecutableWorkpieceReuseAsIs()

void ExecutableWorkpieceReuseAsIs(		
	System::Int64 ws_id,
	System::Int64 wp_id
	);

void ExecutableWorkpieceReuseAsIs(		
	int ws_id,
	int other_id
	);

The ExecutableWorkpieceReuseAsIs() function sets the As-Is geometry for an executable to a workpiece already in memory.

ExecutableWorkpieceReuseRemoval()

void ExecutableWorkpieceReuseRemoval(		
	System::Int64 ws_id,
	System::Int64 wp_id
	);

void ExecutableWorkpieceReuseRemoval(		
	int ws_id,
	int other_id
	);

The ExecutableWorkpieceReuseRemoval() function sets the Removal geometry for an executable to a workpiece already in memory.

ExecutableWorkpieceReuseToBe()

void ExecutableWorkpieceReuseToBe(		
	System::Int64 ws_id,
	System::Int64 wp_id
	);

void ExecutableWorkpieceReuseToBe(		
	int ws_id,
	int other_id
	);

The ExecutableWorkpieceReuseToBe() function sets the To-Be geometry for an executable to a workpiece already in memory.

ExecutableWorkpieceToBe()

void ExecutableWorkpieceToBe(			
	System::Int64 ws_id,
	System::String^ file_name
	);

void ExecutableWorkpieceToBe(			
	int ws_id,
	string file_name
	);

The ExecutableWorkpieceToBe() function defines a model of what the geometry of the workpiece should look like after the workingstep has finished executing. See ExecutableWorkpieceAsIs for more information.

ExportAP238CC1()

void ExportAP238CC1(
	System::String^ file_name
	);

The ExportAP238CC1() function

ExportWorkpiece/203/214/242()

System::Boolean ExportWorkpiece(
	System::Int64 wp_id,
	System::String^ file_name,
	System::Boolean keep_placement
	);

System::Boolean ExportWorkpiece203(
	System::Int64 wp_id,
	System::String^ file_name,
	System::Boolean keep_placement
	);

System::Boolean ExportWorkpiece214(
	System::Int64 wp_id,
	System::String^ file_name,
	System::Boolean keep_placement
	);

System::Boolean ExportWorkpiece242(
	System::Int64 wp_id,
	System::String^ file_name,
	System::Boolean keep_placement
	);

The ExportWorkpiece() function exports the geometry of a workpiece as a STEP CAD file so that it can be read by another application. The workpiece can be a rawpiece, fixture, in-process geoemetry or any other workpiece in the STEP-NC program.

When a STEP file is imported into a STEP-NC program it is given a placement so that it can be moved and rotated to its correct location within the context of the program. The keep_placement argument determines if the file is to be exported without this placement, and therefore in its original STEP context, or with the placement, and therefore in its STEP-nc context. If you wish to roundtrip data, then the workpiece should be exported without the placement.

The ExportWorkpiece_203() function exports the geometry as an AP203 file. This type of file can be read by most CAD systems. However, it will not include any semantic PMI for the workpiece.

The ExportWorkpiece_214() function exports the geometry as an AP214 file. This type of file can also be read by most CAD systems. However, it will not include any semantic PMI for the workpiece. AP214 is the more appropriate when the file is going to be read by an automotive CAD system.

The ExportWorkpiece_242() function exports the geometry as an AP242 file and will include any semantic PMI data defined for the workpiece. AP242 is a relatively new so not all CAD systems will be able to read the file.

The ExportWorkpiece() function writes the data as an AP242 file by default because this is the most appropriate type for digital manufacturing.

The ExportWorkpiece() returns a Boolean result which is set to true if the keep_placement was requested and the request was met. The request cannot be met when the top level of the assembly has multiple child assemblies, and no placement of its own.

Arguments

wp_id:
The identifier for a workpiece.
file_name:
File name for the STEP CAD file that is to contain the workpiece.
keep_placement:
If the file has a placement defining its STEP-NC context, then this placement shall be included in the export.

Related Functions

Common Errors

ExtendedNcFunction()

void ExtendedNcFunction(
	System::String^ label,
	System::String^ description
	);

The ExtendedNcFunction() function adds a user-defined NC function entry in the STEP-NC programs. Use of extended NC functions is strongly discouraged because they prevent portability.

Nevertheless there are situations where an extended NC function is the only solution. The two most common are while testing potential new STEP-NC functionality and to enable a unique feature of a unique machine.

Arguments

label:
An optional label for the new function.
description:
The text to be passed to the controller. Frequently the text describes a Macro that will be expanded on the controller

Related Functions

Common Errors

ExtendedNcFunctionAfter()

System::Int64 ExtendedNcFunctionAfter(
	System::String^ label,
	System::String^ description,
	System::Int64 index,
	System::Int64 plan_id
	);

The ExtendedNcFunctionAfter() function inserts an extended NC function into a given location in the STEP-NC program.

Arguments

Label:
An optional label for the new function.
Description:
The text to be passed to the controller of the chosen machine. Frequently the text describes a Macro that will be expanded on the controller
Index:
The desired position for the function in the workplan.
Plan_id:
The identity of the workplan that is to contain the new function. See Section for some important notes on how to use identifiers.

Related Functions

Common Errors

FacetStart(), FacetStatus()

void FacetStart();

void FacetStatus(
	[System::Runtime::InteropServices::Out] System::Int64 %shell_count_res,
	[System::Runtime::InteropServices::Out] System::Int64 %face_count_res
	);

The FacetStart() function starts the faceting of the models in a file. Normally the faceting does not start until a request is issued by one of the display functions in GeomView. However, when a model is very large, the time to make the facets may be significant. The FacetStart() function allows the faceting to begin as soon as the data is in memory.

The FacetStatus() function returns a count of the number of shells and faces waiting to be facetted. The facet engine uses multiple processors to perform the faceting. When the engine starts, they are put into a queue, and as each processor finishes the faceting of its current item, it begins the faceing of the next item in the queue.

The FacetStatus() function is expensive because it needs to interupt the running processors. We recommend its use for debugging purposes only.

Arguments

shell_count:
The number of shells (solids) remaining.
face_count:
The number of faces remaining.

Common Errors

Feedrate()

void Feedrate(	 
	double speed
	);

The Feedrate() function defines the feedrate to be used by all subsequent tool paths. The unit of the feedrate is given using the FeedrateUnit function.

If a toolpath is currently being constructed then it is finished and a new one is started for the next new geometry item with the new feedrate. If the system is currently in rapid mode then this mode is cancelled.

Arguments

Speed:
The value for the new speed. The feedrate function does nothing if the new feed is the same as the current speed and the system is not in rapid mode.

Related Functions

Common Errors

FeedrateCSS()

void FeedrateCSS(
	double value,
	double max
	);

The FeedrateCSS() function defines a constant spindle speed feedrate for turning applications.

If a toolpath is currently being constructed then it is finished and a new one is started with the new feedrate.

Arguments

Speed:
The value for the new speed. The feedrate function does nothing if the new feed is the same as the current speed.

Related Functions

Common Errors

FeedrateUnit()

void FeedrateUnit(		
	System::String^ unit
	);

void FeedrateUnit(		
	string unit
	);

The FeedrateUnit() function defines the feedrate units to be used for all subsequent tool paths and sets the current feedrate to 0. The function should be followed by a call to Feedrate to set a new feedrate value.

Arguments

Unit:
The unit to be used for future feedrates as described by one of the following strings:
  • mmps millimeters per second
  • mmpm millimeters per minute
  • cmps centimeters per second
  • mps meters per second
  • ips inches per second
  • ipm inches per minute
  • fps feet per second
  • fpm feet per minute
  • iprev inches per revolution
  • mmprev millimeters per revolution

Related Functions

Common Errors

Feedstop()

void Feedstop(
	double seconds
	);

The Feedstop() function defines a pause in the execution of a toolpath. If a toolpath is currently being constructed then it is finished and a new one is started for the next geometry item.

Arguments

Seconds:
The length of the pause in seconds.

Related Functions

Common Errors

FindWorkplan(), -Selective(), -NonSequential(), -Parallel()

System::int64 FindWorkplan(		
	System::String^ name
	);
System::int64 FindSelective(		
	System::String^ name
	);
System::int64 FindNonSequential(		
	System::String^ name
	);
System::int64 FindParallel(		
	System::String^ name
	);

The FindWorkplan() function find the workplan with the given name.

The FindSelective/NonSequential/Parallel() functions provide similar functionality for these objects.

Arguments

name:
The name of the required object

Common Errors

FindWorkingstep(), -Workpiece()

System::int64 FindWorkingstep(		
	System::String^ name
	);
System::int64 FindWorkpiece(		
	System::String^ name
	);

The FindWorkingstep() function find the workingstep with the given name.

The FindWorkpiece() functions provide similar functionality for these objects.

Arguments

name:
The name of the required object

Common Errors

FindAnyPlan(), -AnyExecutable()

System::int64 FindAnyPlan(		
	System::String^ name
	);
System::int64 FindAnyExecutable(		
	System::String^ name
	);

The FindAnyPlan() finds any kind of plan including workplans, selectives, non_sequentials and parallels.

The FindAnyExecutable() finds any kind of executable including all the types of plans, workingsteps and Nc_functions.

Arguments

name:
The name of the required object

Common Errors

FirstPathStartAxis()

void FirstPathStartAxis(
	double i,
	double j,
	double k
	);

The FirstPathStartAxis() function defines the initial values to be used for the tool axis at the start of a program or after the tool has been changed if no other axis has been given.

Arguments

i, j, k:
The components of the axis.

Related Functions

FirstPathStartPoint()

void FirstPathStartPoint(
	double x,
	double y,
	double z
	);

The FirstPathStartPoint() function defines a start point to be used for the tool path at the start of a program or after the tool has been changed if no other point has been given.

Arguments

x, y, z:
The coordinates of the point.

Related Functions

Fixture()

void Fixture(				
	System::String^ filename
	);

void Fixture(
	System::String^ filename,
	System::Int64 	plan_id
	);


void Fixture(				
	String filename,
	int plan_id  		(optional, default current)
	);

The Fixture() function defines a fixture for the current workplan or the explicitly given workplan using a CAD file. If a workplan has no fixture defined then it may be inherited from the parent workplan. A fixture is an assembly and may be defined as STEP AP203, AP214 or AP242.

Arguments

plan_id:
The identity of the workplan that is to be given the fixture.

Related Functions

GenerateToolGeometry(), -AllToolGeometry()

void GenerateToolGeometry();
void GenerateToolGeometry(
	System::Int64 tl_or_ws_id
	);

void GenerateAllToolGeometry(
	);

The GenerateToolGeometry() function generates a geometry model for a tool using the current values of its diameter, length and corner radius. See the process object for functions that can set and get these values.

The function without arguments generates tool geometry for the current tool and is appropriate for usage with an APT CL parser that has just defined a current tool.

The GenerateAllToolGeometry() function generates tool goemetry for any tool that currently has no geometry.

Arguments

tl_or_ws_id:
Internal object identifier for the tool or a workingstep that uses the tool.

GeometryForTool()

void GeometryForTool(			
	System::Int64 tl_id,
	System::String^ filename
	);

void GeometryForTool(			
	int tl_id,
	string filename
	);

The GeometryForTool() function imports tool geometry for an external STEP file.

Arguments

tl_id:
Internal object identifier for the tool
filename
STEP CAD file containing the tool geometry

GeometryForToolNumber()

void GeometryForToolNumber(		
	System::String^ file_name,
	System::Int64 number
	);

void GeometryForToolNumber(		
	string file_name,
	int number
	);

The GeometryForToolNumber() function is a simpler interface for the ToolGeometry and SetToolIdentifier functions. It is defined from these functions as follow as follows:

Step->GeometryForToolNumber (geometry_file, 1);
Is equivalent to:
Step->ToolGeometry (geometry_file, T1);
Step->SetToolIdentifier (1, T1);

This function assumes that tool numbers are integers. The other two functions allow the tool number to be any identifier. Geometry for tool number prepends a T to the tool number to define an identifier for the tool. Therefore, in the above example the tool will be given the identifier T1.

GetCNCexportActualFlutes()

System::Int64 GetCNCexportActualFlutes(
	System::Int64 tl_id
	);

The GetCNCexportActualFlutes() function

GetCNCexportExecSpeedprofileActive()

System::Boolean GetCNCexportExecSpeedprofileActive(
	System::Int64 ws_id
	);

The GetCNCexportExecSpeedprofileActive() function

GetCurrentFeed()

double GetCurrentFeed();

The GetCurrentFeed() function returns a double, the value last set using the Feedrate function. This is the current value of the feed variable and will be used for any new toolpath data until it is reset by another call to the Feedrate or FeedrateUnit function.

Related Functions

Common Errors

GetCurrentFixture()

System::Int64 GetCurrentFixture();	

int GetCurrentFixture();		 	

The GetCurrentFixture() function returns the integer identifier of the current fixture so that it can be used as an argument for the functions that work on any kind of workpiece. The return value will be zero if there is no current fixture.

Related Functions

Common Errors

GetCurrentFunction()

System::Int64 GetCurrentFunction();		

int GetCurrentFunction();		 	

The GetCurrentFunction() function returns the integer identifier of the object that is currently being used to define the machine functions for new tool paths and workingsteps. The machine functions are used to control attributes such as the coolant. If the coolant changes then a functions object with the new value is made the current functions object. The return value will be zero if there is no machine functions object.

Related Functions

Common Errors

GetCurrentLastExecutable()

System::Int64 GetCurrentLastExecutable();

The GetCurrentLastExecutable() function returns the integer identifier of the last executable. An executable may be a workingstep, an NC function, a workplan or a selective. The return value cannot be zero because every project contains at least one workplan.

Related Functions

Common Errors

GetCurrentLocation()

void GetCurrentLocation(
	[System::Runtime::InteropServices::Out] double %x,
	[System::Runtime::InteropServices::Out] double %y,
	[System::Runtime::InteropServices::Out] double %z,
	[System::Runtime::InteropServices::Out] double %i,
	[System::Runtime::InteropServices::Out] double %j,
	[System::Runtime::InteropServices::Out] double %k
	);

The GetCurrentLocation() function returns coordinates that will be used as the start position for the next geometry item.

Result

x, y, z:
Coordinates set by the last geometry item or by the FirstPathStartPoint function. If both these have not been set than the values (0, 0, 0) will be returned
i, j, k:
Axis set by the last geometry item or by the FirstPathStartAxis function. If bith these have not been set then the value (0, 0, 1) will be returned.

Related Functions

Common Errors

GetCurrentNormals()

void GetCurrentNormals(
	[System::Runtime::InteropServices::Out] double %sa,
	[System::Runtime::InteropServices::Out] double %sb,
	[System::Runtime::InteropServices::Out] double %sc,
	[System::Runtime::InteropServices::Out] double %rda,
	[System::Runtime::InteropServices::Out] double %rdb,
	[System::Runtime::InteropServices::Out] double %rdc
	);

The GetCurrentNormals() function

GetCurrentProject()

System::Int64 GetCurrentProject();

The GetCurrentProject() function returns the integer identifier of the current project so that it can be used to find that project at a later time. See Section for some important notes on how to use identifiers. The return value cannot be zero because every STEP-NC program contains a project.

Related Functions

Common Errors

GetCurrentRawpiece()

System::Int64 GetCurrentRawpiece();		

int GetCurrentRawpiece();		 	

The GetCurrentRawpiece() function returns the integer identifier of the current rawpiece so that it can be used as an argument for the functions that work on any kind of workpiece. See Section for some important notes on how to use identifiers. The return value will be zero if there is no current rawpiece.

Related Functions

Common Errors

GetCurrentSpeed()

double GetCurrentSpeed();

The GetCurrentSpeed() function returns a double giving the current value of the spindle speed variable. This value is set by the SpindleSpeed function and it is the value that will be used for any new toolpath data until it is reset by another call to the SpindleSpeed or SpindleSpeedUnit functions.

Related Functions

Common Errors

GetCurrentTech()

System::Int64 GetCurrentTech();		

int GetCurrentTech();		 	

The GetCurrentTech() function returns the integer identifier of the object that is currently being used to define the machine technology for new tool paths and workingsteps. The machine technology is used to control the feedrate and spindle speed of a tool path. The return value will be zero if there is no machine technology object.

Related Functions

Common Errors

GetCurrentTool()

System::Int64 GetCurrentTool();		

int GetCurrentTool();		 	

The GetCurrentTool() function returns the identifier of the current tool so that it can be used to find that tool at a later time. See Section for some important notes on how to use identifiers. The id returned by this function is NOT the tool number or the tool identifier. These values can be found using the GetToolNumber and GetToolIdentifier functions of the Finder object. The return value will be zero if there is no current tool.

Related Functions

Common Errors

GetCurrentToolpath()

System::Int64 GetCurrentToolpath();		

int GetCurrentToolpath();		 	

The GetCurrentToolpath() function returns the integer identifier of the current tool path so that it can be used to find that path at a later time. The return value will be zero if there is no current tool path.

The LoadTool, SpindleSpeed, Feedrate and Coolant functions require a new tool path to be started. Other functions may also require a new toolpath to be started. The GetCurrentToolpath() function is useful because it shows when the current path has changed, but in most cirumstances the Finder object contains much richer functionality for finding toolpaths.

Related Functions

Common Errors

GetCurrentWorkingstep()

System::Int64 GetCurrentWorkingstep();		

int GetCurrentWorkingstep();		 	

The GetCurrentWorkingstep() function returns the identifier of the current working step so that it can be used to find that step at a later time. The return value will be zero if there is no current workingstep.

The LoadTool and NestWorkplan require a new workingstep to be started. Other functions may also require a new working step to be started. The GetCurrentWorkingstep function is useful because it shows when the current workingstep has changed, but in most cirumstances the Finder object contains much richer functionality for finding workingsteps.

Related Functions

Common Errors

GetCurrentWorkpiece()

System::Int64 GetCurrentWorkpiece();	

int GetCurrentWorkpiece();		

The GetCurrentWorkpiece() function returns the integer identifier of the current workpiece so that it can be used to find that workpiece at a later time. The return value cannot be zero because there is always a current workpiece.

Every project must have a workpiece, but this workpiece need not have any geometry defined. When a project is first defined it is given a workpiece with a default name. The default name is unnamed workpiece. This name can be changed using the PartNo function, and the Workpiece function. The latter also defines geometry for the workpiece.

In a STEP-NC program there is a workpiece and there are generic workpieces and this can be confusing. Every geometry model is a workpiece so the rawpiece, fixture tool geometry models and in-process geometry models all count as workpieces in the generic sense.

In addition every workplan has a specific workpiece that is being made by the operations in that workplan. The workpiece of a workplan can be defined using the WorkplanWorkpiecePlacementAdd command. In most cases, however, a workplan just uses the default workpiece defined for the whole project by the Workpiece function.

Related Functions

Common Errors

GetCurrentWorkplan()

System::Int64 GetCurrentWorkplan();	

int GetCurrentWorkplan();		

The GetCurrentWorkplan() function returns the identifier of the current workplan. The return value cannot be zero because there is always a current workpiece. When a new project is started or an old project is read from a file, the current workplan is the main workplan of the project. The NestWorkplan and EndWorkplan functions change the current workplan.

Related Functions

Common Errors

GetExecutableIsEnabled()

System::Int64 GetExecutableIsEnabled(
	System::Int64 exe_id
	);

The GetExecutableIsEnabled() function returns the value of "enabled" flag for an executable. The default state is true, which means that the executable should be used when processing a STEP-NC program. If false, the executable should be omitted. This value is used by the Generate and Adaptive classes when processing programs.

See SetExecutableIsEnabled for more discussion.

GetExecutableIsReachable()

System::Int64 GetExecutableIsReachable(
	System::Int64 exe_id
	);

The GetExecutableIsReachable() function

GetExecutableWorkpieceAsIs()

System::Int64 GetExecutableWorkpieceAsIs(	
	System::Int64 ex_id
	);

int GetExecutableWorkpieceAsIs(			
	int ex_id
	);

The GetExecutableWorkpieceAsIs() function returns the identity of the workpiece that defines what the geometry of the part should look like before the workingstep begins executing. The return value will be zero if no geometry is defined.

The intent of the ExecutableWorkpieceAsIs, ExecutableWorkpieceToBe and ExecutableWorkpieceRemoval workpieces is to define additional geometry for a workingstep or other executable so that work instructions can be given to the operator.

Arguments

exe_id:
The identity of an workingstep, nc function, workplan or selective.

Related Functions

Common Errors

GetExecutableWorkpieceFixture()

System::Int64 GetExecutableWorkpieceFixture(	
	System::Int64 ex_id
	);

int GetExecutableWorkpieceFixture(		
	int ex_id
	);

The GetExecutableWorkpieceFixture() function

GetExecutableWorkpieceRemoval()

System::Int64 GetExecutableWorkpieceRemoval(	
	System::Int64 ex_id
	);

int GetExecutableWorkpieceRemoval(		
	int ex_id
	);

The GetExecutableWorkpieceRemoval() function returns the integer identifier of the workpiece that defines a model of what will be removed from the part while the workingstep is executing. See GetExecutableWorkpieceAsIs.

GetExecutableWorkpieceToBe()

System::Int64 GetExecutableWorkpieceToBe(	
	System::Int64 ex_id
	);

int GetExecutableWorkpieceToBe(			
	int ex_id
	);

The GetExecutableWorkpieceToBe() function returns the integer identifier of the workpiece that defines a model of what the part should look like after the workingstep has finished executing. See GetExecutableWorkpieceAsIs.

GetExecutableWorkpieceTool()

System::Int64 GetExecutableWorkpieceTool(
	System::Int64 ws_id
	);

The GetExecutableWorkpieceTool() function defines the tool of a workingstep and makes it possible for an application to get all of the geometries that are specific to a workinstep using the GetExecutableWorkpiece functions. See GetExecutableWorkpieceAsIs.

GetFrameDefinitionAllNext()

System::Int64 GetFrameDefinitionAllNext(
	System::Int64 index
	);

The GetFrameDefinitionAllNext() function

GetFrameDefinitionBestGuessForExecutable()

System::Int64 GetFrameDefinitionBestGuessForExecutable(
	System::Int64 exe_id
	);

The GetFrameDefinitionBestGuessForExecutable() function

GetFrameDefinitionCount()

System::Int64 GetFrameDefinitionCount();

The GetFrameDefinitionCount() function

GetID_from_UUID()

System::Int64 GetID_from_UUID( 
	System::String^ UUID
	);
int GetIDFromUUID( 
	string UUID
	);

The GetID_from_UUID function takes in a UUID and returns the internal (STEP Part 21) identity of an entity associated with that ID.

Arguments

UUID:
The Universally Unique IDentifier currently assigned to an entity. A UUID is a number that in practice will never be generated again.

Related Functions

GetSetupAllCount/Next()

System::Int64 GetSetupAllCount();

System::Int64 GetSetupAllNext(
	System::Int64 index
	);

The GetSetupAllCount() function returns a count of the number of setups in the project and the GetSetupAllNext() function returns the identity of the next setup in the project.

Arguments

index:
The position of the desired setup.

Common Errors

GetSetupBestGuessForExecutable()

System::Int64 GetSetupBestGuessForExecutable(
	System::Int64 exe_id
	);

The GetSetupBestGuessForExecutable() function

GetToolId()

System::Int64 GetToolId(	
	System::String^ tool_number
	);

int GetToolEID(			 
	string tool_number
	);

The GetToolId() function returns the entity id of the tool object associated with a tool number. APT programs identify a tool using a tool number. STEP programs identify an object using the entity id of its root in a STEP file. Functions in the API that build STEP-NC data from APT use the tool number. Most other functions using the entity id. Occassionally there may be situations where you need to use the entity id but only have the tool number. In these situations this function will give you the required entity id from the tool number.

Arguments

tool_number:
The tool number (as a string because STEP-NC allows any value for the number).

Related Functions

GetToolIdentifier()

System::String^ GetToolIdentifier(	
	System::String^ tool_number
	);

string GetToolIdentifier(		
	string tool_number
	);

The GetToolIdentifier() function returns the string identifier of a tool. This is the manufacturers name for the tool. This name is used to search for information about the tool in manufacturers catalogs and ISO 13399 files.

Arguments

tool_number:
The tool number (as a string because STEP-NC allows any value for the number).

Related Functions

Common Errors

GetToolNumber()

System::String^ GetToolNumber(		
	System::Int64 ws_or_tl_id
	);

string GetToolNumber(			
	int id
	);

System::Int64 GetToolNumberRange(	
    	[System::Runtime::InteropServices::Out] System::Int64 low
	);

System::Int64 GetToolNumberNext(	
    	System::Int64 seed
	);

System::Int64 GetToolNumberCurrent(	
	);

The GetToolNumber() function returns the tool number as a string. Traditionally this is an integer that corresponds to the position of the tool in a tool carousel. STEP-NC allows any string to be the tool number, but the APT Parser functions require the tool number to be an integer so the continued use of integers is strongly recommended.

The tool number should not be confused with the tool identifier. The tool identifier is a manufacturer’s name for a tool. There can be many instances of a tool with a particular identifier. Each instance will have a different number and be used in a different workingstep, but will share its manufacturers information with other tools that have the same identifier.

The GetToolNumberRange() function returns the lowest and highest tool numbers currently being used in the project.

The GetToolNumberNext() function returns the next available tool number in a project. This function will search the database to find the next available number after a seed value and will not perform well if called many times in a project containing a large number of tools.

The GetToolNumberCurrent() function returns the tool number of the current tool. The current tool is the one most recently made in the APTStepMaker and is the one being assigned to any new workingsteps. This currency behavior is dicated by the legacy functionality defined for APT when memory was tight and paper tape was a good storage medium.

Arguments

ws_or_tl_id:
The identity of a workingstep or tool.

Related Functions

Common Errors

GetToolProductId()

System::String^ GetToolProductId(		
	System::Int64 tool_number
	);

The GetToolProductId() function returns the entity-id of the product that defines the tool geometry. When the placement of the tool needs to be translated or rotated then this function can be used to obtain the product geometry.

Arguments

tool_number:
The identifying number of the tool.

Related Functions

Common Errors

GetUUID()

System::String^ GetUUID(	
	System::Int64 entity_id
	);

string GetUUID(			
	int EID
	);

The GetUUID() function returns the Universally Unique IDentifier currently assigned to an entity or NULL. A UUID is a number that in practice will never be generated again.

Arguments

entity_id:
The internal (STEP Part 21) identity of an entity.

Related Functions

Common Errors

GetWorkpieceBreakdown()/Security()/Set()

System::String^ GetWorkpieceBreakdown	
	int wp_id
	);

void GetWorkpieceBreakdownSet	
	int wp_id,
	System::String^ part_number
	);

System::String^ GetWorkpieceSecurity	
	int wp_id
	);

void GetWorkpieceSecuritySet	
	int wp_id,
	System::String^ security_level
	);

The GetWorkpieceBreakdown() function returns the part number for a workpiece breakdown. The GetWorkpieceBreakdownSet() sets the part number for a workpiece breakdown.

The GetWorkpieceSecurity() function returns the distribution permission for a workpiece breakdown. The GetWorkpieceSecuritySet() sets the distribution persmission for a workpiece breakdown. The following values are recommended for the breakdown distribution.

'Statement: A'
See US military definition
'unclassified'
no security necessary;
'classified'
security necessary, but the classification details are not given;
'confidential'
disclosure of information about the part or design would cause damage to national or organizational security;
'secret'
disclosure of information about the part or design would cause serious damage to national or organizational security;
'top secret'
disclosure of information about the part or design would cause exceptionally grave damage to national or organizational security;
'proprietary'
disclosure of information about the part or design would risk an organization's market or competitive advantage.

Arguments

wp_id:
The identity of a workpiece.
part_number:
Breakdown part number.
security_level:
Breakdown distribution security level.

Related Functions

See function in tolerance to set the material standard, hardness measurement and treatment result of a workpiece.

Common Errors

GetWorkpieceExecutableCount(), -Next(), -All()

System::Int64 GetWorkpieceExecutableCount(	
	System::Int64 wp_id
	);
System::Int64 GetWorkpieceExecutableNext(
	System::Int64 wp_id,
	System::Int64 index
	);


int[] GetWorkpieceExecutableAll(		
	int wp_id
	);

The GetWorkpieceExecutableCount() function returns the number of workingsteps and workplans that refer to the workpiece. The workpiece might appear as the "as-is" shape, the "to-be" shape, or the "removal/delta" shape.

The GetWorkpieceExecutableNext() function iterates over the executables and returns the one at a given index.

Arguments

wp_id:
The identity of a workpiece.
index:
The position of the desired executable.

GetWorkpiecePlacement()

void GetWorkpiecePlacement(			
	System::Int64 wp_id,
	[System::Runtime::InteropServices::Out] double %x,
	[System::Runtime::InteropServices::Out] double %y,
	[System::Runtime::InteropServices::Out] double %z,
	[System::Runtime::InteropServices::Out] double %i,
	[System::Runtime::InteropServices::Out] double %j,
	[System::Runtime::InteropServices::Out] double %k,
	[System::Runtime::InteropServices::Out] double %a,
	[System::Runtime::InteropServices::Out] double %b,
	[System::Runtime::InteropServices::Out] double %c
	);


double[9] GetWorkpiecePlacement(		
	int wp_id
	);

returns: [x,y,z,i,j,k,a,b,c]

The GetWorkpiecePlacement() function returns the axis placement that currently defines the position and orientation of a geometry model. See the PutWorkpiecePlacement function for a description of the parameters used to set the position and orientation. This function returns the current value of these parameters

The Node version of this function returns a nine element array of doubles, with the [x,y,z,i,j,k,a,b,c] values.

Arguments

id
The identity of a model. The model may be a fixture, tool rawpiece or workpiece and it may describe the as-is, to-be or removal volumes for a workingstep, workplan or executable.

Result

x, y, z
The coordinates of the placement point.
i, j, k
The coordinates of the placement z axis.
a, b, c
The coordinates of the placement x axis

Related Functions

Common Errors

GetWorkpieceShapeCount(), -Next()

System::Int64 GetWorkpieceShapeCount(
	System::Int64 wp_id
	);

System::Int64 GetWorkpieceShapeNext(
	System::Int64 wp_id,
	System::Int64 index
	);

The GetWorkpieceShapeCount() function returns a count of the number of geometry models in the assembly that defines a workpiece.

The GetWorkpieceShapeNext() function iterates over the geometry models in the assembly and returns the one at a given index.

Arguments

wp_id:
The identity of a workpiece.
index:
The position of the desired model.

Related Functions

Common Errors

GetWorkplanSetup()

double[9] GetWorkplanSetup(		
	int plan_id
	);

returns: [x,y,z,i,j,k,a,b,c]

The GetWorkplanSetup() function gets the coordinates of a Workplan setup. The placement is given by a origin coordinate and direction vectors for the Z axis and X axis. See PutWorkplanSetup for changing the coordinates.

See WorkplanSetupGet/Put() for the equivalent .NET function.

Arguments

plan_id:
The identity of the workplan.
x, y, z:
The origin of the placement.
i, j, k:
The Z axis direction of the placement.
a, b, c:
The X axis direction of the placement.

GoHome()

void GoHome(
	System::String^ label
	);

The GoHome() function adds a "Rapid home" NC function to the current workplan. The rapid home function positions all machine axes to the machine-defined home position in the absolute machine coordinate system with a pre-defined sequence.

Arguments

label:
A label for the new function

Related Functions

Common Errors

GoHomeAfter()

System::Int64 GoHomeAfter(
	System::String^ label,
	System::Int64 index,
	System::Int64 plan_id
	);

The GoHomeAfter() function adds a "rapid home" NC function at chosen location in a workplan. The rapid home function positions all machine axes to the machine-defined home position in the absolute machine coordinate system with a pre-defined sequence.

Arguments

label:
A label for the new function
index:
The position relative to the start of the workplan where the workingstep is to be placed. If the index is less than 0 then it will be placed at the start of the workplan. If it is equal to or greater than the size of the workplan then it will be placed after the end. Otherwise it will be placed after the item in the current position.
plan_id:
The identifier of the workplan into which the workingstep is to be inserted. See Seciton for a description of how to use identifiers.

Related Functions

Common Errors

GoToXYZ()

void GoToXYZ(				
	System::String^ label,
	double x,
	double y,
	double z
	);

void GoToXYZ(				
	string label,
	double x,
	double y,
	double z
	);

The GoToXYZ() function adds a line to the current tool path. The tool path is assumed to have a current point defined by the last geometry item added to the path. The GOTO function moves the cutting tool head to a new point that then becomes the current point for the next geometry command.

If the current workplan does not contain any workingsteps then one will be created with the current tool. If the workingstep does not contain any tool paths then one will be created. The toolpath will be given the current feedrate and spindle speed.

If this is the very first point after the tool has been changed and if coordinates have been set using the FirstPathStartPoint function then these coordinates will be used as the start point for the new tool path and the new point will be added as the second point.

If this is the very first point after a tool change and no point has been defined using the FirstPathStartPoint function then the given point will be repeated if necessary so that the new tool path does not contain a single point (because this is illegal in STEP-NC).

If no feedrate has been defined then the feedrate will be zero. If no spindle speed has been defined then the spindle speed will be zero. If no tool has been loaded then the tool number will be zero.

Arguments

label:
A string argument that defines a name for the geometry item. Typically this will be the empty string but it can be an identifier to help another application find the item.
x, y, z:
The x, y, z coordinates of the end point of the line.

Related Functions

Common Errors

GoToXYZ_ABC()

void GoToXYZ_ABC(				
	System::String^ label,
	double x, double y, double z,
	double a, double b, double c
	);

void GoToXYZ_ABC(				
	string label,
	double x, double y, double z,
	double a, double b, double c
	);

The GoToXYZ_ABC() function is the same as the GoToXYZ function but with a normal vector defined for the point of contact between the cutting tool and the workpiece.

The contact normal is used to calculate a five-axis displacement for the move by cutter compensation algorithms.

Arguments

x, y, z:
The x, y, z coordinates of the end point of the line.
a, b, c:
(i, j, k) components for the cutter compensation direction.

Common Errors

GoToXYZ_IJK()

void GoToXYZ_IJK(				
	System::String^ label,
	double x, double y, double z,
	double i, double j, double k
	);

void GoToXYZ_IJK(				
	string label,
	double x, double y, double z,
	double i, double j, double k
	);

The GoToXYZ_IJK() function is the same as the GoToXYZ function but with a new direction of the tool axis.

If the current tool path does not have an ijk component then a new one is started. If the current tool path has ijk components and the GoToXYZ function is subsequently used to add a point then the ijk value of the previous point will be used for the new point.

Arguments

x, y, z:
The x, y, z coordinates of the end point of the line.
i, j, k:
Components of the tool axis direction.

Related Functions

Common Errors

GoToXYZ_IJK_ABC()

void GoToXYZ_IJK_ABC(				
	System::String^ label,
	double x, double y, double z,
	double i, double j, double k,
	double a, double b, double c
	);

void GoToXYZ_IJK_ABC(				
	string label,
	double x, double y, double z,
	double i, double j, double k,
	double a, double b, double c
	);

The GoToXYZ_IJK_ABC() function is the same as the GoToXYZ function but with a vector defined for the direction of the tool axis, and a vector defined for normal of the point of contact.

If the current tool path does not have an abc component then a new one is started. If the current tool path has abc components and the next point does not then the current tool path is ended and a new one is started.

Arguments

x, y, z:
The x, y, z coordinates of the end point of the line.
i, j, k:
Components of the tool axis direction.
a, b, c:
(i, j, k) components for the cutter compensation direction.

GoToXYZ_IJK_REF_ABC()

void GoToXYZ_IJK_REF_ABC(			
	System::String^ label,
	double x, double y, double z,
	double i, double j, double k,
	double a, double b, double c
	);

void GoToXYZ_IJK_REF_ABC(			
	string label,
	double x, double y, double z,
	double i, double j, double k,
	double a, double b, double c
	);

The GoToXYZ_IJK_REF_ABC() function is the same as the GoToXYZ function but with a vector defined for the direction of the tool axis, and a reference vector defined for the X axis of the tool. This is only useful for non-rotating tools like CNC tape-laying heads.

Arguments

x, y, z:
The x, y, z coordinates of the end point of the line.
i, j, k:
Components of the tool Z axis direction.
a, b, c:
(i, j, k) components for the tool X axis direction.

ImportFanuc()

void ImportFanuc(
	System::String^ file_name
	);

The ImportFanuc() function reads a Fanuc G code file and converts it contents to an AP-238 tool path. By default a new workingstep is created for each tool and spinde speed change and a new tool path is created for each feed change. The new workingsteps are added to the current workplan.

There are many flavors to ISO 6983 files. Please check the results of this function and contact STEP Tools if there are any issues.

Arguments

file_name:
File name for the file that contains the codes.

Related Functions

Common Errors

ImportHaas()

void ImportHaas(
	System::String^ file_name
	);

The ImportHaas() function reads a Haas G-code file. See the ImportFanuc function for details.

ImportSiemens()

void ImportSiemens(
	System::String^ file_name
	);

The ImportSiemens() function reads a Siemens G-code file. See the ImportFanuc function for details.

ImportToolParametersFromSTRL()

System::Int64 ImportToolParametersFromSTRL(
	System::Int64 ws_id
	);

The ImportToolParametersFromSTRL() function

ImportWorkingstepOperationFromSTRL()

System::Int64 ImportWorkingstepOperationFromSTRL(
	System::Int64 ws_id
	);

The ImportWorkingstepOperationFromSTRL() function

ImportWorkingstepPaths()

void ImportWorkingstepPaths(
	System::Int64 ws_id,
	System::String^ file_name
	);

The ImportWorkingstepPaths() function

ImportWorkpiecesFromSTRL()

System::Int64 ImportWorkpiecesFromSTRL(
	System::Int64 exe_id,
	[System::Runtime::InteropServices::Out] System::Int64 %asis_id
	);

The ImportWorkpiecesFromSTRL() function

ImportWorkplanFromFile()

void ImportWorkplanFromFile (
	System::Int64 wp_id,
	System::String^ file_name
	);

The ImportWorkplanFromFile() function reads the project another file and adds all the executables in the main workplan of that project to the end of a given workplan in the current file. The tools of the other project are also added to the current project and given a negative tool number to indicate that they are imported. If the same project is imported twice then the same executables will be added twice. No attempt is made to determine if the new tools are duplicates of tools currently in the project.

Arguments

wp_id:
Enclosing workplan to contain the imported process.
file_name:
File name for the file that contains the codes.

Related Functions

Common Errors

ImportWorkplanFromSTRL()

System::Int64 ImportWorkplanFromSTRL(
	System::Int64 wp_id
	);

The ImportWorkplanFromSTRL() function

Inches()

void Inches();		 

The Inches() function sets the internal unit for subsequent measurement items to inches. Any tool path defined in an APT file or an ISO 6983 file will be given this unit until it is reset by another call.

Unlike the DefaultToInches function, the Inches function requires the units for subsequent items to be inches. The DefaultToInches function defines a default for the APT parsers when no other units have been defined.

Internally the system stores data in inch units or millimeter units. If an external file is found with other units then they are converted to one of these units.

Related Functions

Common Errors

IndexTable()

void IndexTable(
	System::String^ label,
	System::Int64 index_value
	);

The IndexTable() function adds an NC operation to advance the machine table. In CNC programs an Index Table function tells the CNC control to rotate an index table to a new position so that another part of the workpiece can be machined.

The index table function is highly machine dependent because the meaning of the index value depends on the machine tool. Like the Extended NC function, this function should be avoided whenever possible. The WorkplanWorkpiecePlacementAdd function defines a machine independent way to change the setup.

Arguments

label:
An optional label for the new function.
index_value:
The required position of the index.

Related Functions

Common Errors

IndexTableAfter()

System::Int64 IndexTableAfter(
	System::String^ label,
	System::Int64 index_value,
	System::Int64 index,
	System::Int64 plan_id
	);

The IndexTableAfter() function inserts an Index table function into a given location in the STEP-NC program. See IndexTable for more discussion.

Arguments

label:
An optional label for the new function.
index_value:
The required position of the table index.
index:
The desired position for the function in the workplan.
plan_id:
The identity of the workplan that is to contain the new function. See Section for some important notes on how to use identifiers.

Related Functions

Common Errors

IsToolDefined()

System::Boolean IsToolDefined(			
	System::Int64 tool_number
	);

boolean IsToolDefined(				
	int tool_number
	);

The IsToolDefined() function returns a flag indicating if a tool with the given tool number exists in the STEP-NC program.

Arguments

tool_number:
The number of the tool whose existence is to be tested

Related Functions

Common Errors

LastPointInclude(), -Ignore()

void LastPointInclude();

void LastPointIgnore();

The LastPoint functions set an internal status mode for tool path generation. If LastPointInclude is true then a rapid toolpath is generated to connect workingsteps when APT files are being translated. This path helps to show the sequence of the steps. If LastPointIgnore is true then no rapid path is generated which makes it eaier to change the order of the steps in a program.

The default is LastPointInclude.

Related Functions

Common Errors

Left()

void Left();

The Left() function implements the simple case for cutter contact machining where the workpiece is on the left side of the tool as seen from the perspective of someone walking in the direction of the tool.

After the function has been set an appropriate ABC contact vector is generated for each new geometry item added to the toolpath

Related Functions

Common Errors

LoadTool()

void LoadTool(				
	System::Int64 tool_number
	);

void LoadTool(				
	int tool_number
	);

The LoadTool() function inserts an NC function to change the tool into the current workplan. The new tool becomes the current tool for the next workingstep. If a workingstep is open then it is closed.

Arguments

tool_number:
The number of the tool that is to be the tool for the new workingstep

Related Functions

Common Errors

LoadToolWithLength()

void LoadToolWithLength(
	System::Int64 tool_number,
	double overall_assembly_length
	);

The LoadToolWithLength() function sets the functional length of the tool before making it the current tool for the next workingstep.

Arguments

tool_number:
The tool number.
length:
The length of the tool in the current units.

Related Functions

Common Errors

LoadToolWithRadius()

void LoadToolWithLength(
	System::Int64 tool_number,
	double corner_radius
	);

The LoadToolWithRadius() function sets the corner radius of the tool before making it the current tool for the next workingstep.

Arguments

tool_number:
The tool number.
radius:
The corner radius in the current units.

Related Functions

Common Errors

MergeFollowingWorkingstep()

void MergeFollowingWorkingstep(
	System::Int64 wp_id,
	System::Int64 index
	);

The MergeFollowingWorkingstep() function merges two consecutive workingsteps if they use the same tool. After the merger the second workingstep is deleted.

Arguments

wp_id:
The workplan containing the workingstep
index:
The position of the first workingstep

Related Functions

Common Errors

MergeFollowingWorkingstepAll()

void MergeFollowingWorkingstepAll(
	System::Int64 wp_id,
	System::Int64 index
	);

The MergeFollowingWorkingstepAll() function merges a list of consecutive workingsteps until one is found that does not use the same tool.

Arguments

wp_id:
The workplan containing the workingstep
index:
The position of the first workingstep

Related Functions

Common Errors

MergeWorkingstep()

void MergeWorkingstep(
	System::Int64 ws1_id,
	System::Int64 ws2_id
	);

The MergeWorkingstep() function merges two workingsteps if they use the same tool.

Arguments

ws1_id:
The workingstep to contain all the data
ws2_id:
The workingstep to be merged and deleted

Related Functions

Common Errors

Millimeters()

void Millimeters();	 

See Inches.

MultaxOn(), -Off()

void MultaxOn();
void MultaxOff();

The MultaxOn() function currently has no effect. In the future it might be used to force the inclusion of i, j, k coordinates in the tool path. The current semantics is for i, j, k to be included in a toolpath only after a point has been defined using the GoToXYZ_IJK or GoToXYZ_IJK_ABC functions.

The MultaxOff() function turns i, j, k tool axis generation off. After a point has been defined using the GoToXYZ_IJK function the STEP-NC API assumes that all subsequent points should include tool axis data. The MultaxOff function stops this behavior.

NestNonSequentialAfter()

System::Int64 NestNonSequentialAfter (
	System::String^ nonseq_name,
	System::Int64 index,
	System::Int64 plan_id
	);

The NestNonSequentialAfter() function creates a non-sequential and inserts it into a program structure in the same way as the NestWorkplan function. This function returns the identifier of the new non-sequential.

Arguments

name:
The name of the new non-sequential. We recommend giving every program structure a meaningful name.
index:
The position where the new non-sequential is to be inserted in the program structure identified by the plan_id argument. The first position is 0 and the last position is the current size of the structure - 1. The new item is inserted after the given index position. If the index is greater than current size – 1 then the new NonSequential is inserted at the end of the structure. If the index is less than 0 then the new NonSequential is inserted at the start of the structure.
plan_id:
The id of the program structure that is going to contain the new NonSequential.

NestParallelAfter()

System::Int64 NestParallelAfter (
	System::String^ par_name,
	System::Int64 index,
	System::Int64 plan_id
	);

The NestParallelAfter() function creates a parallel and inserts it into a program structure in the same way as the NestWorkplan function. This function returns the identifier of the new Parallel.

Arguments

name:
The name of the new parallel. We recommend giving every program structure a meaningful name.
index:
The position where the new parallel is to be inserted in the program structure identified by the plan_id argument. The first position is 0 and the last position is the current size of the structure - 1. The new item is inserted after the given index position. If the index is greater than current size – 1 then the new Parallel is inserted at the end of the structure. If the index is less than 0 then the new Parallel is inserted at the start of the structure.
plan_id:
The id of the program structure that is going to contain the new Parallel.

NestSelectiveAfter()

System::Int64 NestSelectiveAfter (
	System::String^ sel_name,
	System::Int64 index,
	System::Int64 plan_id
	);

The NestSelectiveAfter() function creates a selective and inserts it into a program structure in the same way as the NestWorkplan function. This function returns the identifier of the new Selective.

Arguments

name:
The name of the new selective. We recommend giving every program structure a meaningful name.
index:
The position where the new selective is to be inserted in the program structure identified by the plan_id argument. The first position is 0 and the last position is the current size of the structure - 1. The new item is inserted after the given index position. If the index is greater than current size – 1 then the new Selective is inserted at the end of the structure. If the index is less than 0 then the new Selective is inserted at the start of the structure.
plan_id:
The id of the program structure that is going to contain the new Selective.

NestWorkplanAfter()

System::Int64 NestWorkplanAfter(
	System::String^ plan_name,
	System::Int64 index,
	System::Int64 wp_id
	);

The NestWorkplanAfter() function operates in the same way as the NestWorkplan function and allows the position of the new workplan to be selected by the user. This function returns the identifier of the new Workplan.

Arguments

name:
The name of the new workplan. We recommend giving every workplan a meaningful name.
index:
The position where the new workplan is to be inserted in the workplan (which may be a selective or paralllel) identified by the plan_id argument. The first position is 0 and the last position is the current size of the workplan - 1. The new item is inserted after the given index position. If the index is greater than current size – 1 then the new workplan is inserted at the end of the old plan. If the index is less than 0 then the new workplan is inserted at the start of the old workplan.
plan_id:
The id of the workplan or selective that is going to contain the new workplan.

NestWorkplan(), -Selective(), -Parallel(), -NonSequential()

void NestWorkplan(
	System::String^ plan_name
	);
void NestSelective(
	System::String^ plan_name
	);
void NestNonSequential(
	System::String^ plan_name
	);
void NestParallel(
	System::String^ plan_name
	);

The NestWorkplan() function creates a new workplan and makes it the current workplan for all subsequent operations. This function returns the identifier of the new Workplan.

The default is for the new workplan to be sequential. A Selective workplan (select one) is made using the NestSelective() function. A Concurrent workplan is made using the NestParallel() function. An unordered workplan is made using the NestNonSequential() function.

The new plan is put into the old workplan (selective or paralle). The old workplan is kept on a stack so that it can become the current workplan again when this workplan is ended. See EndWorkplan for details.

The workplan is the basic data structure of a STEP-NC program. A workplan describes a sequence of workingsteps, NC functions and other workplans that are to be executed in order. Every STEP-NC program has a special workplan called the main_workplan that defines the start of the program. The NestWorkplan function allows other workplans to be created.

Arguments

name:
workplan a meaningful name because they are seen by users.

Related Functions

Common Errors

NewProject()

void NewProject(			
	System::String^ project_name
	);

void NewProject(			
	string file_name
	);

The NewProject() function creates a new STEP-NC program with an empty workpiece and an empty main workplan. The workplan is given the name main workplan and its workpiece is given the name unnamed workpiece. The new project can then be populated with data taken from STEP CAD files, APT files and other data sources.

The default feeds and speeds for the new project will be 0. The default tool number for the first tool will be 0.

Arguments

project_name:
The name to be used for the project. If the new project has to be saved to a file and no other file name is given then the project name will be used as the file name.

Related Functions

Common Errors

NewProjectWithCCandWP()

void NewProjectWithCCandWP(
	System::String^ project_name,
	System::Int64 conformance_class,
	System::String^ top_workplan_name
	);

The NewProjectWithCCandWP() function is a version of the NewProject function allows the new main workplan in the new project to be given a name.

Arguments

project_name:
The name to be used for the project. If the new project has to be saved to a file and no other file name is given then the project name will be used as the file name.
conformance_class:
1, 2, 3 or 4 for the four conformance classes allowed by AP-238. This value is not currently used.
top_workplan_name:
The name for the main workplan of the new project.

Currently the conformance class is not used anywhere in the API. In the future it may be used to restrict the kinds of data that can be created by an application. The full details about what is allowed in the different conformance classes are described in the AP-238 standard. The following is a summary.

NewProjectWithCCandWP()

void NewProjectWithCCandWP(
	System::String^ project_name,
	System::Int64 conformance_class,
	System::String^ top_workplan_name
	);

The NewProjectWithCCandWP() function is a version of the NewProject function allows the new main workplan in the new project to be given a name.

Arguments

project_name:
The name to be used for the project. If the new project has to be saved to a file and no other file name is given then the project name will be used as the file name.
conformance_class:
1, 2, 3 or 4 for the four conformance classes allowed by AP-238. This value is not currently used.
top_workplan_name:
The name for the main workplan of the new project.

Currently the conformance class is not used anywhere in the API. In the future it may be used to restrict the kinds of data that can be created by an application. The full details about what is allowed in the different conformance classes are described in the AP-238 standard. The following is a summary.

NonSequentialRandomize()

void NonSequentialRandomize(
	System::Int64 exe_id
	);

The NonSequentialRandomize() function changes the order of the executables in a NonSequential program structure.

Non-sequential structures should be used when the order of the executables in a workplan has not yet been determined or does not matter. This function changes the order to emphasize that it is random.

Arguments

exe_id
The identity of a non-sequential structure.

Open224()

void Open224(
	System::String^ file_name
	);

The Open224() function reads an AP-224 file and uses the workpiece and rawpiece data in that file to create an AP-238 project with that workpiece and rawpiece. The AP-238 project will have an empty workplan.

AP-224 is the STEP protocol for manufacturing features. Therefore, the new project will have a workpiece that contains features.

Arguments

File_name:
The name of the file that contains the AP-224 data.

Related Functions

Common Errors

Open224andMakeWorkingSteps()

void Open224andMakeWorkingSteps(
	System::String^ file_name
	);

The Open224andMakeWorkingSteps() function is a version of the Open224 function creates a workingstep for each feature in the AP-224 file. This makes the AP-224 data easier to browse, but it is unlikely to be a satisfactory organization if the intention is to develop an AP-238 file for machining the data because the correspondence between AP-224 features and machining operations is rarely one to one.

Arguments are the same as Open224

OpenProject()

void OpenProject(			
	System::String^ file_name
	);

void OpenProject(			
	string file_name
	);

The OpenProject() function reads a STEP-NC file.

If your plan is to navigate and process the data in the project then the Finder object has many more functions for finding data than APT. If your plan is to add data to the file then the Process object has functionality for modifying the process, and the Tolerance object has functionality for defining design constraints. Process and Tolerance use APT to read their data.

In earlier versions, this function was called Open238() and OpenSTEPNC()

Arguments

File_name:
The name of the file that contains the STEP-NC data.

Related Functions

Common Errors

OpenCheckSTRL()

System::Int64 OpenCheckSTRL(
	System::String^ strl
	);

The OpenCheckSTRL() function

OpenSTEP()


void OpenSTEP(				
	System::String^ file_name
	);

void OpenSTEP(				
	string file_name
	);

The OpenSTEP() function opens a STEP file for viewing and editing. Tolerances and other GD&T information may be defined for the file using the API of the tolerance object.

Related Functions

OpenUsingSTRL()

void OpenUsingSTRL(
	System::String^ strl
	);

The OpenUsingSTRL() function

OptionalStop()

void OptionalStop(
	System::String^ label
	);

The OptionalStop() function adds the Optional Stop NC function to the current workplan. The Optional Stop function indicates to the operator that the program can be stopped. In many situations it is best not to include this function in a program but instead allow the user to decide if an optional stop should be defined at the end of each workingstep during code conversion.

If a workingstep and toolpath is open when an NC function is added then that workingstep and toolpath will be ended.

Arguments

Label:
A label that can be used to identify the optional stop.

Related Functions

Common Errors

OptionalStopAfter()

System::Int64 OptionalStopAfter(
	System::String^ label,
	System::Int64 index,
	System::Int64 plan_id
	);

The OptionalStopAfter() function adds the Optional Stop NC function to a given location in the STEP-NC program.

Arguments

Label:
A label for the new function
Index:
The position relative to the start of the workplan where the workingstep is to be placed. If the index is less than 0 then it will be placed at the start of the workplan. If it is equal to or greater than the size of the workplan then it will be placed after the end. Otherwise it will be placed after the item in the current position.
Plan_id:
The identifier of the workplan into which the workingstep is to be inserted. See Seciton for a description of how to use identifiers.

Related Functions

Common Errors

PartNo()

void PartNo(				
	System::String^ partname
	);

void PartNo( 				
	string partname
	);

The PartNo() function sets the name of the workpiece. It does not change any other attributes of the workpiece so if the geometry of the workpiece has been defined using the Workpiece function then that geometry will continue to be used but with the new workpiece name.

Arguments

PartName:
The name to be given to the Workpiece.

Related Functions

Common Errors

PPrint()

void PPrint(
	System::String^ label,
	System::String^ message
	);

The PPrint() function defines an NC function display message that is to be shown to the user during the execution of the STEP-NC program.

If a workingstep and toolpath is open when an NC function is added then that workingstep and toolpath will be ended. The next operation will then start a new workingstep. Sometimes this leads to empty workingsteps being included in a program. If this behavior is undesirable then the SetDisplayMessagesOn/Off functions can be used to stop the workingstep being interrupted.

Arguments

Label:
A label that can be used to identify the display message.
Message:
The value of the message as a text string

Related Functions

Common Errors

PPrintAfter()

System::Int64 PPrintAfter(
	System::String^ label,
	System::String^ message,
	System::Int64 index,
	System::Int64 plan_id
	);

The PPrintAfter() function adds an NC function display message to a given location in the STEP-NC program.

Arguments

Label:
A label for the new function
Message:
The value of the message as a text string
Index:
The position relative to the start of the workplan where the workingstep is to be placed. If the index is less than 0 then it will be placed at the start of the workplan. If it is equal to or greater than the size of the workplan then it will be placed after the end. Otherwise it will be placed after the item in the current position.
Plan_id:
The identifier of the workplan into which the workingstep is to be inserted. See Seciton for a description of how to use identifiers.

Related Functions

Common Errors

ProbeOperation()

void ProbeOperation(
	double x,
	double y,
	double z,
	);

The ProbeOperation() function adds a workpiece probing operation to the current workplan. The Tolerance object contains functions that can both define tolerances and create workplans for testing those tolerances. This function creates a simple probing operation at the given location on the assumption that another system has determined that this is a good location for probing.

Arguments

x, y, z:
Coordinates for the probing operation.

Common Errors

PutWorkpiecePlacement()

void PutWorkpiecePlacement(			
	System::Int64 wp_id,
	double x, double y, double z,
	double i, double j, double k,
	double a, double b, double c
	);

void PutWorkpiecePlacement(			
	int wp_id,
	double x, double y, double z,
	double i, double j, double k,
	double a, double b, double c
	);

The PutWorkpiecePlacement() function updates the location of a workpiece. CAD and CAM systems typically use different coordinate systems. In CAD a part is positioned and oriented in the coordinates it will be given in the final product. In CAM a part is positioned and oriented so that the machining will start in the middle of the top of the rawpiece.

In order to detect collisions between the tool and the workpiece, the position and orientation of the workpiece has to be changed to conform to the coordinates chosen for the tool paths.

In STEP, geometry is positioned and oriented using axis placements. To place the part, the user needs to describe the coordinates and orientations that must be given to the origin and axes (Z and X) of the workpiece in the coordinate system of the tool paths.

Arguments

id:
The identity of the model whose placement is to be changed. The model can be any workpiece, rawpiece, fixture, in-process model or tool .
x, y, z:
New coordinates for the model origin.
i, j, k:
New direction for the model Z axis
a, b, c
New direction for the model X axis

Related Functions

Common Errors

Rapid()

void Rapid();		 

The Rapid() function sets the feedrate to rapid for all subsequent tool path moves until changed by a call to the Feedrate function. Note that this is different to the APT semantics which define the rapid for the next move only.

Related Functions

Common Errors

Rawpiece()

void Rawpiece(
	System::String^ filename
	);

The Rawpiece() function defines the geometry of the rawpiece from an STEP CAD file. The function assumes that all of the geometry in the file is to make up the rawpiece. Any STEP file can be used to define the geometry provided it is compatible with AP-203. If the file is an AP-203 Edition 2 file then the geometry may include dimensions and tolerances. See the Tolerance object for more information on how tolerances are processed in the API.

Arguments

File name:
The name of the STEP file that defines the rawpiece.

Related Functions

Common Errors

RawpieceOfWorkpiece()

void RawpieceOfWorkpiece(
	System::Int64 rp_id,
	System::Int64 wp_id
	);

The RawpieceOfWorkpiece() function The rawpiece of a workpiece defines the geometry of the part before the machining began. The function returns the identity of the rawpiece or 0 if no rawpiece has been defined. In most STEP-NC programs there is one workpiece and one rawpiece. In more complex programs there can be many workpieces in many setups and each workpiece may have a rawpiece defined. The RawpieceOfWorkpiece function finds the rawpiece defined for a given workpiece.

Arguments

wp_id:
The identity of any workpiece in the STEP-NC program including workpieces that are being used define rawpieces, as-is, to-be or removal geometries for a workingstep.

Related Functions

Common Errors

ReadCatiaAPTclfile()

void ReadCatiaAPTclfile(
	System::String^ filename
	);

The ReadCatiaAPTclfile() function reads an APT CL file as produced by the CATIA CAD/CAM system and converts the tool paths and operations in that data into AP-238 tool paths and operations.

APT CL as defined by the CATIA system is a binary data format with many internal complexities. The ReadCatiaAPTclfile function has been extensively tested in many projects but every enterprise seems to use these files slightly differently so some customization work may be necessary when the reader is applied to the data of a new organization.

The CATIA APTcl reader calls other functions in the ATPSTEPMaker to make the objects required to represent the APT program as STEP-NC. The reader consists of a parser and you can make your own APT readers by calling the same functionality. There are several other APT readers in the API that read the APT made by other systems.

A typical data assembly application will create a new project and then read tool path data from one or more APT files. Each read adds data to the project. In order to keep the project well organized it can be a good idea to put the data from each file into its own Workplan using the NestWorkplan function.

Arguments

File name:
The name of the APT cl file.

Related Functions

Common Errors

ReadCatiaAptAsciiFile()

void ReadCatiaAptAsciiFile(
	System::String^ filename
	);

The ReadCatiaAptAsciiFile() function reads an APT CL file in the ASCII data format.

The CATIA APTCL reader calls other functions in the ATPSTEPMaker to make the objects required to represent the APT program as STEP-NC. The reader consists of a parser and you can make your own APT readers by calling the same functionality.

The ReadCatiaAptAsciiFile() parser uses an ASCII parser that is different to the binary parser. Instead the parser is identical to the one used for the other APTcl parsers but with its own configuration of default values.

Arguments

File name:
The name of the APT cl file.

Related Functions

Common Errors

ReadCatiaAptPlateClfile()

void ReadCatiaAptPlateClfile(
	System::String^ filename
	);

The ReadCatiaAptPlateClfile() function reads an ASCII APT CL file produced by the CATIA CAD/CAM system for plate cutting. Plate cutting APT files include special cycles for controlling the cutting and marking. Data created using this translator can be sent to plate cutting machines using the ESAB converter.

ReadMax5APTclfile()

void ReadMax5APTclfile(
	System::String^ filename,
	System::Int64 tool_num
	);

The ReadMax5APTclfile() function reads the flavor of APT written for Max5 files.

ReadProeAPTclfile()

void ReadProeAPTclfile(
	System::String^ filename
	);

The ReadProeAPTclfile() function reads an APT CL file as produced by the Pro/Engineer CAD/CAM system and converts the tool paths and operations in that data into AP-238 tool paths and operations. Pro/E APT CL files have an ASCII data format and are usually stored in files with a .ncl suffix.

ReadUgsAPTclfile()

void ReadUgsAPTclfile(
	System::String^ filename
	);

The ReadUgsAPTclfile() function reads an APT CL file as produced by the Siemens UGS CAD/CAM system and converts the tool paths and operations in that data into AP-238 tool paths and operations. UGS APT CL files have an ASCII data format and are usually stored in files with a .cls suffix.

ReadStepNcfile()

void ReadUgsAPTclfile(
	System::String^ filename
	);

The ReadStepNcFile() function reads a STEP-NC file using the same logic as the APT cl readers. Therefore, an advanced program may convert multiple APT files to STEP-NC and then merge them using ReadStepNcFile().

Unlike the ReadApt() functions, the ReadStepNcFile() function creates a nested workplan for each program so that before and after workpieces can be attached.

Arguments

File name:
The name of the STEP-NC file.

Related Functions

ReplaceMax5APTclfile()

void ReplaceMax5APTclfile(
	System::String^ filename,
	System::Int64 ws_id
	);

The ReplaceMax5APTclfile() function reads an APT CL file as produced by the Max5 CAM system and converts the tool paths and operations in that data into AP-238 tool paths and operations. Max5 is a CAM system that specializes in the definition of CNC programs for machining impellers. Max5 APT files are similar to UGS APT. They do not use any particular file suffix. They also expect the tool number to be defined before parsing so a tool number parameter is required as an argument for the parser.

Arguments

File name:
The name of the APT file.
Tool number:
Tool number for this file.

Reset()

void Reset();			 

The Reset() function resets the APT object to its initial state. A closely related function called Shutdown also resets the object but it deletes all of the data in the object as well. Reset does not delete the data and this can be important in applications where multiple objects are sharing data in the same underlying file in the ROSE data management system. In this case all but the last object should execute a reset and after they have finished the last should Shutdown.

Reset and Shutdown should only be used by advanced applications that are running a long time and need to conserve data resources.

Related Functions

RetractPlane()

void RetractPlane(
	double z_value
	);

The RetractPlane() function defines a safe distance from the surface being machined for rapid movements during an operation. If an application is generating its own tool paths for an operation then it can use the retract plane as the safe distance for rapid movement during the operation.

Arguments

z_value:
The retract plane is defined to be at the given distance from the surface being machined. The direction of the distance depends on the current normal of the surface when the retract is executed.

Related Functions

Common Errors

ReuseFixtureReference()

void ReuseFixtureReference(
	System::Int64 plan_id,
	System::Int64 resue_plan_id
	);

The ReuseFixtureReference() function explitly resuses the fixture of another workplan in this workplan. This is useful when the fixture has already been defined and it cannot be inherited from a workplan that is a common parent. After the reuse the existing fixture of the workplan will be orphaned and may be deleted if it is not being used by any other workplan.

Arguments

plan_id:
The identity of the workplan that is to be given another workplans fixture.
ruse_plan_id:
The identity of a workplan that has a fixture explicitly defined.

Related Functions

Right()

void Right();

See Left.

RunConfiguration()

void RunConfiguration(
	System::String^ file_name
	);

The RunConfiguration() function uses an XML file to define how to assemble a STEP-NC data set. The function reads the file and uses the tokens in that file to call other functions in the API with appropriate arguments. The following tokens/XML functions are currently recognized.

An example file is shown below. This file uses the tool_geometry command so it expects to be used after an APT file has been read defining the tool paths. The start_point command is therefore redundant but included as an illustration.
<machine-setup>
<start-point x=-5.225 y=- z=5. />

<tool_geometry tool=1 id=endmill_1in diameter=1.0
  geometry=tools/Cutters_inch/End_Mill_D_1.0.stp />

<tool_geometry tool=2 id=endmill_1/4in diameter=.25
  geometry=tools/Cutters_inch/End_Mill_025_English.stp />

<tool_geometry tool=3 id=drill_0.265in diameter=0.265
  geometry=tools/Cutters_inch/Drill_026.stp />

<workpiece geometry=sbir_test1_solid.203 />

</machine-setup>

Arguments

File name:
The name of the XML file describing the configuration.

Common Errors

SaveAsModules()


void SaveAsModules(			
	System::String^ file_name
	);

void SaveAsModules(			
	string file_name
	);

The SaveAsModules() function saves the STEP-NC program as a STEP file with lots of system generated comments. A similar function called SaveAsPart21 saves the STEP-NC program as file without any comments.

Arguments

File name:
Name of the file that is to be used to store the data.

Related Functions

Common Errors

SaveAsModulesWithSTRL()

void SaveAsModulesWithSTRL(
	System::String^ filename,
	System::Int64 wp_id,
	System::Int64 ws_id,
	System::Int64 tp_id,
	double d
	);

The SaveAsModulesWithSTRL() function

SaveAsP21()


void SaveAsP21(			
	System::String^ file_name
	);

void SaveAsP21(			
	string file_name
	);

The SaveAsP21() function saves the STEP-NC program as an file in clear text without comments. A similar function called SaveAsModules save the STEP-NC program as a file with system generated comments.

Arguments

File name:
Name of the file that is to be used to store the data.

Related Functions

Common Errors

SaveAsP21WithSTRL()

void SaveAsP21WithSTRL(
	System::String^ file_name,
	System::Int64 wp_id,
	System::Int64 ws_id,
	System::Int64 tp_id,
	double d
	);

The SaveAsP21WithSTRL() function

SaveFastAsModules()

void SaveFastAsModules(
	System::String^ file_name
	);

The SaveFastAsModules() function

SaveFastAsP21()

void SaveFastAsP21(
	System::String^ file_name
	);

The SaveFastAsP21() function

SecondProject()

void SecondProject(
	System::String^ filename,
	System::Int64 tool_mode
	);

The SecondProject() function copies the toolpath data from one AP-238 file into another AP-238 file. If the coordinates of the second AP-38 file need to be changed to match up with the first file, then this can be done using the SecondProjectTransform function. If the tool numbers of the second AP-238 file need to be changed so that they do not conflict with those used by the first file, then they can be changed using the tool number parameter.

Arguments

filename:
The Name of the file that contains the second project.
tool_mode:
A value to add to each tool number in the second file so that they do not conflict with the tool numbers in the first file. For example if the both files are using numbers in the range 1 to 20 then a tool inc of 100 can be added to make the second file use tool numbers in the range 101 to 120.

Related Functions

Common Errors

SecondProjectTransform()

void SecondProjectTransform(
	double x,
	double y,
	double z,
	double i,
	double j,
	double k,
	double a,
	double b,
	double c
	);

The SecondProjectTransform() function defines a transformation matrix that will be applied to all of the tool path points in a second project. The transform operates in the same way as the transformation defined by the PutWorkpiecePlacement function but works on the tool paths instead of the part geometry.

The transform defined by the SecondProjectTransform is reset to the identity matrix after each call to the SecondProject function.

Arguments

x, y, z:
New coordinates for the tool path origin.
i, j, k:
New direction for the tool path Z axis
a, b, c:
New direction for the tool path X axis

Related Functions

Common Errors

SELCTLTool()

void SELCTLTool(				
	System::Int64 selctl_number
	);
	
void SELCTLTool(				
	int selctl_number
	);

The SELCTLTool() function defines a tool number for the most recently defined tool. The function also loads the tool. Therefore, the next geometry item added to the data will cause a new workingstep to be added to the project for the tool.

The method used to define tools in APT is strange for unknown legacy reasons. A tool is defined and then it may or may not be given a number. If no number is given then the next available number is used.

Arguments

Tool_number:
The number to be used for the previously defined tool.

Related Functions

Common Errors

SetCNCexportActualFlutes()

void SetCNCexportActualFlutes(
	System::Int64 tl_id,
	System::Int64 flts
	);

The SetCNCexportActualFlutes() function

SetCNCexportExecSpeedprofileActive()

void SetCNCexportExecSpeedprofileActive(
	System::Int64 ws_id,
	System::Boolean yn
	);

The SetCNCexportExecSpeedprofileActive() function

SetComment(), -Get(), -Allowed()

void SetComment(
	System::Int64 ent_id,
	System::String^ comment
	);
System::String^ SetCommentGet(
	System::Int64 ent_id
	);
System::Int64 SetCommentAllowed(
	System::Int64 ent_id
	);

A comment can be set for any executable or other object based on an action_method. The SetComment function sets the comment. The SetCommentGet fucntion returns the comment or NULL. The SetCommentAllowed returns True (1) if comments are allowed for this kind of object.

Comments are allowed for any kind of executable including NC functions and program structures.

SetDebuggingNamesOn/Off()

void SetDebuggingNamesOn();
void SetDebuggingNamesOff();

In debugging mode, name values are set onn toolpaths and workingsteps to help trace issues and problems in the data. This can be particularly helpful while debugging the translation of APT files. However, the names make the file bigger and messier. THe default is for these names to be off.

SetDisplayMessagesOn/Off()

void SetDisplayMessagesOn();
void SetDisplayMessagesOff();

APT files frequently include multiple display messages to tell the operator when tools are being changed. For a visual language like STEP-NC this is no longer necessary. Turning DisplayMessages on allows STEP-NC to exactly mimic this legacy behavior. Turning DisplayMessages off make the STEP-NC data cleaner and simpler. The default is for them to be on.

Related Functions

SetDefineArcUsingViaOn/Off()

void SetDefineArcUsingViaOn();
void SetDefineArcUsingViaOff();

If DefineArcUsingVia is on then arc data is stored in a reduced format that considerably reduces the size of STEP-NC files that contain a lot of arc data such as high speed machining files.

If DefineArcUsingVia is off then the full STEP definition for an arc is used. This definition allows an arc to be used in many different contexts but is verbose and redundant in the context of a continuous tool path.

The default is for DefineArcUsingVia to be on. If an application needs to share arc’s between tool paths and other kinds of geometry (such as faces) then this value should be changed to off.

SetDirection()

void SetDirection(
	double i,
	double j,
	double k,
	double a,
	double b,
	double c
	);

The SetDirection() function sets a default axis that can be used by other functions. In the APT object only the Arc commands use this direction. The Feature object has many functions that use the direction.

Arguments

i, j, k:
The i, j, k components of the direction Z axis.
a, b, c:
The a, b, c components of the direction X axis.

Related Functions

Common Errors

SetExecutableIsEnabled()

void SetExecutableIsEnabled(		
	System::Int64 ws_id,
	System::Boolean
	);

The SetExecutableIsEnabled() function sets the "enabled" flag on the executable to true or false, which is used by the the Generate and Adaptive classes when processing programs. When true the executable should be used when generating codes or traversing a STEP-NC program. If false, the executable should be omitted.

See GetExecutableIsEnabled for more discussion

SetLocation()

void SetLocation(
	double x,
	double y,
	double z
	);

The SetLocation() function sets a default position that can be used by other functions. Currently there are no functions in the APT that use this value, but the Feature object has many such functions.

Arguments

x, y, z:
The coordinates of the position.

Common Errors

SetMaximumDeviation()

void SetMaximumDeviation(
	double value
	);

The SetMaximumDeviation() function defines the maximum deviation allowed for the ideal curve for a tool path. In APT and BCL this value is know as the LinTol for linearization tolerance. If set this value is put into the tool path data alongside the coordinate and axis data. The space consumed is not significant if the whole path uses the same value.

Arguments

value:
The maximum deviation value.

Common Errors

SetModeMill()

void SetModeMill();

The STEP-NC API can operate in Milling mode or Turning mode. In milling mode which is the default the explorer creates milling workingsteps, milling technology and milling machine functions. In turning mode it creates turning workingsteps, turning technology and turning machine functions.

If the API is in turning mode when this function is called, then any currently open tool path or workingstep will be closed and a new step and path will be created when new geometry is added to the program.

Related Functions

SetModeTurn()

void SetModeTurn();

See SetModeMill. If the API is in milling mode when this function is called, then any open tool path or workingstep will be closed and a new step and path will be created. The milling mode has been much more extensively tested than the turning mode.

SetName()

void SetName(			
	System::Int64 ent_id,
	System::String^ name
	);

void SetName(			
	int ent_id,
	string name
	);

Many objects in the API have names or identifiers. The SetName() function function sets the names of those objects to a given string.

Arguments

ent_id:
The identity of an executable, project, feature, tolerance, workpiece or other type of STEP-NC entity that has a name attribute.
Name:
The new value for the name. If null then the name will be set to .

Related Functions

Common Errors

SetNameCheckSTRL()

System::Int64 SetNameCheckSTRL(
	System::Int64 ent_id
	);

The SetNameCheckSTRL() function

SetNameCreateSTRL()

System::String^ SetNameCreateSTRL(
	System::Int64 wp_id,
	System::Int64 ws_id,
	System::Int64 tp_id,
	double d
	);

The SetNameCreateSTRL() function

SetNameGet()

System::String^ SetNameGet(	
	System::Int64 ent_id
	);

string SetNameGet(		
	int ent_id
	);

Many objects in the API have names or identifiers. The SetNameGet() function returns the current names of these objects.

Arguments

ent_id:
The identity of an executable, project, feature, workpiece or other type of STEP-NC entity that has a name attribute.

Related Functions

Common Errors

SetNameGetSTRL()

System::String^ SetNameGetSTRL(
	System::Int64 ent_id
	);

The SetNameGetSTRL() function

SetNameHasSTRL()

System::Int64 SetNameHasSTRL(
	System::Int64 ent_id
	);

The SetNameHasSTRL() function

SetNameHitSTRL()

System::Int64 SetNameHitSTRL(
	System::Int64 ent_id
	);

The SetNameHitSTRL() function

SetNameSTRL()

void SetNameSTRL(
	System::Int64 ent_id,
	System::String^ strl
	);

The SetNameSTRL() function

SetNameType()

System::String^ SetNameType(
	System::Int64 ent_id
	);

The SetNameType() function returns a string describing the type of the entity. Many objects in the API have names or identifiers. This function returns the type of one of these objects.

Arguments

ent_id:
The identity of an executable, project, feature, workpiece or other type of STEP-NC entity that has a name attribute.

Related Functions

SetSpindleSpeedForFeedCW/CCW()

void SetSpindleSpeedForFeedCW(	 	double feed,
	double speed
	);
void SetSpindleSpeedForFeedCCW(	 
	double feed,
	double speed
	);

The SetSpindleSpeedForFeed() functions set the spindle speed for a given feed. The function can be used to fix the spindle speeds of process data that has been converted to STEP-NC when that data did not include sensible spindle speeds. Every instance of the given feed is given the corresponding spindle speed.

Arguments

Feed:
The value of the feed. All process data with this feed will be given the corresponsing spindle speed.
Speed:
The value for the new speed. The value must not be negative.

Related Functions

Common Errors

SetToolAutoNumberOn/Off()

void SetToolAutoNumberOn();
void SetToolAutoNumberOff();

In APT programs a tool is identified by a tool number that corresponds to the placement position of the tool in a tool holder. The Selectl and LoadTool functions in the API allow tools to be selected and loaded using these numbers.

The DefineTool function is used to define a tool using the parameters defined by APT. However, the DefineTool command does not define a tool number. Instead two options are possible. In the first option the tool number is given using the APT SELCTL command that corresponds to the API SELCTLTool function. In the second option the next available tool number is used.

The SetToolAutoNumberOff() function is used to control this behavior. If SetAutoToolNumber is on then the next available number will be give to a tool as soon as it is defined. If it is off the API will wait for the SELECTL command to give it a number.

Related Functions

Common Errors

SetToolIdentifier()

void SetToolIdentifier(			
	System::String^ tool_number,
	System::String^ identifier
	);

void SetToolIdentifier(			
	string tool_number,
	string identifier
	);

The SetToolIdentifier() function sets the manufacturer’s name for the tool. For example, it might be Sandvik Endmill 0.4 mm. The tool identifier allows the tool to be found in external databases and catalogs. In the STEP-NC API a tool must have an identifier before it can be given geometry. The identifier can be defined using this function, the DefineTool2 function or as a side effect of the GeometryForToolNumber function.

Arguments

Number:
The tool number given as a string. STEP-NC allows any string to be used as an identifier but some APT parsers assume that the next tool will be given the next number so not using a number may cause difficulties.
Identifier:
The identifier for the tool also given as a string.

Related Functions

Common Errors

SetToolNumber()

void SetToolNumber(			
	System::String^ old_id,
	System::String^ new_id
	);

void SetToolNumber(			
	string old_id,
	string new_id
	);

The SetToolNumber() function changes the number of a tool when an application does not want to use the numbers assigned by an APT program.

Arguments

old_id:
The old id given as a string because STEP-NC does not require the tool number to be an integer.
new_id:
Also given as a string.

Related Functions

Common Errors

SetUUID_force(), -if_not_set(), -to_string()

System::String^ SetUUID_force()(
	System::Int64 entity_id
	);
System::String^ SetUUID_if_not_set()(
	System::Int64 entity_id
	);
System::String^ SetUUID_to_string()(
	System::Int64 entity_id
	System::String^ uuid_str
	);

A UUID is a number that in practice will never be generated again. The SetUUID_if_not_set() function assigns a Universally Unique IDentifier to an entity if one has not yet been set. The SetUUID_force() function assigns a new Universally Unique IDentifier to an entity and should be used whenever the underlying value of the concept represented by that entity has changed. The SetUUID_to_string() function sets the UUID to a given string which must be unique. The intended use of this function is for when an old copy of an object has been deleted and a new copy has been created as a replacement with the same identity.

Arguments

entity_id:
The internal (STEP Part 21) identity of an entity.
uuid_str:
The UUID to be given to the object which must be unique.

Related Functions

Common Errors

SetWorkingstepNameInPlan()

void SetWorkingstepNameInPlan(		
	System::Int64 plan_id,
	System::Int64 index,
	System::String^ name
	);

The SetWorkingStepName() function sets the name of a workingstep. The function is intended to be used after process data has been converted to STEP-NC and allows meaningful names to be assigned to the process steps after the parsing have been completed.

The function will set names in workplans and selectives and can be used to set the name of any executable.

Arguments

plan_id:
The id of a workplan or selective.
index:
The position (base 0) of the executable within the workplan or selective that is to be given the new name.
name:
The new name.

Related Functions

Common Errors

Shutdown()

void Shutdown();

The Shutdown() function is a version of the Reset function deletes all of the data in the APT object as well as resetting it to its initial state. If multiple applications are sharing the same object then all but the last object should execute a reset and after they have finished the last should shutdown it down.

SpindleSpeedCCW/CW()

void SpindleSpeedCCW(	 
	double speed
	);
void SpindleSpeedCW(		 
	double speed
	);

The SpindleSpeed() functions define the spindle speed to be used by all subsequent tool paths.

If a toolpath is currently being constructed then it is finished and a new one is started for the next geometry item with the new spindle speed. If the API is not in CAM Mode then a new workingstep is also constructed because in APT files changes in Spindle speed usually only happen at the start or end of an operation.

The system is put into CAM Mode if the application starts to create its own workingsteps using the Workingstep function. There are also explicit CamModeOn and CamModeOff functions. In CAM mode the API assumes it is being controlled by a CAM translation application that can make its own decisions about the best boundaries between workingsteps so it only creates new workingsteps when forced to by a change in tool.

The unit of the Spindle speed can be set using the SpindleSpeedUnit function.

Arguments

Speed:
The value for the new speed. The SpindleSpeed function is a null operation if the new feed is the same as the current speed.

Related Functions

Common Errors

SpindleSpeedUnit()

void SpindleSpeedUnit(			
	System::String^ unit
	);

void SpindleSpeedUnit(			
	string unit
	);

The SpindleSpeedUnit() function defines the units to be used for all subsequent spindle speeds. The function should be followed by a call to SpindleSpeed to set the new spindle speed value. The function sets the current speed to 0. The function sets the technology object to NULL until a new one is needed for a new tool path.

Arguments

Unit:
The unit to be used for future spindle speeds as described by one of the following strings.
  • hertz cycles per second
  • rpm revolutions per minute

Related Functions

Common Errors

Stop()

void Stop(
	System::String^ label
	);

The Stop() function adds the Stop NC function to the current workplan. The Stop function stops the program.

If a workingstep and toolpath is open when an NC function is added then that workingstep and toolpath will be ended, and a new workingstep and toolpath will be started if any new tool path geometry is added to the program.

Arguments

Label:
A label that can be used to identify the stop.

Related Functions

Common Errors

StopAfter()

System::Int64 StopAfter(
	System::String^ label,
	System::Int64 index,
	System::Int64 plan_id
	);

The StopAfter() function inserts a Stop NC function into a given location in the STEP-NC program.

Arguments

Label:
A label for the new function
Index:
The position relative to the start of the workplan where the workingstep is to be placed. If the index is less than 0 then it will be placed at the start of the workplan. If it is equal to or greater than the size of the workplan then it will be placed after the end. Otherwise it will be placed after the item in the current position.
Plan_id
The identifier of the workplan into which the workingstep is to be inserted. See Seciton for a description of how to use identifiers.

Related Functions

Common Errors

STRLCapture()

System::Int64 STRLCapture(
	System::Int64 wp_id,
	System::Int64 ws_id,
	System::Int64 tp_id,
	double d
	);

The STRLCapture() function

STRLRestore()

System::Int64 STRLRestore(
	[System::Runtime::InteropServices::Out] System::Int64 %wp_id,
	[System::Runtime::InteropServices::Out] System::Int64 %ws_id,
	[System::Runtime::InteropServices::Out] System::Int64 %tp_id,
	[System::Runtime::InteropServices::Out] double %d
	);

The STRLRestore() function

ToolGeometry()

void ToolGeometry(			
	System::String^ file_name,
	System::String^ tool_identifier
	);

void ToolGeometry(			
	string file_name,
	string tool_identifier
	);

The ToolGeometry() function defines the geometry of a tool using an STEP CAD file. A tool must have an identifier before it can be given geometry. The identifier can be defined using the SetToolIdentifier function, the DefineTool2 function or as a side effect of the GeometryForToolNumber function. The latter function is a simpler interface for this function.

For proper visualization and simulation, the origin of the tool geometry must be at the tip of the tool and the center line of the tool must be the z axis.

Arguments

File name:
The name of the file that contains the AP-203 geometry for the tool.
Identifier
The identifier for the tool as a string.

Related Functions

Common Errors

URLGet()

System::String^ URLGet();

The URLGet() function

URLHas()

System::Int64 URLHas();

The URLHas() function

URLSet()

void URLSet(
	System::String^ new_url
	);

The URLSet() function

UsingEnglishUnits()

System::Boolean UsingEnglishUnits();

The UsingEnglishUnits() function

UsingFrenchUnits()

System::Boolean UsingFrenchUnits();

The UsingFrenchUnits() function

Workingstep()

void Workingstep(			
	System::String^ label
	);

void Workingstep(			
	string label
	);

The Workingstep() function starts a new workingstep at the end of the current workplan.

.

Arguments

Name
A name that can be used to identify the workingstep. The name is often shown to the users so it should be meaningful.

Related Functions

Common Errors

WorkingstepAfter(), -End()

System::Int64 WorkingstepAfter(			
	System::String^ label,
	System::Int64 index,
	System::Int64 plan_id
	);

System::Int64 WorkingstepEnd(			
	);

int WorkingstepAfter(				
	string label,
	int index,
	int plan_id
	);

The WorkingstepAfter() function creates a new workingstep at a given location in a given workplan.

The WorkingstepEnd() function explicitly terminates the current workingstep. Workingsteps can also be implicitly terminated by starting a new workingstep.

If a workingstep is explicitly terminated then any following toolpath data will be put into a new workingstep. This may cause issues if the code is followed by an explict workingstep command because there will be three steps in the program: the one before terminstation; the one with the data between the commands; and the one created by the new workingstep().

Arguments

Name
A name that can be used to identify the workingstep. The name is frequently shown to the users by applications so it should be meaningful.
Index:
The position relative to the start of the workplan where the workingstep is to be placed. If the index is less than 0 then it will be placed at the start of the workplan. If it is equal to or greater than the size of the workplan then it will be placed after the end. Otherwise it will be placed after the item in the current position.
Plan_id
The identifier of the workplan into which the workingstep is to be inserted. See Seciton for a description of how to use identifiers.
  • Related Functions

    Common Errors

    WorkingstepAddPropertyCountMeasure()

    void WorkingstepAddPropertyCountMeasure(		
    	System::Int64 ws_id,
    	System::String^ property_name,
    	System::Int64 value
    	);
    
    void WorkingstepAddPropertyCountMeasure(		
    	int ws_id,
    	string property_name,
    	int value
    	);
    

    The WorkingstepAddPropertyLengthMeasure() function adds an application-defined CAM property to the workingstep. The property will have a numeric count value.

    WorkingstepAddPropertyDescriptiveMeasure()

    void WorkingstepAddPropertyDescriptiveMeasure(	
    	System::Int64 ws_id,
    	System::String^ property_name,
    	System::String^ value
    	);
    
    void WorkingstepAddPropertyDescriptiveMeasure(	
    	int ws_id,
    	string property_name,
    	string value
    	);
    

    The WorkingstepAddPropertyDescriptiveMeasure() function adds an application-defined CAM property to the workingstep. The property will have a descriptive string value.

    WorkingstepAddPropertyLengthMeasure()

    void WorkingstepAddPropertyLengthMeasure(	
    	System::Int64 ws_id,
    	System::String^ property_name,
    	double value
    	);
    
    void WorkingstepAddPropertyLengthMeasure(	
    	int ws_id,
    	string property_name,
    	double value
    	);
    

    The WorkingstepAddPropertyCountMeasure() function adds an application-defined CAM property to the workingstep. The property will have a length value defined by the current unit system.

    WorkingstepName()

    void WorkingstepName(			
    	System::String^ label
    	);
    
    

    The WorkingstepName() function sets the name of the current workingstep without making any state changes.

    Arguments

    Name
    The new name for the workingstep.

    Related Functions

    Common Errors

    WorkingstepOperationReuse()

    void WorkingstepOperationReuse(
    	System::Int64 ws_id
    	);
    

    The WorkingstepOperationReuse() function creates a workingstep by reusing the operation in a given workingstep. This will allow the data to be transformed to a new location and orientation using the WorkingstepToolpathOrientation function.

    Arguments

    ws_id
    The identity of the workingstep whose operation is to be repeated.

    Related Functions

    Common Errors

    WorkingstepOperationReuseAfter()

    void WorkingstepOperationReuseAfter(
    	System::Int64 ws_id,
    	System::Int64 index,
    	System::Int64 plan_id
    	);
    

    The WorkingstepOperationReuseAfter() function Repeats a workingstep operation and puts it at a given location in the STEP-NC program.

    Arguments

    ws_id
    The identity of the workingstep that is to be repeated.
    index:
    The desired position for the workingstep in the workplan.
    plan_id:
    The identity of the workplan that is to contain the repeated workingstep. See Section for some important notes on how to use identifiers.

    Related Functions

    Common Errors

    WorkingstepReuse()

    void WorkingstepReuse(
    	System::Int64 ws_id
    	);
    

    The WorkingstepReuse() function repeats a workingstep by putting it into the current workplan. For example, if the same operation is needed in more than one alternative of a Selective.

    Arguments

    ws_id
    The identity of the workingstep that is to be repeated.

    Related Functions

    Common Errors

    WorkingstepReuseAfter()

    void WorkingstepReuseAfter(
    	System::Int64 ws_id,
    	System::Int64 index,
    	System::Int64 plan_id
    	);
    

    The WorkingstepReuseAfter() function repeats a workingstep at a given location in the STEP-NC program.

    Arguments

    ws_id
    The identity of the workingstep that is to be repeated.
    Index:
    The desired position for the workingstep in the workplan.
    Plan_id:
    The identity of the workplan that is to contain the repeated workingstep. See Section for some important notes on how to use identifiers.

    Related Functions

    Common Errors

    WorkingstepSiemensCycle81()/82()/83()/84()/840()

    void WorkingstepSiemensCycle81(	
    	System::String ws_name,
    	// Parameters as defined by Siemens
    	rtp, rfp, sdis, dp, dpr
    	);
    
    void WorkingstepSiemensCycle82(	
    	System::String ws_name,
    	// Parameters as defined by Siemens
    	rtp, rfp, sdis, dp, dpr, dtb
    	);
    
    void WorkingstepSiemensCycle83(	
    	System::String ws_name,
    	// Parameters as defined by Siemens
    	rtp, rfp, sdis, dp, dpr, fdep, fdpr, dam, dtb, dps, frf, _vari, _axn, _mdep, _vrt, _dtd, _dis1
    	);
    
    void WorkingstepSiemensCycle84(	
    	System::String ws_name,
    	// Parameters as defined by Siemens
    	rtp, rfp, sdis, dp, dpr, dtb, sdac, mpit, pit, poss, sst, sst1, _axn, _ptab, _techno, _vari, _dam, _vrt
    	);
    
    void WorkingstepSiemensCycle840(	
    	System::String ws_name,
    	// Parameters as defined by Siemens
    	rtp, rfp, sdis, dp, dpr, dtb, sdr, sdac, enc, mpit, pit, _axn, _ptab, _techno
    	);
    
    

    The WorkingstepSiemensCycleXXX() functions define a workingstep for one of the Siemens canned cycles. The cycles currently supported are Drill Centering (Cycle 81), Drill Counter Boring (Cycle 82), Deep Drilling (Cycle 83), Rigid Tapping (Cycle 84) and Rigid Tapping with compensating chuck (Cycle 840).

    The system makes a workingstep for the new operation with the parameters defined by the cycle. The system also generates a toolpath for the motions necessary to complete the operation. The generated motion does not include any special features of the cycle such as synchronized stops and bottom dwells.

    Arguments

    ws_name
    The label for the new workingstep.
    other parameters
    See the Siemens 840D Cycle Manual.

    Related Functions

    Common Errors

    WorkingstepToolpathOrientation()

    void WorkingstepToolpathOrientation(		 
    	double x, double y, double z,
    	double i, double j, double k,
    	double a, double b, double c
    	);
    

    The WorkingstepToolpathOrientation() function defines a coordinate transformation for the toolpaths in the current workingstep.

    If the workongstep is in a setup then it should be defined first because the WorkingstepToolpathOrintation function will place the toolpaths onto the desired coordinates after the setup has been applied.

    Arguments

    x, y, z:
    The origin of the placement.
    i, j, k:
    The Z axis direction of the placement.
    a, b, c:
    The X axis direction of the placement.

    Related Functions

    Common Errors

    WorkingstepToolpathOrientationDelete()

    void WorkingstepToolpathOrientationDelete(
    	System::Int64 ws_id
    	);
    

    The WorkingstepToolpathOrientationDelete() function deletes the toolpath orientation of a workingstep so that the toolpaths will appear at their defined (native) coordinates.

    Arguments

    ws_id:
    The identity of the workingstep.

    Related Functions

    Common Errors

    WorkingstepToolpathOrientationReuse()

    void WorkingstepToolpathOrientationReuse(
    	System::Int64 reuse_ws_id,
    	System::Int64 in_ws_id
    	);
    

    The WorkingstepToolpathOrientationReuse() function defines the orientation of a workingstep by reusing a previously defined orientation.

    Arguments

    ws1_id:
    The identity of the workingstep whose orientation is to be set.
    ws2_id:
    The identity of the workingstep whose orientation is to be reused.

    Related Functions

    Common Errors

    Workpiece()

    void Workpiece(			
    	System::String^ filename
    	);
    
    void Workpiece(			
    	string filename
    	);
    

    The Workpiece() function defines the geometry of the workpiece from an STEP CAD file. The function assumes that all of the geometry in the file is to make up the workpiece. Any mechanical CAD STEP file can be used to define the geometry (AP203/AP214/AP242). If the STEP file has tolerances and dimensions, they will be included with the workpiece. The Tolerance object has more information on how tolerances are processed in the API.

    The new workpiece is made the default workpiece of the project. More specific workpieces can be defined for each workplan using WorkplanWorkpiecePlacementAdd and for each executable using the ExecutableWorkpiece functions.

    Arguments

    File name:
    The name of the STEP file that defines the workpiece.

    Related Functions

    Common Errors

    WorkpieceAndRawpiece()

    void WorkpieceAndRawpiece(
    	System::String^ file_name
    	);
    

    The WorkpieceAndRawpiece() function is for legacy AP224 data in which the workpiece and rawpiece are stored in the same file.

    WorkpieceSliceThickness(), -Count()()

    System::Int64  WorkpieceSliceThickness(			
        System::Int64 wp_id,
        double thickness,
        System::Int64 axis
    	);
    
    System::Int64  WorkpieceSliceCount(
        System::Int64 wp_id,
        System::Int64 count,
        System::Int64 axis
    	);
    

    The WorkpieceSlice() function slices a model into submodels. The sliced models are returned as a product assembly with each slice as one component of the assembly.

    The WorkpieceSliceCount() function makes the requested number of slices.

    The WorkpieceSliceThickness() function makes slices with the requested thickness.

    Both functions return the identity of a new product containing the assembly of slices.

    Arguments

    wp_id
    The identity of a workpiece containing the model that is to be sliced.
    count
    The number of slices.
    thickness
    The slice width.
    axis
    The axis of slicing (0 = X, 1 = Y, 2 = Z).

    WorkplanFromSelective()

    System::Int64 WorkplanFromSelective(
    	System::Int64 sel_id
    	);
    

    The WorkplanFromSelective() function converts a selective workplan back to being a regular workplan.

    Arguments

    plan_id:
    The identity of the workplan that is to be converted to a selective.

    Related Functions

    Common Errors

    WorkplanSetup()

    void WorkplanSetup(			
    	System::Int64 plan_id,
    	double x, double y, double z,
    	double i, double j, double k,
    	double a, double b, double c
    	);
    void WorkplanSetup(			
    	int plan_id,
    	double x, double y, double z,
    	double i, double j, double k,
    	double a, double b, double c
    	);
    

    The WorkplanSetup() function defines a coordinate system for both the toolpaths in the workplan and the workpiece models of that workplan. Different workplans can have different setups so that for example one workplan mills the top face of a part and another workplan mills the bottom face.

    Arguments

    plan_id:
    The identity of the workplan.
    x, y, z:
    The origin of the placement.
    i, j, k:
    The Z axis direction of the placement.
    a, b, c:
    The X axis direction of the placement.

    Related Functions

    Common Errors

    WorkplanSetupDelete()

    void WorkplanSetupDelete(		
    	System::Int64 plan_id
    	);
    
    void WorkplanSetupDelete(		
    	int plan_id
    	);
    

    The WorkplanSetupDelete() function deletes a workplan setup and any associated data such as the placement of the workpiece on the fixture and the fixture on the machine tool.

    Arguments

    plan_id:
    The identity of the workplan that contains the setup that is to be deleted.

    Related Functions

    Common Errors

    WorkplanSetupFixture()

    void WorkplanSetupFixture(
    	System::Int64 plan_id,
    	System::String^ file_name
    	);
    

    The WorkplanSetupFixture() function defines the geometry of the fixture from an STEP CAD file. The function assumes that all of the geometry in the file is to make up the fixture. Any STEP file can be used provided it is compatible with AP-203. It is quite common for a fixture to be defined as an assembly of parts such as four bolts. If the file is an AP-203 Edition 2 file then the geometry may include dimensions and tolerances.

    The fixture is placed in the coordinate system defined by the setup which defaults to the origin if undefined.

    Arguments

    file name:
    The name of the STEP file that defines the fixture.
    plan_id:
    The identify of the workplan that is to contain the fixture.

    Related Functions

    Common Errors

    WorkplanSetupFixtureMountGet/Put()

    void WorkplanSetupFixtureMountGet(
    	System::Int64 plan_id,
    	[System::Runtime::InteropServices::Out] double %x,
    	[System::Runtime::InteropServices::Out] double %y,
    	[System::Runtime::InteropServices::Out] double %z,
    	[System::Runtime::InteropServices::Out] double %i,
    	[System::Runtime::InteropServices::Out] double %j,
    	[System::Runtime::InteropServices::Out] double %k,
    	[System::Runtime::InteropServices::Out] double %a,
    	[System::Runtime::InteropServices::Out] double %b,
    	[System::Runtime::InteropServices::Out] double %c
    	);
    
    void WorkplanSetupFixtureMountPut(
    	System::Int64 plan_id,
    	double x,
    	double y,
    	double z,
    	double i,
    	double j,
    	double k,
    	double a,
    	double b,
    	double c
    	);
    

    The WorkplanSetupFixtureMountGet() function gets the coordinates of the fixture mount.

    The WorkplanSetupFixtureMountPut() function defines where to put the fixture on the machine. This function completes the chain of connections by defining where the fixture is to be placed on the machine tool.

    Arguments

    plan_id:
    The identity of the workplan.
    x, y, z:
    The origin of the placement.
    i, j, k:
    The Z axis direction of the placement.
    a, b, c:
    The X axis directionof the placement.

    Related Functions

    Common Errors

    WorkplanSetupFixtureWorkpieceGet/Put()

    void WorkplanSetupFixtureWorkpieceGet(
    	System::Int64 plan_id,
    	[System::Runtime::InteropServices::Out] double %x,
    	[System::Runtime::InteropServices::Out] double %y,
    	[System::Runtime::InteropServices::Out] double %z,
    	[System::Runtime::InteropServices::Out] double %i,
    	[System::Runtime::InteropServices::Out] double %j,
    	[System::Runtime::InteropServices::Out] double %k,
    	[System::Runtime::InteropServices::Out] double %a,
    	[System::Runtime::InteropServices::Out] double %b,
    	[System::Runtime::InteropServices::Out] double %c
    	);
    
    void WorkplanSetupFixtureWorkpiecePut(
    	System::Int64 plan_id,
    	double x,
    	double y,
    	double z,
    	double i,
    	double j,
    	double k,
    	double a,
    	double b,
    	double c
    	);
    

    The WorkplanSetupFixtureWorkpieceGet() function gets the coordinates where the workpiece is placed on the fixture.

    The WorkplanSetupFixtureWorkpiecePut() function completes the chain of connections by defining where the workpiece is to be placed on the fixture.

    Arguments

    wp_id:
    The identity of the workplan.
    x, y, z:
    The origin of the placement.
    i, j, k:
    The Z axis direction of the placement.
    a, b, c
    The X axis direction of the placement.

    Related Functions

    Common Errors

    WorkplanSetupGet/Put()

    void WorkplanSetupGet(		
    	System::Int64 plan_id,
    	[System::Runtime::InteropServices::Out] double %x,
    	[System::Runtime::InteropServices::Out] double %y,
    	[System::Runtime::InteropServices::Out] double %z,
    	[System::Runtime::InteropServices::Out] double %i,
    	[System::Runtime::InteropServices::Out] double %j,
    	[System::Runtime::InteropServices::Out] double %k,
    	[System::Runtime::InteropServices::Out] double %a,
    	[System::Runtime::InteropServices::Out] double %b,
    	[System::Runtime::InteropServices::Out] double %c
    	);
    
    void WorkplanSetupPut(
    	System::Int64 plan_id,
    	double x,
    	double y,
    	double z,
    	double i,
    	double j,
    	double k,
    	double a,
    	double b,
    	double c
    	);
    

    The WorkplanSetupGet() function gets the coordinates of a Workplan setup and WorkplanSetupPut() function changes the coordinates the setup. The placement is given by a origin coordinate and direction vectors for the Z axis and X axis.

    See PutWorkplanSetup and GetWorkplanSetup for the equivalent node functions.

    Arguments

    plan_id:
    The identity of the workplan.
    x, y, z:
    The origin of the placement.
    i, j, k:
    The Z axis direction of the placement.
    a, b, c:
    The X axis direction of the placement.

    Related Functions

    Common Errors

    WorkplanToolpathOrientation()

    void WorkplanToolpathOrientation(
         int64: plan_id,		
    	double x, double y, double z,
    	double i, double j, double k,
    	double a, double b, double c
    	);
    

    The WorkplanToolpathOrientation() function defines a coordinate transformation for the toolpaths in a selected workplan.

    If the workplan is in a setup then it should be defined first because the WorkplanToolpathOrintation function will place the toolpaths onto the desired coordinates after the setup has been applied.

    Arguments

    x, y, z:
    The origin of the placement.
    i, j, k:
    The Z axis direction of the placement.
    a, b, c:
    The X axis direction of the placement.

    Related Functions

  • WorkingstepToolpathOrientation: define placement for a workingstep.

    Common Errors

    WorkplanToolpathOrientationDelete()

    void WorkplanToolpathOrientationDelete(
    	System::Int64 [lan_id
    	);
    

    The WorkplanToolpathOrientationDelete() function deletes the toolpath orientation of a workplan so that the toolpaths will appear at their defined (native) coordinates.

    Arguments

    plan_id:
    The identity of the workplan.