The following mill post scripting API functions listed are available to aid the advanced user in extending the functionality of the post processing engine built into BobCAM. To test the output of these functions, it is highly recommended that you test them in a scratch post processor rather than in a post processor that is in everyday use.
To test the scripting API in a production post processor, please be sure to make a backup copy of the original, as BobCAM, Inc. may not have a clean copy of the original if you have modified it!
1. short MILL_GetOperationType()
returns:
The current operation type.
2. short MILL_GetDrillCycleType()
returns:
The current drill cycle type.
3. void MILL_SetReturnString(LPCTSTR ReturnString)
For the case that the block will output code within an existing posting line
(i.e n, rapid_move, program_block_1,xr,yr).
This would be used in place of “MILL_OutputText”, and “MILL_ProcessPostLine”.
sets:
Set the return string that will be used to output code with and existing post line.
4. void MILL_OutputText(LPCTSTR OutString)
outputs:
Line of text with CR/LF to the NC text file.
5. void MILL_ProcessPostLine(LPCTSTR OutString)
outputs:
Output Line of variables and constants with CR/LF to the NC text file. (i.e. “n,rapid_move,xr,yr,’M08’”). The variables and constants will be treated just as it would in normal posting blocks.
6. short MILL_GetOutputSubPrograms()
returns:
0 = Output program using long form
1 = Output program using subprograms
7. short MILL_GetUnits()
returns:
0 = Inch
1 = Metric
8. void MILL_SetXFeed(double X)
sets:
X Feed move value used in current operation.
9. double MILL_GetXFeed()
returns:
X Feed move value used in current operation.
10. void MILL_SetYFeed(double Y)
sets:
Y Feed move value used in current operation.
11. double MILL_GetYFeed()
returns:
Y Feed move value used in current operation.
12. void MILL_SetZFeed(double Z)
sets:
Z Feed move value used in current operation.
13. double MILL_GetZFeed()
returns:
Z Feed move value used in current operation.
14. void MILL_SetPreviousXFeed(double X)
sets:
Previous X Feed move value used in current operation.
15. double MILL_GetPreviousXFeed()
returns:
Previous X Feed move value used in current operation.
16. void MILL_SetPreviousYFeed(double Y)
sets:
Previous Y Feed move value used in current operation.
17. double MILL_GetPreviousYFeed()
returns:
Previous Y Feed move value used in current operation.
18. void MILL_SetPreviousZFeed(double Z)
sets:
Previous Z Feed move value used in current operation.
19. double MILL_GetPreviousZFeed()
returns:
Previous Z Feed move value used in current operation.
20. BSTR MakeRealString(double RealValue)
returns:
String formatted according to post processor file question 414 for metric, or 415 for inch.
22. BSTR MakeXString(double XValue)
returns:
String formatted according to post processor file question 414 for metric, or 415 for inch with defined prefix.
23. BSTR MakeYString(double YValue)
returns:
String formatted according to post processor file question 414 for metric, or 415 for inch with defined prefix.
24. BSTR MakeZString(double ZValue)
returns:
String formatted according to post processor file question 414 for metric, or 415 for inch with defined prefix.
25. short MILL_GetNumberOfIntMemoryLoc()
returns:
The number of integer memory locations allocated for global integer storage.
26. short MILL_GetNumberOfDoubleMemoryLoc()
returns:
The number of real number memory locations allocated for global real number storage.
27. short MILL_GetNumberOfStringMemoryLoc()
returns:
The number of string memory locations allocated for global string storage.
28. void MILL_SetIntMemoryLoc(short Index, short SetInteger)
sets:
Set the integer storage at Index with the value in SetInteger.
29. short MILL_GetIntMemoryLoc(short Index)
returns:
Get the integer storage value at Index.
30. double MILL_GetDoubleMemoryLoc(short Index)
returns:
Get the real number storage value at Index.
31. void MILL_SetDoubleMemoryLoc(short Index, double SetDouble)
sets:
Set the real number storage at Index with the value in SetDouble.
32. BSTR MILL_GetStringMemoryLoc(short Index)
returns:
Get the string storage value at Index.
33. void MILL_SetStringMemoryLoc(short Index, LPCTSTR SetString)
sets:
Set the string storage at Index with the value in SetString.
34. short MILL_GetProcessOrder()
returns:
The machining order set in MILL settings.
1 = Individual feature (optimize by feature)
2 = Individual tool (optimize by tool)
35. short MILL_GetNumberOfFeatures()
returns:
Total number of Feature.
36. short MILL_GetCurrentFeatureNumber()
returns:
Current feature number.
37. short MILL_GetNumberOfContours()
returns:
Total number of contours (cut passes).
38. short MILL_GetCurrentContoursNumber()
returns:
Current contours (cut pass) number.
39. short MILL_GetNumberOfContourEntities()
returns:
Total number of the current contours geometric entities.
40. short MILL_GetCurrentContourEntityNumber()
returns:
The number of the current contours, current geometric entity.
41. short MILL_GetOffsetSide()
returns:
0 = No Offset
1 = Offset Left
2 = Offset Right
42. double MILL_GetFeedRate()
returns:
The current feed rate.
43. double MILL_GetGlobalStockHeight()
returns:
The actual height of the defined stock.
44. double MILL_GetFeatureStockHeight()
returns:
The operation stock height.
45. short MILL_GetLeadinType()
returns:
The lead-in type:
0 = Vertical
1 = Parallel
2 = Right Angle
3 = Circular
46. short MILL_GetLeadoutType()
returns:
The lead-out type:
0 = Vertical
1 = Parallel
2 = Right Angle
3 = Circular
47. short MILL_GetFirstLineNumber()
returns:
NC line number start value.
48. short MILL_GetCurrentLineNumber()
returns:
Current NC Line Number.
49. short MILL_GetLineNumberIncrement()
returns:
NC Line number increment.
50. short MILL_GetIsIncremental()
returns:
If the coordinate output is incremental:
0 = No
1 = Yes
51. short MILL_GetFeatureType()
returns:
Feature type:
1 = Center Hole
2 = Hole
3 = Tap
4 = Ream
5 = Counter Bore Hole
6 = Counter Bore Tap
7 = Counter Bore Ream
15 = Roll Tap
16 = Roll Counter Bore Tap
18 = Facing
19 = Pocketing
20 = Contour (Profile)
21 = Chamfer Mill
22 = Engraving
23 = Boring
24 = Thread Milling
26 = Vector Graphics Engraving
29 = Slice Cut Planar
30 = Slice Cut Radial
31 = Slice Cut Spiral
32 = Z Level Rough
33 = Z Level Finish
34 = Equidistant Contour
35 = Pencil Mill
36 = Curve Cut
40 = V-Carving
52. double MILL_GetArcCenterX()
returns:
Arc center X value.
53. double MILL_GetArcCenterY()
returns:
Arc center Y value.
54. double MILL_GetArcRadius()
returns:
Arc radius.
55. double MILL_GetPartLength()
returns:
Overall part length (X dimension).
56. double MILL_GetPartWidth()
returns:
Overall part width (Y dimension).
57. double MILL_GetOffsetAmount()
returns:
Current offset amount.
58. short MILL_GetUserCheckBoxVariable(short Index)
returns:
User defined operation check box variable 1-9.
59. short MILL_GetUserEditIntegerVariable(short Index)
returns:
User defined operation integer variable 1-25.
60. double MILL_GetUserEditRealVariable(short Index)
returns:
User defined operation real number variable 1-25.
61. BSTR MILL_GetUserEditStringVariable(short Index)
returns:
User defined operation string variable 1-25.
62. short MILL_GetUserSelectComboVariable(short Index)
returns:
User defined operation combo box index variable 1-25.
63. short MILL_GetUserCheckBoxSettingsVariable(short Index)
returns:
User defined settings check box variable 1-9.
64. short MILL_GetUserEditIntegerVariable(short Index)
returns:
User defined settings integer variable 1-25.
65. double MILL_GetUserEditRealVariable(short Index)
returns:
User defined settings real number variable 1-25.
66. BSTR MILL_GetUserEditStringVariable(short Index)
returns:
User defined settings string variable 1-25.
67. short MILL_GetUserSelectComboVariable(short Index)
returns:
User defined settings combo box index variable 1-25.