CAM postProcess "Initialization fails"

CAM postProcess "Initialization fails"

lorraine5RWGT
Enthusiast Enthusiast
831 Views
3 Replies
Message 1 of 4

CAM postProcess "Initialization fails"

lorraine5RWGT
Enthusiast
Enthusiast

 

Getting an "initialization fails" error when using `cam.postProcessAll` or `cam.postProcess`.  Can anyone shed some light why?  Post process works when clicking through UI.

 

        programName = '1001'
        postConfiguration = os.path.join(cam.genericPostFolder, 'mach3mill.cps')
        outputFolder = 'C:/Users/lorraine/AppData/Local/Fusion 360 CAM/nc'
        outputUnits = adsk.cam.PostOutputUnitOptions.MillimetersOutput

        postInput = adsk.cam.PostProcessInput.create(programName, postConfiguration, outputFolder, outputUnits)

        post_success = cam.postProcessAll(postProcessInput)  # Produces error

 

 

Failed:
Traceback (most recent call last):
    [...]
    post_success = cam.postProcessAll(postInput)

  File "C:/Users/lorraine/AppData/Local/Autodesk/webdeploy/production/a93b41817d8af77c4f46fcf4f87b0f003298f7f0/Api/Python/packages\adsk\cam.py", line 375, in postProcessAll
    return _cam.CAM_postProcessAll(self, *args)
RuntimeError: 3 : Initialization fails.

 

0 Likes
832 Views
3 Replies
Replies (3)
Message 2 of 4

boopathi.sivakumar
Autodesk
Autodesk

Are you trying to post process it through some scripts or API?

If so then its missing the cam.postProcess() requires two things one is inputs and other is the setup details you want to post 

here is the sample api program

http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-BF31EB56-B612-44C8-8F07-0C183036C803

 


Boopathi Sivakumar
Senior Technology Consultant

0 Likes
Message 3 of 4

lorraine5RWGT
Enthusiast
Enthusiast

Hi,  thanks for the reply.

It happens both when I use cam_var.postProcessAll with 1 arg (postProcessInput) and when I use cam_var.postProcess with 2 args (operation, postProcessInput)

0 Likes
Message 4 of 4

boopathi.sivakumar
Autodesk
Autodesk

@lorraine5RWGT 

Could you attach the script?

 


Boopathi Sivakumar
Senior Technology Consultant

0 Likes