I am using the standard Doosan mill/turn and Haas (mill) nextgen posts with a few personal edits, (formatting and commenting out things I dont want to see), and adding in a line to pull the Tool Description into the heading comment (comment += tool.description ? "- " + tool.description : ""). I have posted a snippet of the Doosan post code below, starting from line 824.
In the Doosan post, special characters are removed from the Tool Description, such as # and /, so "3/4 boring bar" becomes "34 boring bar". This does not happen in the Haas post. (I checked, the description is typed correctly in the Edit Tool box).
The code is very similar between the two and my code to add the tool description is exactly the same.
Any ideas would be appreciated. Thanks
Doosan Code:
var tools = getToolTable();
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
var compensationOffset = tool.isTurningTool() ? tool.compensationOffset : tool.lengthOffset;
var comment = "T" + toolFormat.format(tool.number * 100 + compensationOffset % 100) + " "
//+ "D=" + spatialFormat.format(tool.diameter) + " "
+ (tool.diameter != 0 ? "D=" + spatialFormat.format(tool.diameter) + " " : "")
//+ (tool.isTurningTool() ? localize("NR") + "=" + spatialFormat.format(tool.noseRadius) + " " : "" /*localize("CR") + "=" + spatialFormat.format(tool.cornerRadius)*/)
//+ (tool.taperAngle > 0 && (tool.taperAngle < Math.PI) ? " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg") : "")
+ (zRanges[tool.number] ? "- " + localize("ZMIN") + "= " + spatialFormat.format(zRanges[tool.number].getMinimum()) + " " : "")
//+ "- " + localize(getToolTypeName(tool.type))
comment += tool.description ? "- " + tool.description : ""
;
writeComment(comment);
Solved! Go to Solution.
I am using the standard Doosan mill/turn and Haas (mill) nextgen posts with a few personal edits, (formatting and commenting out things I dont want to see), and adding in a line to pull the Tool Description into the heading comment (comment += tool.description ? "- " + tool.description : ""). I have posted a snippet of the Doosan post code below, starting from line 824.
In the Doosan post, special characters are removed from the Tool Description, such as # and /, so "3/4 boring bar" becomes "34 boring bar". This does not happen in the Haas post. (I checked, the description is typed correctly in the Edit Tool box).
The code is very similar between the two and my code to add the tool description is exactly the same.
Any ideas would be appreciated. Thanks
Doosan Code:
var tools = getToolTable();
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
var compensationOffset = tool.isTurningTool() ? tool.compensationOffset : tool.lengthOffset;
var comment = "T" + toolFormat.format(tool.number * 100 + compensationOffset % 100) + " "
//+ "D=" + spatialFormat.format(tool.diameter) + " "
+ (tool.diameter != 0 ? "D=" + spatialFormat.format(tool.diameter) + " " : "")
//+ (tool.isTurningTool() ? localize("NR") + "=" + spatialFormat.format(tool.noseRadius) + " " : "" /*localize("CR") + "=" + spatialFormat.format(tool.cornerRadius)*/)
//+ (tool.taperAngle > 0 && (tool.taperAngle < Math.PI) ? " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg") : "")
+ (zRanges[tool.number] ? "- " + localize("ZMIN") + "= " + spatialFormat.format(zRanges[tool.number].getMinimum()) + " " : "")
//+ "- " + localize(getToolTypeName(tool.type))
comment += tool.description ? "- " + tool.description : ""
;
writeComment(comment);
Solved! Go to Solution.
Solved by daniel_lyall. Go to Solution.
You can add to what is allowed in the post to what the arrow is pointing to as long as the control recognizes it.
You can add to what is allowed in the post to what the arrow is pointing to as long as the control recognizes it.
Awesome. Thank you...again!
Awesome. Thank you...again!
Can't find what you're looking for? Ask the community or share your knowledge.