331
Mach4 General Discussion / Re: Preload-Tool Macro
« on: January 21, 2017, 02:45:50 PM »
Quoted from Mach4CoreAPI.chm which you will find in the C:\Mach4Hobby\Docs folder if
your system is installed in the default folders. You can view this file by simply clicking
on it. It will open a window that behaves like a Windows help file, which it is. While
the quote below has the essential information, it is difficult to read as unformatted
text and I recommend opening it as a Windows help file for clearer presentation.
mcToolGetSelected
C/C++ Syntax:
int mcToolGetSelected(
MINSTANCE mInst,
int *toolnum);
LUA Syntax:
toolnum, rc = mc.mcToolGetSelected(
number mInst)
Description:
Retrieve the selected (next) tool number.
Parameters: Parameter Description
mInst The controller instance.
toolnum The address of an integer to receive the selected tool number.
Returns: Return Code Description
MERROR_NOERROR No Error.
MERROR_INVALID_INSTANCE The mInst parameter was out of range.
Notes:
None.
Usage:
// Get the selected tool number.
MINSTANCE mInst = 0;
int toolnum = 0;
int rc = mcToolGetSelected(mInst, &toolnum);
your system is installed in the default folders. You can view this file by simply clicking
on it. It will open a window that behaves like a Windows help file, which it is. While
the quote below has the essential information, it is difficult to read as unformatted
text and I recommend opening it as a Windows help file for clearer presentation.
mcToolGetSelected
C/C++ Syntax:
int mcToolGetSelected(
MINSTANCE mInst,
int *toolnum);
LUA Syntax:
toolnum, rc = mc.mcToolGetSelected(
number mInst)
Description:
Retrieve the selected (next) tool number.
Parameters: Parameter Description
mInst The controller instance.
toolnum The address of an integer to receive the selected tool number.
Returns: Return Code Description
MERROR_NOERROR No Error.
MERROR_INVALID_INSTANCE The mInst parameter was out of range.
Notes:
None.
Usage:
// Get the selected tool number.
MINSTANCE mInst = 0;
int toolnum = 0;
int rc = mcToolGetSelected(mInst, &toolnum);