Running Post-Process in HSM to generate .NC file error

Hello everyone,

I was hoping that someone might be able to help me with an issue that I’m running into trying to run Post-Process to generate an .NC file in HSMWorks. I’m using SolidWorks 2016 +HSMworks. I’ve generated the tool paths, run stock simulations, and everything seems ready to go with my program. I hit “Post Process” button in the CAM ribbon, and then when the window comes up, I adjust the setting to what you see below:

When I press “Post,” I get “Error: Failed to evaluate post configuration.”

It doesn’t seem to matter what I try to send out to Post Process, it fails every time. I’m not a programmer, nor am I very experienced with HSM, however, it would appear that there’s maybe an error in the HAAS-VF2.cps file somewhere around like 319. Has anyone else experienced this? If so, how do I fix it?

It is a syntax problem with the post processor. I am currently comparing it to the HAAS generic included with HSM to see if the one created by Chris does anything important.

It’s mostly stripped out codes that the machine will refuse to parse (too old). It’s actually derived from the FANUC post as I felt the HAAS post took advantage of too many new features.

As for the error, it seems to imply that the post was modified at some point. Here is the post as it left my hands although I’d ask Bryan before you use it on the machine as the current post might be something he got from someone else.


Can anyone else duplicate the problem?

Yes, it occurs for me in Fusion 360 as well. Can you email me a copy of your original?

@ChrisPattison, I downloaded your .cps file and put it in my members drive folder. I changed the “Configuration Folder” in the post file path to my member’s drive folder, and loaded your .cps. I then tried to run the post process, and I got an identical result.

So, I opened your .cps file, and chased down the syntax error @ line 319. It was missing a close bracket “}”. I added it, and re-ran the file. Same result, except this time, it found another bracket error. This time it had an extra close parenthesis “)” on the end of the line. I removed it. Saved a new file version, and re-ran the Post Processor again. Same result, but this time, it found another “}” that didn’t need to be in the program. I removed it, and saved the file as “HAAS-VF2-Chris-modified3.cps”.

This time, I noticed that it was behaving completely different when I selected the .cps file in the post processor. It acted as if it recognized it. See attached image below. It added a line of text on the file name “-90s VF2” and it populated the “Properties” table with program information on the right.

When I ran the Post Processor, the program still failed, but this time I got a completely new output. Any ideas?

Try the file at the link again, I made a change. My guess would be that the HSMWorks JS parser for Inventor is a little less robust than one would like… (It didn’t complain about a somewhat glaring error)
I’m not able to test the changes at the moment but if there are more issues I will tomorrow.

@ChrisPattison It worked! I’ve got G-code. Thanks, Chris! I’ll make sure to have someone take a look at it before I run anything.