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?
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.
02-23-2024, 07:02 PM (This post was last modified: 02-23-2024, 07:02 PM by mykalrudie.)
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
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.
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 forsetupinsetups: operations=setup.operations foroperationinoperations: programName=operation.name iflen(programName) <1: programName=AdskProjectName() #programName = command.design.active_document.name
ifnotprogramName: programName="Machining"
programName.replace(' ', '')
# Specify a destination folder. outputFolder=tempfile.gettempdir() ncfile_good_name=outputFolder+'/'+programName+'.apt'
# 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 ifoperation.hasToolpath==True: cam.postProcess(operation, postInput) ifnotwait_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)