<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to create one NC with the same name in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12993199#M889</link>
    <description>&lt;P&gt;Hi, for example, in the company my collegs use a lot probing, mostly fusion for probing,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;they create one toolpath (probing), rename&lt;/P&gt;&lt;P&gt;the create one NC program, inside input toolpath manually&lt;/P&gt;&lt;P&gt;then post, and rename the NC again , so, they are renaming a lot of times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is possible to select one toolpath and create one NC and rename automaticly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i will create a video of what i want.&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6361316289112w960h540r933" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6361316289112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6361316289112w960h540r933');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6361316289112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to me i have to be honest , is not very important because i dont probe a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically they want rename once (toolpath) then with shift+s run script to the selected toolpath, create a nc program with same name on title and inside&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 31 Aug 2024 12:53:14 GMT</pubDate>
    <dc:creator>nubrandao</dc:creator>
    <dc:date>2024-08-31T12:53:14Z</dc:date>
    <item>
      <title>How to create one NC with the same name</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12993199#M889</link>
      <description>&lt;P&gt;Hi, for example, in the company my collegs use a lot probing, mostly fusion for probing,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;they create one toolpath (probing), rename&lt;/P&gt;&lt;P&gt;the create one NC program, inside input toolpath manually&lt;/P&gt;&lt;P&gt;then post, and rename the NC again , so, they are renaming a lot of times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is possible to select one toolpath and create one NC and rename automaticly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i will create a video of what i want.&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6361316289112w960h540r86" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6361316289112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6361316289112w960h540r86');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6361316289112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to me i have to be honest , is not very important because i dont probe a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically they want rename once (toolpath) then with shift+s run script to the selected toolpath, create a nc program with same name on title and inside&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2024 12:53:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12993199#M889</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-08-31T12:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create one NC with the same name</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12993690#M890</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this topic:&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/fusion-api-and-scripts/compare-and-edit-after-running-script/td-p/12970845" target="_blank"&gt;https://forums.autodesk.com/t5/fusion-api-and-scripts/compare-and-edit-after-running-script/td-p/12970845&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you can an example of how to generate NC program por setup, assign it a name, and even assign a specific post-processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it can help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jorge Jaramillo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2024 00:19:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12993690#M890</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2024-09-01T00:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create one NC with the same name</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12995887#M891</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14771110"&gt;@nubrandao&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made a sample.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.fusion as fusion
import adsk.cam as cam

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface

        # Select Count check
        sels: core.Selections = ui.activeSelections
        if not sels.count == 1: return

        # Select Operation
        ope: cam.Operation = sels.item(0).entity

        # Create NcProgram Input
        camObj: cam.CAM = app.activeProduct
        ncProgs: cam.NCPrograms = camObj.ncPrograms

        ncInput: cam.NCProgramInput = ncProgs.createInput()

        # Set Name
        ncInput.displayName = ope.name

        # Set Nc Program Name
        ncInput.parameters.itemByName("nc_program_name").value.value = ope.name

        # Set Operation
        ncInput.operations = [ope]

        # Create NcProgram
        ncProgs.add(ncInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 14:07:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12995887#M891</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-09-02T14:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to create one NC with the same name</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12996545#M892</link>
      <description>&lt;P&gt;hi, that is perfect, could be possible to do the same thing but with multiple selections?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 23:57:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12996545#M892</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-09-02T23:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create one NC with the same name</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12998025#M893</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14771110"&gt;@nubrandao&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you are doing here on this topic is what you hope to do.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/fusion-api-and-scripts/api-create-one-nc-for-each-toolpath/td-p/12994694" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/fusion-api-and-scripts/api-create-one-nc-for-each-toolpath/td-p/12994694&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Slight modification.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.fusion as fusion
import adsk.cam as cam

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface

        # Select Count check
        sels: core.Selections = ui.activeSelections
        if sels.count &amp;lt; 1: return

        # Select Operation
        opeLst: list[cam.Operation] = [sel.entity for sel in sels]

        camObj: cam.CAM = app.activeProduct
        ncProgs: cam.NCPrograms = camObj.ncPrograms

        for ope in opeLst:
            # Create NcProgram Input
            ncInput: cam.NCProgramInput = ncProgs.createInput()

            # Set Name
            ncInput.displayName = ope.name

            # Set Nc Program Name
            ncInput.parameters.itemByName("nc_program_name").value.value = ope.name

            # Set Operation
            ncInput.operations = [ope]

            # Create NcProgram
            ncProgs.add(ncInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 03 Sep 2024 14:26:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12998025#M893</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-09-03T14:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create one NC with the same name</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12999211#M894</link>
      <description>&lt;P&gt;You are the best, that's a life saver in company. Thanks a lot&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 00:47:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-create-one-nc-with-the-same-name/m-p/12999211#M894</guid>
      <dc:creator>nubrandao</dc:creator>
      <dc:date>2024-09-04T00:47:19Z</dc:date>
    </item>
  </channel>
</rss>

