Tip for machines with low memory

Tip for machines with low memory

Laurens-3DTechDraw
Mentor Mentor
190 Views
0 Replies
Message 1 of 1

Tip for machines with low memory

Laurens-3DTechDraw
Mentor
Mentor

Hi All,

 

Someone one Facebook asked if he could be alerted by Fusion when his NC File became too large for his machine.

His machine has a 400kb limit.

I've written a piece of code that can throw an error when you go over the set limit.

This can be copied and pasted at the end of nearly any post processor and be working straight away.

The 400 number can be changed to the memory limit of your machine in kb's.

 

function onTerminate() {
var outputPath = getOutputPath();
var programFilename = FileSystem.getFilename(outputPath);
var programSize = FileSystem.getFileSize(outputPath)/1024;
if(programSize > 400){
error("Post Processing failed because" + programFilename + "=" + programSize + "kb");
}
}

 

The error it gives will look like this:

274265419_10222086390489623_3441899793519476093_n.jpg

 

Hope it is useful to others as well.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


191 Views
0 Replies
Replies (0)