Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Import machining setup names from Fusion360 into roboDK

#1
Hi, I have a project with many different toolpaths I need to import separately from RoboDK to Fusion360. I want to automatically name each toolpath to include the setup name (see image).

I am able to access the name pattern in Tools->Options->CAM->Name pattern: "%Name%_%ProgID%_T%ToolID%_%Description%". 

Currently, each toolpath is imported with the fusion file name which isn't very helpful. How can I change this name pattern to access the fusion setup name?


Attached Files Thumbnail(s)
       
#2
I don't think this is possible. Can you send us your Fusion project and/or the NC file generated using the APT post processor? We may be able to better investigate.
#3
Hi, 
Please see an example Fusion project with associated apt file and roboDK setup that represents the situation. I would love to be able to include "setup1", "right", "left" and "top" from my fusion CAM setup in my roboDK path names. Let me know if it can be done!
Example fusion project: https://a360.co/3OWwRoJ
Thanks,
Mykal


Attached Files
.apt   Example.apt (Size: 2.43 KB / Downloads: 36)
.rdk   Example.rdk (Size: 3.07 KB / Downloads: 34)
#4
Just following up on this as I'm figuring out it's very important for my workflow. Upon further inspection, the generated roboDK programs export the name of the operation as TYPE "/'Blade door cutout east'". So the operation name must be read and stored by roboDK somewhere. 
Lines 5-7 are:
  TYPE "/'Front wall cutout v15'"
  TYPE "/''"
  TYPE "/'Blade door cutout east'"
I would absolutely love to be able to import machining paths with the name "Blade door cutout east" rather than Front wall cutout v15.
Attached the generated .pg file for reference.


Attached Files
.txt   Blade_doorframe_east.txt (Size: 1.09 KB / Downloads: 28)
#5
Figured it out! If anyone is looking to do the same, you can change lines 1275-1328 in the robodk_autodesk.py file from the Fusion360 add-in to the below. File attached as well if anyone wants it.
    ## Mykal's code:    
    setups = cam.setups
    for setup in setups:
        operations = setup.operations
        for operation in operations:
            programName = operation.name
            if len(programName) < 1:
                programName = AdskProjectName()
            #programName = command.design.active_document.name  
           
            if not programName:
                programName = "Machining"
               
            programName.replace(' ', '')
           
            # Specify a destination folder.
            outputFolder = tempfile.gettempdir()
            ncfile_good_name = outputFolder + '/' + programName + '.apt'
           
            if os.path.isfile(ncfile_good_name):
                os.remove(ncfile_good_name)
           
            # Specify a post configuration to use.
            #postConfig = cam.genericPostFolder + '/' + 'camplete.cps'
            #postConfig = cam.genericPostFolder + '/' + 'apt.cps'    
           
            postConfig = os.path.dirname(os.path.abspath(__file__)) + '/apt_RoboDK.cps'
           
           
            # Specify the NC file output units.
            units = adsk.cam.PostOutputUnitOptions.DocumentUnitsOutput
           
            # Create the postInput object.
            postInput = adsk.cam.PostProcessInput.create(programName, postConfig, outputFolder, units)
           
            # Open the resulting NC file in the editor for viewing
            postInput.isOpenInEditor = False
           
            # Post TOOLPATH
            if operation.hasToolpath == True:
                cam.postProcess(operation, postInput)
                if not wait_written(ncfile_good_name):
                    ShowMessage("No file written or failed to post data. See log for details.")
                    return
                # IMPORTANT: IRIDIUM CNC Tests required the following:
                # Updating post to apt only (not CAMPlete)
                # This post uses ARCS ALWAYS, however, the radius provided is NOT ACCURATE!!!
                # we must force arcs to be ARCS ant not helix by providing a large helix tolerance (default tolerance is 0.002)
                # IRIDIUM CNC required at least 0.05 inch
                RDK.Command("HelixTol", 5)
                RDK.AddFile(ncfile_good_name)


Attached Files
.py   robodk_autodesk.py (Size: 73.79 KB / Downloads: 26)
  




Users browsing this thread:
1 Guest(s)