Community
Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

omit from posting

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
programming2C78B
174 Views, 3 Replies

omit from posting

I would like to remove this from my post

var tools = getToolTable();
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
var comment = "T" + toolFormat.format(tool.number) + " " +
"D=" + xyzFormat.format(tool.diameter) + " " +
localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);
if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) {
comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");
}
if (zRanges[tool.number]) {
comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum());
}
comment += " - " + tool.description;
writeComment(comment);
}
}
}


If I / it out Fusion says the post is invalid. I do not want to see CR or Taper as it takes up valuable info the line. 

Please click "Accept Solution" if what I wrote solved your issue!
3 REPLIES 3
Message 2 of 4

I’m not at my computer to test, but this should work


var tools = getToolTable();

if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
var comment = "T" + toolFormat.format(tool.number) + " " +
"D=" + xyzFormat.format(tool.diameter) + " ";
if (zRanges[tool.number]) {
comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum());
}
comment += " - " + tool.description;
writeComment(comment);
}
}
}

-

George Roberts

Manufacturing Product manager
If you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!
Message 3 of 4

Thank you, that works. I didn't catch the "+" in line 6 that had to also be removed for it to work. I just copy pasted yours

Please click "Accept Solution" if what I wrote solved your issue!
Message 4 of 4

Would you also be able to advise how to do so for my lathe post? 

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) + " " +
(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;
writeComment(comment);

Please click "Accept Solution" if what I wrote solved your issue!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report