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

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/Thru()

void CoolantOn();		 
void CoolantOff();		 
void CoolantMist();		 
void CoolantThru();		 

The coolant functions control the coolant state for subsequent tool paths. CoolantOn() turns the coolant on and makes it of type flood. CoolantMist() function turns coolant on and makes it mist coolant instead of flood. CoolantThru() function turns coolant on and makes it through-spindle coolant instead of flood. CoolantOff() stops coolant, regardless of type.

If the coolant is not currently on, or not of type mist then a new tool path is started. Through spindle coolant is not yet implemented by the API.

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() / DefaultToMillimeters()

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()/GetToolSpotDrill

void DefineToolSpotDrill(
	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 the parameters of 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()

void DefineToolTwistDrill(
	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 DefineToolTwistDrill() function defines the parameters of 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()/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 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 the parameters of an endmill. An end mill is used for milling pockets and other features.

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()

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 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 the parameters of an facemill. A face mill is used for milling faces.

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

DefineToolRotatingBoringCuttingTool()

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

The DefineToolRotatingBoringCuttingTool() function defines the parameters of an rotating, boring cutting tool.

Arguments

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

DefineToolSpotDrill()

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

The DefineToolSpotDrill() function defines the parameters of a spot drilling tool. When necessary a spot drill is used to start a drilling hole so that a subsequent drill can complete that hole.

Arguments

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

DefineToolStraightReamer()

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

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

Arguments

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()

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
	);

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

Arguments

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

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.

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

ExecutableToSelective()

System::Int64 ExecutableToSelective(		
	System::Int64 exe_id
	);

int ExecutableToSelective(			
	int exe_id
	);

The ExecutableToSelective() function converts an executable into a selective containing that executable. All workplans containing that executable will now contain the new selective. If the executable has before and after workpieces defined then they will be assigned to the selective.

The function prepares the data in a project for the definition of alternate solutions. After the selective has been created new workplans and other executable can be added to the selection and definition for the workplans can be created by importing solutions defined in other projects.

Arguments

exe_id:
The identity of the executable that is to be replaced by a selective containing the 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 the first executable to share the same geometry that is set for the second executable.

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 the first executable to share the same geometry that is set for the second executable.

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 the first executable to share the same geometry that is set for the second executable.

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

ExportAsAPT()

void ExportAsAPT(
	System::String^ file_name
	);

The ExportAsAPT() function writes the tool paths defined for the STEP-NC program into an APT file using the Siemens NX syntax.

Arguments

File name:
File name for the APT file that is to contain the tool paths.

Related Functions

Common Errors

ExportAsDmisCNC()

void ExportAsDmisCNC(
	System::String^ file_name
	);

The ExportAsDmisCNC() function exports codes for CMM machines that read DMIS programs in CNC mode. See ExportCNC for additional discussion.

ExportAsDmisManual()

void ExportAsDmisManual(
	System::String^ file_name
	);

The ExportAsDmisManual() function exports codes for CMM machines that read DMIS programs in manual mode. See ExportCNC for additional discussion.

ExportAsESAB()

void ExportAsESAB(
	System::String^ file_name
	);

The ExportAsESAB() function exports codes for ESAB plate cutting equipment. See ExportCNC for additional discussion.

ExportAsFanuc()

void ExportAsFanuc(
	System::String^ file_name
	);

The ExportAsFanuc() function exports codes for Fanuc controls. See ExportCNC for additional discussion.

ExportAsHaas()

void ExportAsHaas(
	System::String^ file_name
	);

The ExportAsHaas() function exports codes for Haas CNC equipment. See ExportCNC for additional discussion.

ExportAsHeidenhainAC()

void ExportAsHeidenhainAC(
	System::String^ file_name
	);

The ExportAsHeidenhainAC() function exports codes for Heidenhain controls with AC axes. See ExportCNC for additional discussion.

ExportAsHeidenhainBC()

void ExportAsHeidenhainBC(
	System::String^ file_name
	);

The ExportAsHeidenhainBC() function exports codes for Heidenhain controls with BC axes. See ExportCNC for additional discussion.

ExportAsMDSI()

void ExportAsMDSI(
	System::String^ file_name
	);

The ExportAsMDSI() function exports codes for MDSI lathe controls. See ExportCNC for additional discussion.

ExportAsOkuma()

void ExportAsOkuma(
	System::String^ file_name
	);

The ExportAsOkuma() function exports codes for Okuma controls. See ExportCNC for additional discussion.

ExportAsSiemens()

void ExportAsSiemens(
	System::String^ file_name
	);

The ExportAsSiemens() function exports codes for Siemens SINUMERIK controls. See ExportCNC for additional discussion.

ExportCNC()

void ExportCNC(
	System::String^ file_name,
	System::String^ style
	);

The ExportCNC() function converts the tool paths in a STEP-NC program into codes suitable for execution on a partuicular machine tool control. All of the tool paths in all of the workingsteps and workplans of the current project are converted. If a subset is needed then the main_workplan should be edited using the delete functions before this function is called.

The output of all types of CNC export can be customized using functions with theSetCNCExport prefix.

Arguments

file_name:
File name for the file that is to contain the codes.
style:
A symbolic identifier for a built in code style.

Related Functions

Common Errors

ExportWorkpiece()

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

The ExportWorkpiece() function exports the geometry and placement 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 as well as the workpiece of the STEP-NC program.

Arguments

wp_id:
The identifier for a workpiece.
file_name:
File name for the STEP CAD file that is to contain the workpiece.

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

ExternalOperation()

void ExternalOperation(
	System::String^ file_name
	);

The ExternalOperation() function

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

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()

void GenerateToolGeometry(
	System::Int64 tl_or_ws_id
	);
void GenerateToolGeometry(
	);
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

GetCNCexportExecIsEnabled()

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

The GetCNCexportExecIsEnabled() 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

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

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

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 changes the tool. The new tool becomes the current tool for the next workingstep. If a workingstep is open then it is closed and a new one is created for the next geometry item.

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.

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 workplan (or another selective) 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 workplan a meaningful name.
index:
The position where the new workplan is to be inserted in the workplan or selective 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 selective.

NestWorkplan()

void NestWorkplan(
	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 new workplan is put into the old workplan. 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 on how to end a workplan.

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.

Note: NestWorkplan is meant to be designed to be used by APT translators. The NestWorkplanAfter functions are designed to be used by data editors. There is no NestSelective function because this type of functionality is not supported by current APT systems.

Arguments

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

Related Functions

Common Errors

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) 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.

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.

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.

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,
	double i,
	double j,
	double k
	);

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.
i, j, k:
Direction for the probing operation Z axis
a, b, c:
Direction for the probing operation X axis

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

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

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.

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

SetCNCexportComments()

void SetCNCexportComments(
	System::Int64 level
	);

The SetCNCexportComments() function

SetCNCexportExecDisabled()

void SetCNCexportExecDisabled(		
	System::Int64 ws_id
	);
	
void SetCNCexportExecDisabled(		
	int ws_id
	);

The SetCNCexportExecDisabled() function sets the "enabled" flag on the executable to false, which means that the various CNC Export functions will not include data for this executable in the output.

Arguments

exe_id:
Identity of executable whose execution is to be disabled

Related Functions

Common Errors

SetCNCexportExecEnabled()

void SetCNCexportExecEnabled(		
	System::Int64 ws_id
	);

void SetCNCexportExecEnabled(		
	int ws_id
	);

The SetCNCexportExecEnabled() function function sets the "enabled" flag on the executable to true, which tells the various CNC Export functions to include data for this executable in the output. This is the default state

Arguments

exe_id:
Identity of executable whose execution is to be enabled

Related Functions

Common Errors

SetCNCexportExecSpeedprofileActive()

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

The SetCNCexportExecSpeedprofileActive() function

SetCNCexportInsertStopAfterWorkingstep()

void SetCNCexportInsertStopAfterWorkingstep(
	System::Boolean yn
	);

The SetCNCexportInsertStopAfterWorkingstep() function tells the various CNC Export functions to insert a CNC stop code at the end of each workingstep. The insertion is independent of the STEP-NC Stop NC function and gives the operator more control when testing a new STEP-NC program on a new machine.

Arguments

yn:
true for on, false for off.

Related Functions

Common Errors

SetCNCexportMatrixOn/Off()

System::Int64 SetCNCexportMatrixOn();
void SetCNCexportMatrixOff();

The SetCNCexportMatrixOn() and SetCNCexportMatrixOff() functions are internal functions used in some flexible setup tests.

SetCNCexportNumberOfDigits()

void SetCNCexportNumberOfDigits(
	System::Int64 num_digits
	);

The SetCNCexportNumberOfDigits() function tells the various CNC Export functions how many digits to use for each number written into the code. If the value is not set then the default depends on the machine. For Siemens the default is 6 and for Fanuc it is 4.

Arguments

num_digits:
The number of digits as an integer

Related Functions

Common Errors

SetCNCexportProgramNum()

void SetCNCexportProgramNum(
	System::Int64 num
	);

The SetCNCexportProgramNum() function sets the preferred program number to be used when writing machine control data. In particular, Fanuc and related controls use a numeric value at the start of the program. By default this value is zero and the default for the style will be used.

SetCNCexportSpeedOverride()

void SetCNCexportSpeedOverride(
	System::Boolean yn
	);

The SetCNCexportSpeedOverride() function sets a flag that controls whether the CNC code generated will use the override speeds computed by a feed speed optimizer instead of the base speeds stored in the STEP-NC data.

Arguments

yn:
true for on, false for off.

Related Functions

Common Errors

SetCNCexportToolOpts()

void SetCNCexportToolOpts(
	System::Boolean yn
	);

The SetCNCexportToolOpts() function

SetCNCexportTraceability()

void SetCNCexportTraceability(
	System::Boolean yn
	);

The SetCNCexportTraceability() function sets a flag tha controls whether code to trace the execution of the program will be generated for the CNC control.

Arguments

yn:
true for on, false for off.

Related Functions

Common Errors

SetCNCexportUnits()

void SetCNCexportUnits(
	System::String^ new_unit
	);

The SetCNCexportUnits() function defines the units that are to be used for the CNC export file. If the units are different to those used in the AP-238 data then they will be converted, for example, from inch to millimeters. The default is to use the same units as the AP-238 file.

Arguments

units:
The units given as a string. The following strings are allowed: “inch” and “millimeter”.

Related Functions

Common Errors

SetCNCexportUsingBlocknumbers()

void SetCNCexportUsingBlocknumbers(
	System::Boolean yn
	);

The SetCNCexportUsingBlocknumbers() function defines whether or not block numbers are to be included in a CNC export file. Block numbers are useful as a way to identify each line of code. The default is to not use the block numbers unless it is required by the control as is currently the case for Heidenhain controls.

Arguments

yn:
true for on, false for off.

Related Functions

SetCNCexportUsingTCP()

void SetCNCexportUsingTCP(
	System::Boolean yn
	);

The SetCNCexportUsingTCP() function defines whether or not Tool Center Point codes are to be included in a CNC export file. A CNC file that uses Tool Center Point or Triori codes machines in part space instead of machine space. For three-axis machining this has no effect but for five-axis machining it makes the program more independent and flexible.

The default is to use TCP unless the Export function is for a machine that does not support it.

Arguments

yn:
true for on, false for off.

Related Functions

SetCNCexportWorkoffset()

void SetCNCexportWorkoffset(
	System::Int64 offset_register
	);

The SetCNCexportWorkoffset() function sets the CNC work offset mode to be selected during an export. The default is to not use an offset.

Arguments

Offset_register:
The number of the offset register. A value of 1 corresponds to G54, 2 to G55 and 5 to G58. A value of 0 means do nothing about offsets.

Related Functions

SetDebuggingNamesOn/Off()

void SetDebuggingNamesOn();
void SetDebuggingNamesOff();

During testing name values can be set in many places in a STEP file to help trace issues and problems in the data. By setting the DebuggingName to Off this space can be saved and is the normal default operation mode for the API. Use SetDebuggingNamesOn to change this behavior and put the names into the data.

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

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 in the current workplan. The function also sets the API to “CAM mode” which means future calls to the SpindleSpeed function will no longer start a new workingstep.

The workingstep function is designed to be called by applications that are translating CAM data to AP-238. These applications can use the functions in the Process object to define AP-238 process data.

.

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.

Related Functions

Common Errors

WorkingstepAfter()

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

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

The WorkingstepAfter() function creates a new workingstep at a given location in a given workplan. It does not change the “CAM mode”.

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.

    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

    WorkpieceSecondPlacement()

    System::Int64 WorkpieceSecondPlacement(
    	System::Int64 wp_id,
    	System::String^ name,
    	double x,
    	double y,
    	double z,
    	double i,
    	double j,
    	double k,
    	double a,
    	double b,
    	double c
    	);
    

    The WorkpieceSecondPlacement() function

    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

    WorkplanToSelective()

    System::Int64 WorkplanToSelective(
    	System::Int64 wp_id
    	);
    

    The WorkplanToSelective() function converts a workplan to a selective group. A workplan is a sequence of workingsteps that share a setup. The components of a workplan are executed in sequence. The components can be a workingstep, an NC function or a nested workplan. A selective workplan is a "choice" construct one where only one of the components is executed.

    This one is the first executable to be “enabled”. By default this will be the first executable in the workplan. Executables can be enabled and disabled using the SetCNCexportExecEnabled and SetCNCexportExecDisabled functions.

    Arguments

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

    Related Functions

    Common Errors