In my configuration the output folder for "Setup sheet" defaults to the inconvenient
C:/Users/Lars/AppData/Local/Fusion 360 CAM/
How can I set another default location?
This is different from "Post", that operation remembers what I used last time.
Solved! Go to Solution.
Solved by paul.clauss. Go to Solution.
Hi @cadTPLWJ
Thanks for posting! It looks like you would like to change the default save location of CAM setup sheets in Fusion 360.
Unfortunately, there is no way to change the default output location for a setup sheet. This idea has been discussed before - please see this forum thread and the links it provides for more information about this.
You could potentially use the Setup sheet post processor to work around this issue, as the post dialogue will remember the previously selected file location.
Hopefully this helps! Please let me know if you have any questions.
This looks promising!
"Setup sheet" is just another post (*.cps) file!
I started also looking into the question http://forums.autodesk.com/t5/post-processors/post-calling-a-post/td-p/6075525 but it was too advanced for me.
I put this code snippet from "post calling a post" at the end of my regular post code, but it doesn´t work and I can´t figure why.
If someone could fix it for me it would be greatly appreciated. Then a single "post" invocation would give me both a NGC and a setup sheet in the same location.
function onTerminate() { var outputPath = getOutputPath(); var postPath = findFile("setup-sheet.cps"); var intermdiatePath = FileSystem.replaceExtension(outputPath, "cnc"); var arguments = "--property unit 1"; // use 0 for inch and 1 for mm arguments += " --property programName \"" + programName + "\""; arguments += " --property programComment \"" + programComment + "\""; arguments += " --log temp.log " + quote(postPath) + " " + quote(intermdiatePath) + " " + quote(outputPath); var exePath = "C:\\Program Files\\HSMWorks x64 SW2011\\post.exe"; execute(exePath, arguments, false, ""); }
Hi @cadTPLWJ
Thanks for the response! The post calling a post option is very interesting - it would be a great way to make your workflow more efficient. Unfortunately, this one is a bit out of my post processor editing abilities as well - you may have better luck posting this question on the HSM Post Processor Forum - there are some great resources for this type of question over there!
You may want to specify which post processor you are trying to add this function to on the HSM Posts forum - it will make this problem easier to troubleshoot!
Please let me know if you have any questions!
I will work on this some more just for the learning experience, eventually asking for help on the POst Processor forum.
Thanks!
This is probably a huge hint, I doubt this is where your posting is coming from:
var exePath = "C:\\Program Files\\HSMWorks x64 SW2011\\post.exe";
Edit: Try something like this:
C:\Users\YOURUSERNAMEHERE\AppData\Local\Autodesk\webdeploy\production\110e62f27b395d1e77f65827ad98f9392983e959\Applications\CAM360\post.exe
The string between production and Applications will almost certainly be different but if you browse to the AppData\Local\Autodesk folder you should be able to search for post.exe. Also AppData is hidden so you'll want to make sure you can view hidden files in Explorer.
I just noticed that too, browsed for post.exe andchanged to
var exePath = "C:\\Users\\Lars\\AppData\\Local\\Autodesk\\webdeploy\\production\\110e62f27b395d1e77f65827ad98f9392983e959\\Applications\\CAM360\\post.exe";
The error dump does not give me too much:
Error(C:\Users\Lars\AppData\Roaming\Autodesk\Fusion 360 CAM\Posts\my_linuxcnc.cps:1262): ReferenceError: quote is not defined ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Stack dump: onTerminate()@C:\Users\Lars\AppData\Roaming\Autodesk\Fusion 360 CAM\Posts\my_linuxcnc.cps:1261 Failed while processing record 15515. Error: Failed to invoke function 'onTerminate'. Error: Failed to invoke 'onTerminate' in the post configuration. Post processing failed.
This is line 1259 to 1262
var arguments = "--property unit 1"; // use 0 for inch and 1 for mm arguments += " --property programName \"" + programName + "\""; arguments += " --property programComment \"" + programComment + "\""; arguments += " --log temp.log " + quote(postPath) + " " + quote(intermdiatePath) + " " + quote(outputPath);
You can see all the API available at http://cam.autodesk.com/posts/reference/.
For the post engine path you can use this particular API:
http://cam.autodesk.com/posts/reference/classPostProcessor.html#a99de5f9f20c026a2e9fedabb5a5c480b
The quote failure is because you only copied part of the required code. quote function could look like this if you need it:
function quote(text) { var result = ""; for (var i = 0; i < text.length; ++i) { var ch = text.charAt(i); switch (ch) { case "\\": case "\"": result += "\\"; } result += ch; } return "\"" + result + "\""; }
You likely just use code similar to what is illustrated in some of the factory posts:
http://cam.autodesk.com/posts/?p=haas_umc-750
Yes,
another ignorant mistake, I assumed quote to be some builtin function.
To summarize, i have two "post" scripts my_linuxcnc.cps and setup-sheet.cps. Both work to my liking when run one after another.
I would like to have my_linuxcnc to call setup-sheet as its last action. (Both Files are included.)
I inherited the onTerminate function from the haas post.
The situation is now that my_linuxcnc runs without showing any error, but the setup sheet is not generated. How do I debug this?
You can do some easy testing by using the log("Im here now") API to write to the generated log file. And you can write the command line to the log as well so you can make sure it works.
I cannot find where log() output goes.
If I make a deliberate syntax error it goes into : C:\Users\Lars\AppData\Local\Temp\Fusion360CAM\1