Você está na página 1de 62

The following documentation describes the constants and functions which

give the VB Script programmer access to Mastercam functionality. If you


need to view documentation regarding the VB Script language itself,
please refer to SCRIPT56.CHM in the �Help� sub-directory of your
Mastercam installation.

Links:

Constants <#Constants>

Classes <#Classes>

Functions <#Functions>

*///////////////////////////////////////////////////////////////////////////////*

*CONSTANTS*

*///////////////////////////////////////////////////////////////////////////////*

* *

Links:

Entity types <#Types>

Entity �bit� flags <#Bits>

Milling tool types <#MillTools>

Drilling tool types <#DrillTools>

Operation <#Operation>

View <#View>

File Access modes <#FileAccessModes>

Drill Sort Methods <#Sort>

Others <#Others>

* *

*//// Application info*


// Which application is running

*mc_appmodule*

// Which level is running

*mc_applevel*

// Which version of application is running

*mc_appversion*

// Application module types

*mcMILL_EXE *

*mcLATHE_EXE*

*mcWIRE_EXE *

*mcDESIGN_EXE*

*mcDRAFT_EXE *

*mcROUTER_EXE *

// Application level constants

*mcAPPLEVEL_ENTRY*

*mcAPPLEVEL_1 *

*mcAPPLEVEL_2 *

*mcAPPLEVEL_3 *

* *

*//// Entity types*

//Point:

*mc_pointtype*

//Line:

*mc_linetype*

// Arc:
*mc_arctype*

// Rectangle:

*mc_recttype*

*//// Entity �bit� flags*

//Entity is �alive� (not deleted)?:

*mc_alive*

//Entity is part of the system group?:

*mc_group*

//Entity is currently selected?:

*mc_selected*

//Entity is part of the system result?:

*mc_result*

//Entity is only temporary?:

*mc_temporary*

//Entity is blanked?

*mc_blanked*

* *

*//// Milling tool types*

// tool has a flat end

*mctool_flat*

*// *tool has a spherical end

*mctool_ball*

// tool has a �bull-nose� (non-zero corner radius)

*mctool_bull*

*//// Drilling tool types*


// a center drill

*mctool_centerdrill*

// a spot drill

*mctool_spotdrill*

// a standard drill

*mctool_drill*

// a left handed tap

*mctool_lhtap*

// a right handed tap

*mctool_rhtap*

// a reaming tool

*mctool_reamer*

// a boring bar

*mctool_boringbar*

*// *a counterbore tool

*mctool_counterbore*

*// *a countersink tool

*mctool_countersink*

* *

*//// Operation types*

*// toolpath* operation was not successfully made or is invalid**

*mcOPERATION_INVALID*

*//* Contour operation type

*mcOPERATION_CONTOUR *

// Drill operation type

*mcOPERATION_DRILL *

*// *Pocket operation type

*mcOPERATION_POCKET *

*// *Router Contour operation type


*mcOPERATION_ROUTER_CNTR *

// Router Pocket operation type

*mcOPERATION_ROUTER_POCK *

*// *Router Cutoff Operation type

*mcOPERATION_ROUTER_CUTOFF *

*//* Router Block Drill operation type

*mcOPERATION_ROUTER_BLOCK_DRILL *

*//* Surface Machining

*// *multi-surface rough parallel* *operation type**

*mcOPERATION_SRF_RGH_PARALLEL *

*// *multi-surface rough radial* *operation type**

*mcOPERATION_SRF_RGH_RADIAL *

*// *multi-surface rough project* *operation type**

*mcOPERATION_SRF_RGH_PROJECT *

*// *multi-surface rough flowline* *operation type**

*mcOPERATION_SRF_RGH_FLOWLINE *

*// *multi-surface rough contour* *operation type**

*mcOPERATION_SRF_RGH_CONTOUR *

*// *multi-surface rough pocket operation type**

*mcOPERATION_SRF_RGH_POCKET *

*//*multi-surface finish parallel* *operation type**

*mcOPERATION_SRF_FIN_PARALLEL *

*// *multi-surface finish radial* *operation type**

*mcOPERATION_SRF_FIN_RADIAL *

*// *multi-surface finish project* *operation type**

*mcOPERATION_SRF_FIN_PROJECT *

*// *multi-surface finish flowline* *operation type**

*mcOPERATION_SRF_FIN_FLOWLINE *

*// *multi-surface finish contour* *operation type**

*mcOPERATION_SRF_FIN_CONTOUR *
*// *5-Axis drill* *operation type**

*mcOPERATION_5AX_DRILL *

*// *5-Axis Curve* *operation type**

*mcOPERATION_5AX_CURVE *

*// *multi-surface finish pencil trace* *operation type**

*mcOPERATION_SRF_FIN_PENCIL *

*// *multi-surface finish leftover stock operation type**

*mcOPERATION_SRF_FIN_LEFTOVER *

*// *multi-surface finish steep* *operation type**

*mcOPERATION_SRF_FIN_STEEP *

*// *multi-surface finish shallow operation type**

*mcOPERATION_SRF_FIN_SHALLOW *

*// *multi-surface finish constant scallop operation type**

*mcOPERATION_SRF_FIN_CONSCALOP *

*// *multi-surface rough plunge* *operation type**

*mcOPERATION_SRF_RGH_PLUNGE *

*// *multi-surface finish 5 axis flowline* *operation type**

*mcOPERATION_SRF_FLOW5AX *

*// *multi-surface finish 4 axis* *operation type**

*mcOPERATION_SRF_4AX *

*// *merged in ascii nci operation type**

*mcOPERATION_MERGED_NCI *

*// *5 axis swarf* *operation type**

*mcOPERATION_5AX_SWARF *

*// *5 axis roll die operation type**

*mcOPERATION_5AX_ROLLDIE *

*//* Face operation type

*mcOPERATION_FACE *

*//* Multi-surface 5 axis rough operation type


*mcOPERATION_5AX_MSURF *

* *

*//// View *

*mcVIEW_TOP *

*mcVIEW_FRONT *

*mcVIEW_BACK *

*mcVIEW_BOTTOM *

*mcVIEW_SIDE** *

*mcVIEW_LSIDE *

*mcVIEW_ISO *

*//// Drill and Block Drill Sort Methods *

// x plus, y plus

*mcSORT_XpYp*

// x plus, y minus

*mcSORT_XpYm*

// x minus, y plus

*mcSORT_XmYp*

// x minus, y minus

*mcSORT_XmYm*

// x zig plus, y plus

*mcSORT_XzpYp*

// x zig plus, y minus

*mcSORT_XzpYm*

// x zig minus, y plus

*mcSORT_XzmYp*

// x zig minus, y minus

*mcSORT_XzmYm*

// y plus, x plus
*mcSORT_YpXp*

// y plus, x minus

*mcSORT_YpXm*

// y minus, x plus

*mcSORT_YmXp*

// y minus, x minus

*mcSORT_YmXm*

// y zig plus, x plus

*mcSORT_YzpXp*

// y zig plus, x minus

*mcSORT_YzpXm*

//y zig minus, x plus

*mcSORT_YzmXp*

// y zig minus, x minus

*mcSORT_YzmXm*

// sort point to point Cannot be used in SetDrillSortMethod()!

*mcSORT_PP*

// Invalid sort method

*mcSORT_INVALID*

*//// Others *

// current system tolerance � two reals less than this close together
are identical

*mc_tol*

// current chaining tolerace � chaining will jump gaps that are smaller
than this

*mc_chaintol*

// SIM number

*mc_simnumber*
// is the current Mastercam session in Metric (millimeter) mode?

*mc_metric*

*// geometry* creation was not successful**

*mcENTITY_INVALID*

* *

// Cutter Compensation Flags

*mcCUTTER_COMP_OFF *

*mcCUTTER_COMP_LEFT *

*mcCUTTER_COMP_RIGHT *

* *

// Contour Corner Roll Flags

*mcCUTTER_ROLL_NONE*

*mcCUTTER_ROLL_SHARP*

*mcCUTTER_ROLL_ALL*

* *

*// *Pocketing Style Flags

*mcPOCKET_ZIGZAG*

*mcPOCKET_ONEWAY*

*mcPOCKET_CONSTOVERLAPSPIRAL*

*mcPOCKET_PARSPIRAL*

*mcPOCKET_PARSPIRAL_CLEANCORNERS*

*mcPOCKET_TRUESPIRAL*

* *

*// *-- MarkWindow Input* *

*mcWINDOW_INSIDE*

*mcWINDOW_INSIDE_INTR*

*mcWINDOW_INTERSECT*

*mcWINDOW_OUT_INTR*

*mcWINDOW_OUT *

* *
*//* Entity Construction

*mcCONSTRUCTION_COLOR_CURRENT*

*mcCONSTRUCTION_LEVEL_CURRENT*

* *

// message box returns

*mcMSG_CANCEL *

*mcMSG_NO*

*mcMSG_YES*

* *

*// *chaining constants**

*mcCHAIN_UNCLEAR*

*mcCHAIN_CW*

*mcCHAIN_CCW*

*mcCHAIN_ALL_NUMBERED_LEVELS*

*mcCHAIN_ALL_NAMED_LEVELS*

* *

// file access modes

*mcFILE_ACCESS_READ*

*mcFILE_ACCESS_WRITE*

*mcFILE_ACCESS_TEXT*

*mcFILE_ACCESS_BINARY*

* *

// colors

*mcCOLOR_BLACK*

*mcCOLOR_DARKBLUE*

*mcCOLOR_GREEN*

*mcCOLOR_TEAL*

*mcCOLOR_DARKRED*

*mcCOLOR_PURPLE*
*mcCOLOR_BROWN*

*mcCOLOR_LIGHTGREY*

*mcCOLOR_DARKGREY*

*mcCOLOR_BLUE*

*mcCOLOR_LIGHTGREEN*

*mcCOLOR_LIGHTBLUE*

*mcCOLOR_RED*

*mcCOLOR_MAGENTA*

*mcCOLOR_YELLOW*

*mcCOLOR_WHITE*

* *

*// *linestyles

*mcLINESTYLE_SOLID*

*mcLINESTYLE_HIDDEN*

*mcLINESTYLE_CENTER*

*mcLINESTYLE_PHANTOM*

*mcLINESTYLE_ZBREAK*

* *

*// *pointstyles

*mcPOINTSTYLE_3DSTAR*

*mcPOINTSTYLE_DOT*

*mcPOINTSTYLE_CROSS*

*mcPOINTSTYLE_X*

*mcPOINTSTYLE_CIRCLE*

*mcPOINTSTYLE_SQUARE*

*mcPOINTSTYLE_WIRETHREAD (WIRE product Only)*

*mcPOINTSTYLE_WIRECUT (WIRE product Only)*

* *

*// *clockwise/counterclockwise flags

*mcCW_AND_CCW*
*mcCW***

*mcCCW***

* *

*
*

* *

*///////////////////////////////////////////////////////////////////////////////*

*CLASSES*

*///////////////////////////////////////////////////////////////////////////////*

* *

Links:

Point <#McPt>

Line <#mcLn>

Arc <#McAr>

Rectangle <#McRe>

Leads <#McLeads>

DepthCuts <#McDepthCuts>

Overrides <#McOverride>

*//// Class to hold a Point's X, Y, Z co-ordinates *

McPt

McPt.X = Point�s X co-ordinate

McPt.Y = Point�s Y co-ordinate

McPt.Z = Point�s Z co-ordinate

*//// Class to hold a Line's endpoints X, Y, Z co-ordinates*

*McLn*

McLn.X1 = Line�s startpoint X co-ordinate

McLn.Y1 = Line�s startpoint Y co-ordinate


McLn.Z1 = Line�s startpoint Z co-ordinate

McLn.X2 = Line�s endpoint X co-ordinate

McLn.Y2 = Line�s endpoint Y co-ordinate

McLn.Z2 = Line�s endpoint Z co-ordinate

*//// Class to hold an arc's center point X,Y,Z co-ordinates, radius,


and angles*

McAr

McAr.X = Arc�s centerpoint X co-ordinate

McAr.Y = Arc�s centerpoint Y co-ordinate

McAr.Z = Arc�s centerpoint Z co-ordinate

McAr.R = Arc�s radius

McAr.SA = Arc�s start angle in degrees

McAr.SW = Arc�s sweep angle in degrees

McAr.View = Arc�s view number

*//// Class to hold a Rectangle�s cornerpoints and Z co-ordinate*

*McRe*

McRe.X1 = Rectangle�s startpoint X co-ordinate

McRe.Y1 = Rectangle�s startpoint Y co-ordinate

McRe.X2 = Rectangle�s endpoint X co-ordinate

McRe.Y2 = Rectangle�s endpoint Y co-ordinate

McRe.Z = Rectangle�s Z co-ordinate

*//// Class to hold toolpath Lead-in and Lead-out information*

*McLeads*

McLeads.Useline = Use a line for leading in/out

McLeads.LineLength = Length of lead in/out line

McLeads.LineTangent = Is the line Tangent or Perpendicular?

McLeads.LineRampHeight = Height of lead in/out Line (defining a �ramp�)


McLeads.Usearc = Use an arc for leading in/out

McLeads.ArcRadius = Radius of lead in/out arc

McLeads.ArcSweep = Angular sweep of lead in/out arc

McLeads.ArcHelixHeight = Height of lead in/out Arc (defining a helix)

*//// Class to hold toolpath Depth Cut information*

*McDepthCuts*

McDepthCuts.MaxStep = Maximum step down of roughing passes

McDepthCuts.FinalStep = Desired depth of final pass

//// *Class to hold toolpath generation overrides in *

*//// MakeOperationFromName() and MakeOperationFromID()*

*McOverride*

McOverride.DepthOn = override operation depth?

McOverride.Depth = new depth if DepthOn = TRUE

McOverride.FeedRateOn = override operation feed rate?

McOverride.FeedRate = new feed rate if FeedRateOn = TRUE

McOverride.FeedRatePercentOn = new feed rate is a percentage?

McOverride.SpindleSpeedOn = override operation spindle speed?

McOverride.SpindleSpeed= new spindle speed if SpindleSpeedOn = TRUE

McOverride.SpindleSpeedPercentOn = new spindle speed is a percentage?

*///////////////////////////////////////////////////////////////////////////////*

*FUNCTIONS*

*///////////////////////////////////////////////////////////////////////////////*

* *

Links:
Script Debugging utilities <#Debugging>

Prompt area message functions <#Prompts>

Simple Input functions <#SimpleInput>

Entity Prompt/Inquiries functions <#EntityPrompts>

Chaining functions <#Chaining>

Database Search functions <#Search>

Entity Creation functions <#Creation>

Excel File Read/Write functions <#Excel>

Utility functions <#Utilities>

Toolpath Generation functions <#Toolpaths>**

* *

* *

*//// Script debugging utilities*

// pop up a window with a string and an integer value

Void *ShowValue*(

String, (Input: the string to place before integer value)

Integer (Input: the integer value to display)

// pop up a window with a string and a real (or double prec.) value

Void *ShowDouble*(

String, (Input: the string to place before real value)

Real (Input: the real value to display)

// pop up a window with a string


Void *ShowString*(

String (Input: the string to display)

*//// Prompt area message functions*

// erase the Mastercam prompt area at the bottom of the Mastercam window

Void *ClearPromptLines*()

// erase the menu area

Void *ClearMenu*()

// erase menu area & prompt area

Void *ClearMenuAndPrompts*()

// write a string to the prompt area

Void *WriteString*(

String (Input: the string to display)

// write an integer to the prompt area

Void *WriteNumber*(

Integer (Input: the integer to display)

// write a real (double prec.) to the prompt area

Void *WriteValue*(

Real (Input: the real number to display)

)
*//// Simple Input functions *

// ask for a point location

Bool *askPoint*(

McPt (Output: the point)

// ask for an angle in degrees � note that the passed value will be the
default value

Bool *askAngle*(

Real (Input/Output: the angle)

// ask for an integer number � note that the passed value will be the
default value

Bool *askNumber*(

String, (Input: Prompt area text)

Integer, (Input: Lower bound on number)

Integer, (Input: Upper bound on number)

Integer (Input/Output: the number)

// ask for a real (or double prec.) number � note that the passed value
will be the default value

Bool *askValue*(

String, (Input: Prompt area text)

Real, (Input: Lower bound on number)

Real, (Input: Upper bound on number)

Real (Input/Output: the real number)

)
// ask for a text string

String *askString*(

String, (Input: Default text)

// ask for a color � note that the passed value will be the default value

Bool *askColor*(

Integer (Input/Output: the color number)

// ask for a level � note that the passed value will be the default value

Bool *askLevel*(

Integer (Input/Output: the level number)

// ask a �Yes/No� question and return one of the MessageBox constants


<#MsgBox>

Integer *askYesNo*(

String (Input: question being asked)

// ask a �Yes/No/Cancel� question and return one of the MessageBox


constants <#MsgBox>

Integer *askYesNoCancel*

String (Input: question being asked)

*//// Entity Prompt/Inquiry functions*


// ask for an entity and make it the 'current active' entity

Bool *AskForEntity*(

String, (Input: Prompt area text)

Integer (Input: entity Ids �or�ed together)

// set the current active entity based on an entity's eptr

Bool *SetEntityFromEptr*(

Integer (Input: entity�s pointer)

// get the eptr of the current active entity (see colors <#Colors> above)

Integer *GetEntityEptr*()

// get the type of the current active entity

Integer *GetEntityType*()

// get the color of the current active entity

Integer *GetEntityColor*()

// set the color of the current active entity

Void *SetEntityColor*(integer)

// get the level of the current active entity

Integer *GetEntityLevel*()

// set the level of the current active entity

Void *SetEntityLevel*(integer)
// get the style of the current active entity (see linestyles <#Styles>
above)

Integer *GetEntityStyle*()

// set the style of the current active entity

Void *SetEntityStyle*(integer)

// get the 'bits'of the current active entity

Integer *GetEntityBits*()

//get the co-ordinates of a point entity

Bool *GetPointData*(

Integer (Input: entity�s pointer, or -1 for current entity

McPt, (Outut: the point data)

//get the co-ordinate�s of a line entity

Bool *GetLineData*(

Integer (Input: entity�s pointer, or -1 for current entity

McLn, (Outut: the line data)

//get the co-ordinate�s of an arc entity

Bool *GetArcData*(

Integer (Input: entity�s pointer, or -1 for current entity

McAr, (Outut: the arc data)

//get the co-ordinate�s of a rectangle

Bool *GetRectangleData*(

Integer (Input: entity�s pointer, or -1 for current entity

McRe, (Outut: the rectangle data)


)

// unselect the current active entity

Void *UnselectEntity*()

// window select a bunch of entities and set their select bits

Bool *MarkWindow*(

String, (Input: Prompt area text)

Integer, (Input: allowable entity types <#Types> added together)

Integer (Input: see the Window selection flags <#MarkWindow> above)

// select all entities

Void *SelectAll*()

// unselect all selected entities

Void *UnselectAll*()

// fit the screen to all the selected chains

Void *FitToChains*(

Real (Input: additional margin around chains)

// fit the screen to two XY corner locations

Void *FitToCorners*(

Real, (Input: minimum X)

Real, (Input: minimum Y)

Real, (Input: maximum X)

Real (Input: maximum Y)

)
// Delete the specified entity

Bool *DeleteEntity*(

Integer (Input: entity�s pointer)

// Delete all selected entities

Bool *DeleteAllSelectedEntities*( )

*//// Chaining functions *

// prompt the user to indicate one or more chains &

// make the 1st entity on the 1st chain the current active entity

Bool *AskForChain*(

String, (Input: Prompt area text)

// make the 1st entity on the 1st chain the current active entity

Bool *RewindChains*()

// make the next entity on the current chain the current active entity

Bool *MoveForwardOnChain*()

// make the 1st entity on the next chain the current active entity

Bool *MoveToNextChain*()

// release all the current chain data

Void *FreeChains*()

// prompt for a file (dwg/dxf/mc9/mc8/mc7) file and chain the geometry

Bool *GetChainFromFile*(
String, (Input: file name)

Bool (Input: use input string as a default and prompt for a file)

// chain everything possible in the current part

Bool *ChainAll*(

Bool, (Input : only generate closed chains?)

Bool , (Input: only find chains at Z=0?)

Integer, (Input: only find chains on this level? Use


*mcCHAIN_ALL_NUMBERED_LEVELS *for all levels)

String (Input: only find chains on this level? Use


m*cCHAIN_ALL_NAMED_LEVELS* for all levels)

// remove the current chain from the current list of chains

// return false if the last chain had been un-linked � i.e. there is no
current chain

Bool *UnlinkCurrentChain*()

// is the current chain clockwise, Counter-clockwise, or is it unclear

// (see the chaining constants <#ChainConsts> above)

Integer *IsChainClockwise*()

// ask if the current chain is closed

Bool *IsChainClosed*()

// ask if the current chain is flat

Bool *IsChainFlat*()

// if the current chain is flat, get it�s depth

Real *FlatChainDepth*()
// if the current chain is flat, get it�s view number

Integer *FlatChainViewNumber*()

// reverse the direction of the current chain

Void *ReverseChain*()

*//// Database Search functions*

// initialize for database searching

Bool *StartDBSearch*(

Integer, (Input: entity bits �or�ed together)

Integer (Input: entity Ids �or�ed together)

// get the first or next entity in the database and make it the current
active entity

Bool *NextDBSearch*()

*//// Entity creation functions *

// create a Mastercam Point given an McPt class

// It returns the ID of the Mastercam entity or *mcENTITY_INVALID*

Integer *CreatePoint*(

McPt, (Input: the point data)

integer, (Input: color number, or *mcCONSTRUCTION_COLOR_CURRENT)*

integer (Input: level number, or *mcCONSTRUCTION_LEVEL_CURRENT)*

)
// create a Mastercam Line given an McLn class

// It returns the ID of the Mastercam entity or *mcENTITY_INVALID*

Integer *CreateLine*(

McLn, (Input: the line data)

integer, (Input: color number, or *mcCONSTRUCTION_COLOR_CURRENT*)

integer (Input: level number or *mcCONSTRUCTION_LEVEL_CURRENT*)

// create a Mastercam Arc given an McAr class

// It returns the ID of the Mastercam entity or *mcENTITY_INVALID*

Integer *CreateArc*(

McAr, (Input: the arc data)

integer, (Input: color number, or m*cCONSTRUCTION_COLOR_CURRENT*)

integer (Input: level number, or *mcCONSTRUCTION_LEVEL_CURRENT*)

// create a Mastercam Rectangle given an McRe class

// It returns the ID of the Mastercam entity or *mcENTITY_INVALID*

Integer *CreateRectangle*(

McRe, (Input: the rectangle data)

integer, (Input: color number, or *mcCONSTRUCTION_COLOR_CURRENT*)

integer (Input: level number, or *mcCONSTRUCTION_LEVEL_CURRENT*)

// create a filleted Mastercam Rectangle given an McRe class

// It returns the ID of the Mastercam entity or *mcENTITY_INVALID*

Integer *CreateRectangleWithFillets*(

McRe, (Input: the rectangle data)

Real, (Input: the fillet radius)


integer, (Input: color number, or *mcCONSTRUCTION_COLOR_CURRENT*)

integer (Input: level number, or *mcCONSTRUCTION_LEVEL_CURRENT*)

// create a fillet (an arc tangent to 2 curves)

Void *MakeFilletFromTwoCurves*(

long, (Input: a pointer to an existing curve)

long, (Input: a pointer to another existing curves)

real, (Input: the radius)

integer (Input: see clockwise/counterclockwise flags <#CWCCW> above)

integer, (Input: color number, or *mcCONSTRUCTION_COLOR_CURRENT*)

integer (Input: level number, or *mcCONSTRUCTION_LEVEL_CURRENT*)

// create a fillet (a tangent arc) at every endpoint of curves on a chain

Void *MakeFilletFromChain*(

real, (Input: the radius)

integer (Input: *mcCW_AND_CCW*, *mcCW*, *mcCCW*)

Bool (Input refillet any existing fillets on the chain)

integer, (Input: color number, or *mcCONSTRUCTION_COLOR_CURRENT*)

integer (Input: level number, or *mcCONSTRUCTION_LEVEL_CURRENT*)

// rotate selected entities around a point a given angle. Note :Use


SelectAll() to select all entities to rotate prior to this call.

Bool *Rotate(*

real, (Input: the x point)

real, (Input: the y point)

real, (Input: the z point)

real, (Input: the angle to rotate)


Bool (Input: true = copy entities, false = move entities)

// Mirror selected entities around a line. Note :Use SelectAll() to


select all entities to mirror prior to this call.

Bool *Mirror(*

real, (Input: the x point)

real, (Input: the y point)

real, (Input: the z point)

real, (Input: the x point)

real, (Input: the y point)

real, (Input: the z point)

Bool (Input: true = copy entities, false = move entities)

// Scale selected entities around a point by scale value. Note :Use


SelectAll() to select all entities to scale prior to this call.

Bool *Scale(*

real, (Input: the x point)

real, (Input: the y point)

real, (Input: the z point)

real, (Input: the scale value)

Bool (Input: true = copy entities, false = move entities)

// Translate selected entities from pt1 to pt2. Note :Use SelectAll()


to select all entities to translate prior to this call.

Bool *Translate(*

real, (Input: the x point)

real, (Input: the y point)

real, (Input: the z point)

real, (Input: the x point)


real, (Input: the y point)

real, (Input: the z point)

Integer (Input: from view number)

Integer (Input: to view number)

Bool (Input: true = copy entities, false = move entities)

*//// Excel read/write functions *

// open an Excel file

Bool *OpenExcelFile*(

String (Input: the file name)

// close the open Excel file

Void *CloseExcelFile*()

// save an Excel file

Void *SaveExcelFile*(

String (Input: the file name)

// write a string to an excel file cell

Void *WriteExcelString*(

String, (Input: the cell label)

String (Input: the string to place in the cell)

)
// write an integer string to an excel file cell

Void *WriteExcelNumber*(

String, (Input: the cell label)

Integer (Input: the number to place in the cell)

// write a real (or double prec.) value to an excel file cell

Void *WriteExcelValue*(

String, (Input: the cell label)

Real (Input: the real value to place in the cell)

// read a string from an excel file cell

Bool *AskExcelString*(

String, (Input: the cell label)

String (Output: the string from that cell)

// read an integer number from an excel file cell

Bool *AskExcelNumber*(

String, (Input: the cell label),

Integer (Output: the number from that cell)

// read a real (or double prec.) value from an excel file

Bool *AskExcelValue*(

String, (Input: the cell label)

Real (Output: the real value from that cell)

)
*//// Utility functions *

// prompt for a file name

Bool *AskForFileName*(

String, (Input: Default file name)

String, (Input: File access mode <#FileAccessModes>)

String (Output: the file name)

// get the name of the current Mastercam part

String *GetCurrentFileName*()

// set the name of the current Mastercam part

Void *SetCurrentFileName*(

String (Input: new file name)

// get the path of the current Mastercam directory

String *GetPath*()

// get the path to the current script

String *GetPathOfThisScript*()

// get the path to any particular filetype

String *GetPathFromExtension*(

String (Input: a filetype extension, e.g. �MC9�)

// repaint the screen

Void *RepaintScreen*(
Bool (input: fit the screen to it�s contents?)

// get the name of a certain level, given its number

String *GetLevelName*(

Integer (Input: level number)

// set the name of a certain level

Void *SetLevelName*(

Integer, (Input: level number)

String (Input: new level name)

// get the number of a certain level, given it�s name

Integer *GetLevelNumberFromName*(

String (Input: level name)

// set the current construction level by entering it�s name

Bool *SetLevelByName* (

String (Input: name of level to become current construction level)

// set the current construction level by entering it�s number

Bool *SetLevelByNumber* (

Integer (Input: number of level to become current construction level)

)
// set the named level visible by entering its name

Bool *SetLevelVisibleByName* (

String (Input: name of level)

Bool (Input: True = show/ False = hide)

// set the numbered level visible by entering its level number

Bool *SetLevelVisibleByNumber* (

Integer (Input: number of level)

Bool (Input: True = show/ False = hide)

// import a DXF (or DWG) file into the current Mastercam session

Bool *ReadDXF*(

String (Input: the file name)

// export the current Mastercam part to a DXF (or DWG) file

Bool *WriteDXF*(

String (Input: the file name)

// export the current Mastercam part to a IGES file

Bool *WriteIGES*(

String (Input: the file name)

// Import ANY file type (IGES, STEP, DWG, DXF, Pro/E, Inventor, etc)

// into the current Mastercam session

Bool *ImportFile*(
String (Input: the file name)

// Import NCI from a file

// into the current Mastercam session

Bool *ImportNCI*(

String (Input: the file name)

// save the current Mastercam file

Bool *SaveMC*(

Bool (Input: save the current screen image inside the file?)

// save the current Mastercam file

Bool *SaveMCAs*(

String, (Input: the file name)

Bool (Input: save the current screen image inside the file?)

// open a Mastercam file

Bool *OpenMC*(

String (Input: the path and name of the Mastercam file name)

// Merge a Mastercam file

Bool *MergeMC*(

String (Input: the path and name of the Mastercam file name)

)
// reinitialize the database and/or the OpMgr so it�s empty

Void *NewMC*(

Bool (Input: Only initialize the operation manager?)

// launch an EXE and optionally wait for it to come back

Void *ShellAndWait*(

String, (Input: path and name of executable)

Bool (Input: wait for it to return??)

// launch the file editor and load a file into it

Void *EditFile*(

String (Input: path and name of file to edit)

// Run almost any Mastercam command - this gives access to every function

// that is in the mastercam.ftt file. The input character �codes� are


listed in the Mastercam .ftt file following the function cpp command.

Void *RunMastercamCommand*(

String) (Input: character �code� for each function)

Void *RunMastercamChook*(

String) (Input: name of dll to run)

// send the current graphics screen to a metafile

Bool *DoMetafile*(

String (Input: name of output EMF File)

)
// create a bitmap from the mc9 file

Bool *DoBitmapfile*(

String (Input: name of input MC9 File)

String (Output: name of output BMP File))

// create a bitmap from the nested sheets

Bool *MakeNestedSheetBMP*(

String (Input: name of bmp file to save to)

Integer (Number of sheet to create bitmap of)

// get the number of nested sheets in the file

Integer *GetNestedSheetCount*( )

// get the current graphics view number

Integer *GetGViewNumber*(void)

// set the current view to a new number & repaint the screen

Void *SetGViewNumber*(

Integer (Input: new view number)

// get the current construction plane view number

Integer *GetCPlaneNumber*(void)

// set the current construction plane view to a new number

Void *SetCPlaneNumber*(

Integer (Input: new view number)

)
// get the current tool plane view number

Integer *GetTPlaneNumber*(void)

// set the current tool plane view to a new number

Void *SetTPlaneNumber*(

Integer (Input: new view number)

// get the current construction plane & tool plane to the graphics view
flag

Bool *GetCPlaneEqualGView *(void)

// set the current construction plane & tool plane to the graphics view flag

Void *SetCPlaneEqualGView *(

Bool (Input: true to set construction & tool plane


equal to graphics view flag)

// add the current entity to a new or existing group

Bool *AddCurrentEntToGroup*(

String) (Input: groupName)

// remove the current entity from a group

Bool *RemoveCurrentEntFromGroup*(

String, (Input: groupName)

Bool) (Input: if this is the last entity in the group, delete the group)

// Get the group name from the group number

String *GetGroupNameFromNumber*( int number);


// Set the group name for the group number

BOOL *SetGroupNameFromNumber*( int number, BSTR name);

// Get the group number for the given name

int *GetGroupNumberFromName*( BSTR name);

// Delete the group from the group number

Void *DeleteGroupFromNumber*( int number);

// Delete the group from the group name

Void *DeleteGroupFromName*( BSTR name);

// Create a group from the name

BOOL *CreateGroupFromName*( BSTR name);

// Create a default group

Void *CreateGroup*();

// Set the current group by name

Bool *SetCurrentGroupFromName(*

String (Input: groupName)

// Set the current group by number

Bool *SetCurrentGroupFromNumber(*

Integer (Input: groupNumber)

// Set the machine definition name

Bool *SetActiveMachine(*
String ) (Input: machine definition name)

// Get the active machine definition name

BSTR *GetActiveMachine()*

// Change the machine type

Bool *ChangeMachineType(** *

Integer* )** (*Input: Application_module_types eg. *mcROUTER_EXE )*

// get the color of the background

Integer *GetBackGroundColor*()

// set the color of the background

Void *SetBackGroundColor*(integer)

// Formats the real (or double prec.) to the precision specified and
returns a string

BSTR *FormatValue*(

Real, ( Input: number to be formatted

Integer, ( Input: number of decimal places to format number to )

*//// Toolpath generation functions *

// initialize the depths/planes of a toolpath to reasonable defaults

Void *InitParameters*()

// clear the current parameter defaults


Void *ClearParameters*()

// Update the operation�s Clearance, Retract, TopofStock and Depth


parameters for the //operation id specified

Void *UpdateOperationParameters*(

Integer (Input: operation ID #)

// intialize the Clearance plane of a toolpath

Void *SetClearancePlane*(

Bool, (Input: clearance plane is turned on?)

Bool, (Input: clearance plane height is incremental?)

Real (Input: clearance plane height)

// intialize the Retract plane of a toolpath

Void *SetRetractPlane*(

Bool, (Input: retract plane is turned on?)

Bool, (Input: retract plane height is incremental?)

Real (Input: retract plane height)

// intialize the Top-of-stock plane of a toolpath

Void *SetTopOfStock*(

Bool, (Input: top of stock height is incremental?)

Real (Input: top of stock height)

// initialize the depth of a toolpath

Void *SetDepth*(

Bool, (Input: depth is incremental?)


Real (Input: depth)

Void *SetPlaneNormal*(

Real, (Input: X co-ordinate of tool plane normal vector)

Real, (Input: Y co-ordinate of tool plane normal vector)

Real (Input: Z co-ordinate of tool plane normal vector)

Void *SetEntry*(

Integer, (Input: Enter at midpoint of contour

Real, (Input: Distance to overlap on closed contour between

entry and exit)

McLeads (Input: the entry settings, see McLeads <#McLeads>


class description above)

Void *SetExit*(

McLeads (Input: the exit settings, see McLeads <#McLeads>


class description above)

Void *SetDepthCuts*(

McDepthCuts (Input: the depth cut settings, see McDepthCuts


<#McDepthCuts> class description above)

// regenerate an existing operation

Bool *RegenOp*(

Integer (Input: operation ID #)

)
// display the chain manager with the chains of an existing operation

Void *RunChainManager*(

Integer (Input: operation ID #)

// display the point manager with the points of an existing drill operation

Void *RunPointManager*(

Integer (Input: operation ID #)

// display the parameter screen for an operation

Void *EditOperationParameters*(

Integer (Input: operation ID #)

// display the chain/point/surface manager an existing operation

// which manager will appear depends on the operation type

Void *EditOperationGeometry*(

Integer (Input: operation ID #)

// get the name of the current tool library

String *GetToolLibraryName*()

// set the name of the current tool library

Void *SetToolLibraryName*(

String (Input: new tool library name)

)
// get the name of the current lathe tool library

String *GetLatheToolLibraryName*()

// set the name of the current lathe tool library

Void *SetLatheToolLibraryName*(

String (Input: new lathe tool library name)

// get the name of the current block drilling head library

String *GetBlockDrillLibraryName*()

// set the name of the current block drilling head library

Void *SetBlockDrillLibraryName*(

String (Input: new block drill library name)

// get the name of the current Post (PST) file

String *GetPostName*()

// set the name of the current Post (PST) file

Void *SetPostName*(

String (Input: new PST file name)

// run an operation through the post-processor and generate NC code

Bool *RunPost*(

Integer (Input: operation ID #),

String (Input: name of file to save NC data in),


Bool (Input: put file into Editor after posting?)

// run all the operations in the current file through the post-processor

// and generate NC code

void *RunPostAll*(

String (Input: name of folder to save NC data in � this can be ��

in which case the current NC folder will be used ),

Bool (Input: put file into Editor after posting?)

// make a Contour operation using the current chains and some tool
dimensions

// if you don�t call one or more of the depth/plane initialization


functions, reasonable

// defaults will be used

// this function returns an operation ID # or *mcOPERATION_INVALID*

Integer *MakeContour*(

String, (Input: operation comment)

Real, (Input: tool diameter � or use 0 and just search


on tool # & rad)

Real, (Input: tool corner radius if tool type is mcTOOL_BULL

- or use 0 and just search on tool dia & #)

Integer, (Input: tool number � or use 0 and just search on tool dia & rad)

Integer, (Input: see Mill tool types <#MillTools>)

Integer, (Input: see Cutter compensation flags <#CutterComp>


above)

Integer, (Input: see Corner rolling flags <#RollFlags> above)

Real (Input: slowdown/speedup default FR by this percentage (0-100))

// make a Contour operation using the current chains and a specific tool ID
// if you don�t call one or more of the depth/plane initialization
functions, reasonable

// defaults will be used

// this function returns an operation ID # or *mcOPERATION_INVALID*

Integer *MakeContourWithKnownTool*(

String, (Input: operation comment)

Integer, (Input: tool ID)

Integer, (Input: see Cutter compensation flags <#CutterComp> above)

Integer, (Input: see Corner rolling flags <#RollFlags> above)

Real (Input: slowdown/speedup default FR by this percentage (0-100)

// make a Pocket operation using the current chains and some tool dimensions

// if you don�t call one or more of the depth/plane initialization


functions, reasonable

// defaults will be used

// this function returns an operation ID # or *mcOPERATION_INVALID*

Integer *MakePocket*(

String, (Input: operation comment)

Real, (Input: tool diameter � or use 0 and just search


on tool # & rad)

Real, (Input: tool corner radius if tool type is mcTOOL_BULL

- or use 0 and just search on tool dia & #)

Integer, (Input: tool number � or use 0 and just search on tool dia & rad)

Integer, (Input: see Mill tool types <#MillTools>)

Integer, (Input: see Pocket styles <#PockStyles> above)

Real, (Input: step over value)

Real (Input: slowdown/speedup default FR by this percentage (0-100)

// make a Pocket operation using the current chains and a specific tool ID
// if you don�t call one or more of the depth/plane initialization
functions, reasonable

// defaults will be used

// this function returns an operation ID # or *mcOPERATION_INVALID*

Integer *MakePocketWithKnownTool*(

String, (Input: operation comment)

Integer, (Input: tool ID)

Integer, (Input: see Pocket styles <#PockStyles> above)

Real, (Input: step over value)

Real (Input: slowdown/speedup default FR by this percentage (0-100)

// to add a point to the drill point list

Void *AddDrillPoint* (

Real, (Input: X co-ordinate of point to add to current


drill point list)

Real, (Input: Y co-ordinate of point to add to current drill point list)

Real (Input: Z co-ordinate of point to add to current drill point list)

// to add a point to the drill point list, specifying a drill depth for
this point

Void *AddDrillPointToDepth* (

Real, (Input: X co-ordinate of point to add to current


drill point list)

Real, (Input: Y co-ordinate of point to add to current drill point list)

Real, (Input: Z co-ordinate of point to add to current drill point list)

Real (Input: depth to drill to)

// to add an arc to the block drill point list


Void *AddArcPoint* (

Real, (Input: X co-ordinate of arc center)

Real, (Input: Y co-ordinate of arc center)

Real, (Input: Z co-ordinate of arc center)

Real, (Input: Radius of arc)

Real, (Input: Start angle of arc)

Real (Input: Sweep angle of arc)

// to wipe out the current drill point list

Void *ZeroPts*()

// set the drilling jump height for any points to added after this call

Void *SetDrillJumpHeight*(

Real (Input: Drilling �jump� height)

// set the drilling break through depth for any points to added after
this call

Void *SetDrillBreakThrough* (

Real (Input: Drilling break through distance)

// set the drilling sort method for drilling and block drilling operations

Void *SetDrillSortMethod* (

integer (Input: See Drill sort methods <#Sort> above)

// Get the drilling sort method from the drilling and block drilling
operations in a file

// This function returns the drill sort method See Drill sort methods
<#Sort> above or *mcSORT_INVALID*

Integer *GetDrillSortMethod* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

String (Input: operationName)

// get the operation type from the name of the operation

// this function returns the operation type # or *mcOPERATION_INVALID


*see //operation types

int *GetOperationTypeFromName* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

String (Input: operationName)

// make a Drill operation using the current point(s) and some tool
dimensions

// if you don�t call one or more of the depth/plane initialization


functions, reasonable

// defaults will be used

// this function returns an operation ID # or *mcOPERATION_INVALID*

Integer *MakeDrill*(

String, (Input: operation comment)

Real, (Input: tool diameter � or use 0 and just search


on tool # & tipangle)

Real, (Input: tool tip angle)

Integer, (Input: tool number � or use 0 and just search on tool dia &
tipangle)

Integer (Input: See Drilling tool types <#DrillTools> above)

)
// make a Drill operation using the current point(s) and a known tool ID

// if you don�t call one or more of the depth/plane initialization


functions, reasonable

// defaults will be used

// this function returns an operation ID # or *mcOPERATION_INVALID*

Integer *MakeDrillWithKnownTool*(

String, (Input: operation comment)

Integer (Input: tool ID)

// make a �Block Drill� operation using the current point(s) and current

// block drill library

Integer *MakeBlockDrill*(

String commentString (Input : operation comment)

// let the user define a new tool with a dialog

// this function returns a tool ID #

Integer *DefineNewTool*(

Bool drillTool (Input: will it be a drilling tool?)

// let the user edit an existing tool

Void *EditTool*(

Integer (Input: tool ID #)

// get the diameter of a tool

Real *GetToolDiameter*(

Integer (Input: tool number)


)

// get the corner radius of a tool

Real *GetToolCornerRadius*(

Integer (Input: tool number)

// get the tool number of a tool

Integer *GetToolNumber*(

Integer (Input: tool ID #)

// get the type of a tool (see the milling <#MillTools> and drilling
<#DrillTools> tool types)

Integer *GetToolType*(

Integer (Input: tool number)

// get the tool comment of a tool

BSTR *GetToolComment*(

Integer (Input: tool number)

// get the overall length of a tool

Real *GetToolLength*(

Integer (Input: tool number)

// get the flute length of a tool

Real *GetToolFluteLength*(
Integer (Input: tool number)

// get the tool length offset number of a tool

Integer *GetToolLengthOffsetNumber*(

Integer (Input: tool number)

// get the tool diameter offset number of a tool

Integer *GetToolDiameterOffsetNumber*(

Integer (Input: tool number)

// get the tool file name of a tool

BSTR *GetToolName*(

Integer (Input: tool number)

// get the Job setup material

Stringr *GetJobSetupMaterial*( )

// get the job setup stock size x dimension

Real *GetJobSetupStockSizeX*( )

// get the job setup stock size y dimension

Real *GetJobSetupStockSizeY*( )

// get the job setup stock size Z dimension

Real *GetJobSetupStockSizeZ*( )
// get the job setup stock origin x dimension

Real *GetJobSetupStockOriginX*( )

// get the job setup stock origin y dimension

Real *GetJobSetupStockOriginY*( )

// get the job setup stock origin Z dimension

Real *GetJobSetupStockOriginZ*( )

// get the number of operations in the currently open MC9 file or from

// an external MC9 or OP9 file

Integer *GetOperationCount *(

String (Input: name of external MC9/OP9 file containing toolpath operations

or �� for the currently open MC9 file)

// get the name of the 1^st operation in the currently open MC9 file or from

// an external MC9 or OP9 file

String *GetFirstOperationName*(

String (Input: name of external MC9/OP9 file containing toolpath


operations

or �� for the currently open MC9 file)

// get the name of the next operation from the currently open MC9 file
or from

// an external MC9 or OP9 file

// it assumes GetFirstOperationName() has been called

String *GetNextOperationName*()
// import an operation by name and apply it to the currently selected
points or chains

// this function returns an operation ID # or *mcOPERATION_INVALID*

Integer *MakeOperationFromName *(

String, (Input: name of external MC9 or OP9 file containing toolpath


operations

or �� for the currently open MC9 file)

String (Input: operationName)

String (Input: new operation comment)

McOverride (Input: override information)

// get the ID number of the 1^st operation in the currently open MC9
file or from

// an external MC9 or OP9 file

Integer *GetFirstOperationID*(

String (Input: name of external MC9/OP9 file containing toolpath operations

or �� for the currently open MC9 file)

// get the ID number of the next operation in the currently open MC9
file or from

// an external MC9 or OP9 file

Integer *GetNextOperationID*(void)

// get the compensation side of a contour operation from the currently


open MC9 file

// or from an external MC9 or OP9 file

// it returns one of the Cutter compensation flags <#CutterComp> above

Integer *GetContourOperationSideFromName*(

String, (Input: name of external MC9 or OP9 file containing toolpath


operations

or �� for the currently open MC9 file)


String (Input: operationName)

// set the compensation side of a contour operation from the currently


open MC9 file

// or from an external MC9 or OP9 file

// use one of the Cutter compensation flags <#CutterComp> above

Bool *SetContourOperationSideFromName*(

String, (Input: name of external MC9 or OP9 file containing toolpath


operations

or �� for the currently open MC9 file)

String (Input: operationName)

integer ( Input cutter comp flag)

// get the compensation side of a contour operation from the currently


open MC9 file

// or from an external MC9 or OP9 file

// it returns one of the Cutter compensation flags <#CutterComp> above

Integer *GetContourOperationSideFromID*(

String, (Input: name of external MC9 or OP9 file containing toolpath


operations

or �� for the currently open MC9 file)

integer (Input: operation ID)

// set the compensation side of a contour operation from the currently


open MC9 file

// or from an external MC9 or OP9 file

// use one of the Cutter compensation flags <#CutterComp> above

Bool *SetContourOperationSideFromID*(

String, (Input: name of external MC9 or OP9 file containing toolpath


operations

or �� for the currently open MC9 file)

integer (Input: operation ID)

integer ( Input cutter comp flag)

// import an operation by ID number and apply it to the currently


selected points or chains

// this function returns an operation ID # or *mcOPERATION_INVALID*

Integer *MakeOperationFromID *(

String, (Input: name of external MC9 or OP9 file containing toolpath


operations

or �� for the currently open MC9 file)

Integer, (Input: operation ID)

String, (Input: new operation comment)

McOverride (Input: override information)

// get the name of an operation in the currently open MC9 file or from

// an external MC9 or OP9 file given it�s operation ID

String *GetOperationNameFromID*(

String, (Input: name of external MC9 or OP9 file containing toolpath


operations

or �� for the currently open MC9 file)

Integer (Input: the operation ID number)

// get the operation type from the name of the operation

// this function returns the operation type # or *mcOPERATION_INVALID


*see //operation types

integer *GetOperationTypeFromName* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

String (Input: operationName)

// get the operation type from the id of the operation

// this function returns the operation type # or *mcOPERATION_INVALID


*see //operation types

integer *GetOperationTypeFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// get the operation group from the id of the operation

// this function returns the operation group # or *mcOPERATION_INVALID


*see //operation types

integer *GetOperationGroupFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// Set the operation group # for the id of the operation

// this function sets the operation group #

bool S*etOperationGroupFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

Integer (Input: the operation group number)

// get the operation tool display from the id of the operation


// this function returns the operation tool display flag

bool *GetOperationToolDisplayFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// Set the operation tool display for the id of the operation

// this function sets the tool display on/off

bool S*etOperationToolDisplayFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

Bool (Input: tool display on/off)

// get the operation locked flag from the id of the operation

// this function returns the operation locked flag

bool *GetOperationLockedFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// Set the operation locked flag for the id of the operation

// this function sets the locked flag on/off

bool S*etOperationLockedFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

Bool (Input: locked on/off)

)
// get the operation posting flag from the id of the operation

// this function returns the operation posting flag

bool *GetOperationPostingFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// Set the operation posting flag for the id of the operation

// this function sets the posting flag on/off

bool S*etOperationPostingFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

Bool (Input: posting on/off)

// get the operation dirty flag from the id of the operation

// this function returns the operation dirty flag

bool *GetOperationDirtyFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// Set the operation dirty for the id of the operation

// this function sets the dirty flag on/off

bool S*etOperationDirtyFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )
Integer (Input: the operation ID number)

Bool (Input: dirty on/off)

// get the operation selected from the id of the operation

// this function returns the operation selected flag

bool *GetOperationSelectedFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// Set the operation selected for the id of the operation

// this function sets the selected flag on/off

bool S*etOperationSelectedFromID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

Bool (Input: selected display on/off)

// get the operation id from the nested sheet id

// this function returns the operation id # or *mcOPERATION_INVALID *see


//operation types

integer *GetOperationIDFromSheet*(

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the sheet ID number)

// get the tool number from the supplied id of the operation

integer *GetToolNumberFromOperationID* (
String ( Input: name of external MC9 or OP9 file containing toolpath
operations )

Integer (Input: the operation ID number)

// get the nci file name and path from the supplied id of the operation

string *GetNciNameFromOperationID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// Set the nci file name of the supplied id of the operation

Bool *SetNciNameFromOperationID* (

Integer (Input: the operation ID number)

String ( path and name to the nci file )

// get the minimum z value from nci of the supplied id of the operation

Real *GetNciMinZFromOperationID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

// get the maximum z value from nci of the supplied id of the operation

Real *GetNciMaxZFromOperationID* (

String ( Input: name of external MC9 or OP9 file containing toolpath


operations )

Integer (Input: the operation ID number)

)
Bool *MillToolExists*(

String, (Input: tool library name)

Real, (Input: desired tool diameter (or 0 in which case


dia is not used in the

search))

Real, (Input: desired tool corner radius (or 0 in which


case corner rad is not used

in the search))

Integer (Input: desired tool number (or 0 in which case


number is not used in the

search))

Integer (Input: tool type see Milling tool types <#MillTools>)

// Gets the mill tool ptr for the given information.

long *GetMillToolPtr*(

String, (Input: tool library name)

Real, (Input: desired tool diameter (or 0 in which case


dia is not used in the

search))

Real, (Input: desired tool corner radius (or 0 in which


case corner rad is not used

in the search))

Integer (Input: desired tool number (or 0 in which case


number is not used in the

search))

Integer (Input: tool type see Milling tool types <#MillTools>)

Bool *DrillToolExists*(

String, (Input: tool library name)

Real, (Input: desired tool diameter (or 0 in which case


dia is not used in the

search))

Real, (Input: desired tool tip angle (or 0 in which case


tip angle is not used

in the search))

Integer (Input: desired tool number (or 0 in which case


number is not used in the

search))

Integer (Input: tool type see Drilling tool types <#DrillTools>)

// Gets the drill tool ptr for the given information.

long *GetDrillToolPtr*(

String, (Input: tool library name)

Real, (Input: desired tool diameter (or 0 in which case


dia is not used in the

search))

Real, (Input: desired tool tip angle (or 0 in which case


tip angle is not used

in the search))

Integer (Input: desired tool number (or 0 in which case


number is not used in the

search))

Integer (Input: tool type see Drilling tool types <#DrillTools>)

Bool *DoNest*(

String (Input: full path to the MCLINK.INI file containing nesting


parameters

(see NESTING_EXAMPLE.VBS))

Bool (Input: Hide (TRUE) or Show(FALSE) the nesting parameters dialog)

Você também pode gostar