Todays find.
setup_sheet.cps always generates a log file when run from Fusion 360 "Post Process".
my_linuxcnc.cps does not generate a log file. If I introduce a deliberate error in the script I get a log file.
Why is this?
function onTerminate() {
var outputPath = getOutputPath();
var programFilename = FileSystem.getFilename(outputPath);
var programSize = FileSystem.getFileSize(outputPath);
var postPath = findFile("setup-sheet.cps");
var intermdiatePath = FileSystem.replaceExtension(outputPath, "ngc");
var a = "--property unit 1"; // use 0 for inch and 1 for mm
if (programName) {
a += " --property programName \"'" + programName + "'\"";
}
if (programComment) {
a += " --property programComment \"'" + programComment + "'\"";
}
a += " --property programFilename \"'" + programFilename + "'\"";
a += " --property programSize \"" + programSize + "\"";
a += " --noeditor --log temp.log \"" + postPath + "\" \"" + intermdiatePath + "\" \"" + outputPath + ".html\"";
log(quote(getOutputPath()));
log(getOutputPath());
log(a);
execute(getPostProcessorPath(), a, false, "");
A_Deliberate_bug();
}Log file:
Information: Configuration: Modified LinuxCNC
Information: Vendor: LinuxCNC.org
Information: Posting intermediate data to 'E:\NGC\Parabol.ngc'
Information: Total number of warnings: 1
Error: Failed to post process. See below for details.
...
Code page changed to '1252 (ANSI - Latin I)'
Start time: Friday, March 31, 2017 2:50:32 PM
Code page changed to '20127 (US-ASCII)'
Post processor engine: 4.2.1 41304
Configuration path: C:\Users\Lars\AppData\Roaming\Autodesk\Fusion 360 CAM\Posts\my_linuxcnc.cps
Include paths: C:\Users\Lars\AppData\Roaming\Autodesk\Fusion 360 CAM\Posts
Configuration modification date: Friday, March 31, 2017 2:50:18 PM
Output path: E:\NGC\Parabol.ngc
Checksum of intermediate NC data: 160ac3cd324fe7c644c8ff52fa196f47
Checksum of configuration: 50b39548e7797423839e1d371e93b281
Vendor url: http://www.linuxcnc.org
Legal: Copyright (C) 2012-2015 by Autodesk, Inc.
Generated by: Fusion 360 CAM 2.0.2938
...
Warning: Work offset has not been specified. Using G54 as WCS.
Stop time: Friday, March 31, 2017 2:50:32 PM
"E:\\NGC\\Parabol.ngc"
E:\NGC\Parabol.ngc
--property unit 1 --property programName "'Parabol'" --property programComment "'ABS'" --property programFilename "'Parabol.ngc'" --property programSize "716456" --noeditor --log temp.log "C:\Users\Lars\AppData\Roaming\Autodesk\Fusion 360 CAM\Posts\setup-sheet.cps" "E:\NGC\Parabol.ngc" "E:\NGC\Parabol.ngc.html"
Error(C:\Users\Lars\AppData\Roaming\Autodesk\Fusion 360 CAM\Posts\my_linuxcnc.cps:1288): ReferenceError: A_Deliberate_bug is not defined
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Stack dump:
onTerminate()@C:\Users\Lars\AppData\Roaming\Autodesk\Fusion 360 CAM\Posts\my_linuxcnc.cps:1287
Failed while processing record 34711.
Error: Failed to invoke function 'onTerminate'.
Error: Failed to invoke 'onTerminate' in the post configuration.
Post processing failed.