<?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 Re: Manufacturing (CAM) API Feedback in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/12277285#M4008</link>
    <description>&lt;P&gt;Does anyone have a list of the available CAM events we can track? I'm hoping for events like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;onOperationRename&lt;/LI&gt;
&lt;LI&gt;onOperationEdit&lt;/LI&gt;
&lt;LI&gt;onOperationGenerate&lt;/LI&gt;
&lt;LI&gt;onOperationReOrder&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;or events to that effect.&lt;/P&gt;</description>
    <pubDate>Sat, 30 Sep 2023 21:47:13 GMT</pubDate>
    <dc:creator>scottmoyse</dc:creator>
    <dc:date>2023-09-30T21:47:13Z</dc:date>
    <item>
      <title>Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11869814#M3958</link>
      <description>&lt;P&gt;With the latest Fusion 360 release, available starting today, you will see a huge increase in the APIs available for the manufacturing workspace.&amp;nbsp; This is a massive release, that I know many of you have been waiting for!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-36B1FFB5-5291-4532-8F11-90E912769B34" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;See here for a comprehensive list of these new capabilities.&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You'll notice that all of the new Manufacture functionality is designated as being in "Preview". We're being cautious and releasing it as a preview, so we can react to problems and suggestions for improvement and be open to &lt;STRONG&gt;making&lt;/STRONG&gt; &lt;STRONG&gt;changes that might break compatibility&lt;/STRONG&gt;. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please test it out and let us know in this thread: &lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;If you find something that doesn't work.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;If something doesn't make sense.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;If the documentation needs to be improved.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Also, feel free to share successes with the capabilities. &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Depending on the feedback we get, the plan is to take it out of preview after one or two major releases.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 00:36:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11869814#M3958</guid>
      <dc:creator>prainsberry</dc:creator>
      <dc:date>2023-04-04T00:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11873373#M3959</link>
      <description>&lt;P&gt;Thanks for the great work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be useful to add a method to the PostConfiguration object that can income a list of post properties in the cps file.&lt;/P&gt;
&lt;P&gt;I don't have an answer to this question, but perhaps there is no smart way to do this.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/post-processor-and-pyton-script/td-p/11818059" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/fusion-360-api-and-scripts/post-processor-and-pyton-script/td-p/11818059&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 02:10:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11873373#M3959</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-05T02:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11873555#M3960</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Great Job TF360,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check &lt;EM&gt;&lt;STRONG&gt;API&lt;/STRONG&gt;&lt;/EM&gt; page:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-C6B71469-9BE3-46EE-B961-E254324DEB1F" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-C6B71469-9BE3-46EE-B961-E254324DEB1F&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is missing reference link to:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;&lt;A href="https://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/SectionAnalysisInput.htm" target="_blank" rel="noopener"&gt;SectionAnalysisInput&lt;/A&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;MichaelT&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 04:41:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11873555#M3960</guid>
      <dc:creator>MichaelT_123</dc:creator>
      <dc:date>2023-04-05T04:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11876380#M3961</link>
      <description>&lt;P&gt;I created the following script thinking that DocumentToolLibrary could be easily copied by using the toJson and createFromJson methods of the DocumentToolLibrary object.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.cam as cam
import json

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface

        # アクティブドキュメントのツールライブラリ
        # https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-C0A61669-1C70-4A68-8CAA-158108844FC7
        stateToolLib: cam.DocumentToolLibrary = get_cam_product().documentToolLibrary
        ui.messageBox(f'Active DocumentToolLibrary Count:{stateToolLib.count}')
        if stateToolLib.count &amp;lt; 1:
            return

        # json化
        toolLibJson = stateToolLib.toJson()
        print(json.dumps(json.loads(toolLibJson), indent=2))

        # 新規ドキュメント
        app.documents.add(core.DocumentTypes.FusionDesignDocumentType)

        # 新規ドキュメントのツールライブラリ
        newToolLib: cam.DocumentToolLibrary = get_cam_product().documentToolLibrary

        # 新規ドキュメントのツールライブラリにインポート
        newToolLib.createFromJson(toolLibJson)
        ui.messageBox(f'New DocumentToolLibrary Count:{newToolLib.count}')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


def get_cam_product() -&amp;gt; cam.CAM:
    '''
    CAMの取得
    '''
    app: core.Application = core.Application.get()
    activete_cam_env()

    return app.activeProduct


def activete_cam_env() -&amp;gt; None:
    '''
    CAMアクティブ
    '''
    app: core.Application = core.Application.get()
    ui: core.UserInterface = app.userInterface

    camWS: core.Workspace = ui.workspaces.itemById('CAMEnvironment') 
    camWS.activate()&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;No error was generated, but no tool was created in the newly created document.&lt;/P&gt;
&lt;P&gt;(ver&lt;SPAN&gt;2.0.15775&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P&gt;Please let me know if there is anything wrong with my method.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 00:33:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11876380#M3961</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-06T00:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11876397#M3962</link>
      <description>&lt;P&gt;I misunderstood the return value of the createFromJson method.&lt;BR /&gt;It turns out that we can simply add without using json.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.cam as cam

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface

        # active doc toollibrary
        # https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-C0A61669-1C70-4A68-8CAA-158108844FC7
        stateToolLib: cam.DocumentToolLibrary = get_cam_product().documentToolLibrary
        ui.messageBox(f'Active DocumentToolLibrary Count:{stateToolLib.count}')
        if stateToolLib.count &amp;lt; 1:
            return

        # new doc toollibrary
        app.documents.add(core.DocumentTypes.FusionDesignDocumentType)
        newToolLib: cam.DocumentToolLibrary = get_cam_product().documentToolLibrary

        # import tools
        [newToolLib.add(t) for t in stateToolLib]
        ui.messageBox(f'New DocumentToolLibrary Count:{newToolLib.count}')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 06 Apr 2023 00:47:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11876397#M3962</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-06T00:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11876509#M3963</link>
      <description>&lt;P&gt;I tested changing the tool number.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.cam as cam

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface

        # Active Doc ToolLibrary
        activeToolLib: cam.DocumentToolLibrary = get_cam_product().documentToolLibrary
        if activeToolLib.count &amp;lt; 1:
            return

        # get tool
        tool: cam.Tool = activeToolLib[0]

        # get tool_number Parameter
        prm: cam.CAMParameter = tool.parameters.itemByName('tool_number')

        # change tool_number
        prm.value.value += 1

        # ToolLibrary Update
        # https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-34200AFB-2CC9-463D-8BCC-502F57D1E81B
        activeToolLib.update(tool, True)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


def get_cam_product() -&amp;gt; cam.CAM:
    '''
    CAMの取得
    '''
    app: core.Application = core.Application.get()
    activete_cam_env()

    return app.activeProduct


def activete_cam_env() -&amp;gt; None:
    '''
    CAMアクティブ
    '''
    app: core.Application = core.Application.get()
    ui: core.UserInterface = app.userInterface

    camWS: core.Workspace = ui.workspaces.itemById('CAMEnvironment') 
    camWS.activate()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I noticed that the tool number is not changed unless the DocumentToolLibrary.update method is used, but since the second argument in the document is listed as "updateFeedAndSpeed", I misunderstood that it was only about the cutting condition.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-34200AFB-2CC9-463D-8BCC-502F57D1E81B" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-34200AFB-2CC9-463D-8BCC-502F57D1E81B&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 662px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1199011i133F6108786395AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, even if the second argument is set to false, the update is still performed, so I did not understand what the parameter meant.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 02:17:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11876509#M3963</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-06T02:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11876614#M3964</link>
      <description>&lt;P&gt;Sorry for repeating myself.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I understand the meaning of the second argument of the update method.&lt;/P&gt;
&lt;P&gt;We create one tool and create a DRILL operation.&lt;BR /&gt;The settings are as follows&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 280px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1199014i0FC559226B317E08/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, run the script to halve the spindle speed.&lt;BR /&gt;The second argument is "True".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.cam as cam

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface

        # Active Doc ToolLibrary
        activeToolLib: cam.DocumentToolLibrary = get_cam_product().documentToolLibrary
        if activeToolLib.count &amp;lt; 1:
            return

        # get tool
        tool: cam.Tool = activeToolLib[0]

        # get preset
        presets: cam.ToolPresets = tool.presets
        preset: cam.ToolPreset = presets.itemsByName('Default preset')[0]

        # change spindleSpeed
        prm: cam.CAMParameter = preset.parameters.itemByName('tool_spindleSpeed')
        prm.value.value /= 2

        # ToolLibrary Update
        activeToolLib.update(tool, True)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


def get_cam_product() -&amp;gt; cam.CAM:
    '''
    CAMの取得
    '''
    app: core.Application = core.Application.get()
    activete_cam_env()

    return app.activeProduct


def activete_cam_env() -&amp;gt; None:
    '''
    CAMアクティブ
    '''
    app: core.Application = core.Application.get()
    ui: core.UserInterface = app.userInterface

    camWS: core.Workspace = ui.workspaces.itemById('CAMEnvironment') 
    camWS.activate()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result is shown here.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 993px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1199015i7883F8AD2E1914D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The spindle speed has been halved on both the operation side and the tool library side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Restore the spindle speed and modify the script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;・・・
        # ToolLibrary Update
        # activeToolLib.update(tool, True)
        activeToolLib.update(tool, False)
・・・&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result of the script execution.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1199016iD7B4358EAAF66ECC/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The tool library has been changed as intended.&lt;BR /&gt;The spindle speed of the operation is not changed, but Preset is changed to "Custom".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understood the meaning of the second argument to be whether or not it affects the cutting conditions of the already created operation.&lt;BR /&gt;However, it should be noted that if "False" is selected, Preset will be changed to "Custom".&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 00:11:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11876614#M3964</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-07T00:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11878761#M3965</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to give the SetupInput an occurrences origin axis as an input? Or to give it a sketch line as an axis?&lt;/P&gt;&lt;P&gt;The expression just always says true if anything is selected, and the value is CadAxis no matter what is selected.&lt;/P&gt;&lt;P&gt;Being able to select a sketch or origin axis as an input would be really helpful in creating setups. The box point option works great for milling operations but is not available for turning operations.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# set setup origin
setup.parameters.itemByName('wcs_origin_boxPoint').value.value = SetupWCSPoint.TOP_XMIN_YMIN.value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Joshuamursic_0-1680815280764.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1199458iDEE35EEC2FCC1760/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Joshuamursic_0-1680815280764.png" alt="Joshuamursic_0-1680815280764.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Joshuamursic_1-1680815310749.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1199459iE86758B8A48785DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Joshuamursic_1-1680815310749.png" alt="Joshuamursic_1-1680815310749.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 21:14:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11878761#M3965</guid>
      <dc:creator>Joshua.mursic</dc:creator>
      <dc:date>2023-04-06T21:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11879008#M3966</link>
      <description>&lt;P&gt;The sample code on the following page is broken because it is not displayed as code.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-6B9555DF-0F90-4F46-B3F6-EADE8A87C4C9" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-6B9555DF-0F90-4F46-B3F6-EADE8A87C4C9&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 887px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1199501iE8D22F00D0FF95C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Perhaps, this is a sample like this.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Get a reference to the CAMManager object.
camMgr = adsk.cam.CAMManager.get()

# Get the ToolLibraries object.
toolLibs = camMgr.libraryManager.toolLibraries

# Get the URL for the local libraries.
localLibLocationURL = toolLibs.urlByLocation(adsk.cam.LibraryLocations.LocalLibraryLocation)

# Get the URL of the folder, which will be for the "CustomTools" folder.
f360FolderURLs = toolLibs.childFolderURLs(localLibLocationURL)
customToolsFolderURL = f360FolderURLs[0]

# Get the "CustomMilling" library.
f360LibraryURLs = toolLibs.childAssetURLs(customToolsFolderURL)

toolLib = None 
for libURL in f360LibraryURLs:
    if 'CustomMilling' in libURL.leafName:
        toolLib = toolLibs.toolLibraryAtURL(libURL)

# Find a specific tool.
for tool in toolLib:
    if tool.parameters.itemByName('tool_description').value.value == '1/16" Ball Endmill':
        return tool
    return None
return None&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 07 Apr 2023 00:01:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11879008#M3966</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-07T00:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11879073#M3967</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6490295"&gt;@Joshua.mursic&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For SetupInput, it is stated to be set after it is created because there are only minimal inputs.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7F3F9D48-ED88-451A-907C-82EAE67DEA93" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7F3F9D48-ED88-451A-907C-82EAE67DEA93&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made a sample where Setup is created by Turning and the origin of WCS is the origin of the root component.&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
import pprint

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface

        # get cam object
        camObj: cam.CAM = get_cam_product()

        # create setup - turning
        setups: cam.Setups = camObj.setups
        setupIpt: cam.SetupInput = setups.createInput(cam.OperationTypes.TurningOperation)
        setup: cam.Setup = setups.add(setupIpt)

        # get origin point
        desRootOcc: fusion.Occurrence = camObj.designRootOccurrence
        root: fusion.Component = desRootOcc.component
        origin: fusion.ConstructionPoint = root.originConstructionPoint

        # set wcs mode
        wcsModePrm: cam.CAMParameter = setup.parameters.itemByName('wcs_orientation_mode')
        wcsModeValue: cam.ChoiceParameterValue = wcsModePrm.value
        pprint.pprint(wcsModeValue.getChoices())
        wcsModeValue.value = 'coordinateSystem'

        # set wcs origin
        wcscSysPrm: cam.CAMParameter = setup.parameters.itemByName('wcs_orientation_cSys')
        wcscSysValue: cam.CadObjectParameterValue = wcscSysPrm.value
        wcscSysValue.value = [origin]

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


def get_cam_product() -&amp;gt; cam.CAM:
    '''
    CAMの取得
    '''
    app: core.Application = core.Application.get()
    activete_cam_env()

    return app.activeProduct


def activete_cam_env() -&amp;gt; None:
    '''
    CAMアクティブ
    '''
    camEnvId = 'CAMEnvironment'
    app: core.Application = core.Application.get()
    ui: core.UserInterface = app.userInterface

    if ui.activeWorkspace.id == camEnvId:
        return

    camWS: core.Workspace = ui.workspaces.itemById(camEnvId) 
    camWS.activate()&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 07 Apr 2023 00:54:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11879073#M3967</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-07T00:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11884935#M3968</link>
      <description>Thank you very much</description>
      <pubDate>Mon, 10 Apr 2023 12:13:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11884935#M3968</guid>
      <dc:creator>Joshua.mursic</dc:creator>
      <dc:date>2023-04-10T12:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11885327#M3969</link>
      <description>&lt;P&gt;is anyone else getting the "Failed to write job file" error on toolpaths when using:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;cam.generateAllToolpaths(False)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Joshuamursic_0-1681139123746.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1200489i42E90B256BCFF3A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Joshuamursic_0-1681139123746.png" alt="Joshuamursic_0-1681139123746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;it can be resolved easily by simply regenerating the toolpath manually. I am just not sure the cause of the error in the first place.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 15:07:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11885327#M3969</guid>
      <dc:creator>Joshua.mursic</dc:creator>
      <dc:date>2023-04-10T15:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11886536#M3970</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6490295"&gt;@Joshua.mursic&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without publishing the f3d files and scripts, no one will be able to find out the cause.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have experienced crashes in the generateToolpath method when processing at startup.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/run-on-startup-addin-problem/m-p/11867248#M18729" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/fusion-360-api-and-scripts/run-on-startup-addin-problem/m-p/11867248#M18729&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 01:59:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11886536#M3970</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-11T01:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11886827#M3971</link>
      <description>&lt;P&gt;I have a design for which simply enumerating CAMProduct's existing NCPrograms is enough to crash Fusion (several crashes should be logged yesterday under my email, all caused by this bug).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;try:
    for pro in cam.ncPrograms:
        pass
except:
    pass&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The code is impossible to debug as simply adding the pro object to the Watch window in VSC's debugger causes Fusion to crash.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 09:32:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11886827#M3971</guid>
      <dc:creator>ltomuta</dc:creator>
      <dc:date>2023-04-11T09:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11886905#M3972</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3787950"&gt;@kandennti&lt;/a&gt; Thanks for all your feedback below, it is much appreciated!&lt;/P&gt;
&lt;P&gt;I don't quite get what you're asking for in the first post though. The entry you have posted refers to the old post processing workflow, whereas PostConfiguration is meant to be used with NCProgram objects. NCProgram contains two lists of CAMParameters, one is accessible via the parameters property (essentially, in the UI the left hand side of the NCProgram dialog and the other tab), the other via the postParameters property (the right side). The latter is the one containing the properties you're looking for. Since those are CAMParameters and not NamedValues, you can easily check whether a property exists and change it according to your needs.&lt;/P&gt;
&lt;P&gt;We have decided against making those parameters available in PostConfiguration, as that object mirrors a .cps file itself and not the values within. The UI behaves similarly: you can change the values only in the NCPrograms dialog, an attempt to edit the post&amp;nbsp;via the library will result in the user editing the .cps file directly.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 07:01:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11886905#M3972</guid>
      <dc:creator>nicole.debowski</dc:creator>
      <dc:date>2023-04-11T07:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11886979#M3973</link>
      <description>&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5667330"&gt;@ltomuta&lt;/a&gt; I have found the reports, but I have not been able to reproduce the issues on my end, iterating and inspecting the NCProgram objects worked fine (in a fairly primitive test case). Inside the reports calls to the NCProgram's operations property fail. Is there any change you can share your design with us?</description>
      <pubDate>Tue, 11 Apr 2023 07:40:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11886979#M3973</guid>
      <dc:creator>nicole.debowski</dc:creator>
      <dc:date>2023-04-11T07:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11887188#M3974</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4418014"&gt;@nicole.debowski&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Thanks for the replies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you are lacking in understanding because of the large number of features added.&lt;BR /&gt;No problem.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 09:17:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11887188#M3974</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-04-11T09:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11887518#M3975</link>
      <description>&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3787950"&gt;@kandennti&lt;/a&gt;: My lack of understanding does not stem from the features added, but may instead come from workflows we have not considered while designing the new API functions or have intended to work differently. The new API around posts and post processing relates to what users see in the UI, but not to the old way of posting via CAM.postProcess(...). If you could please elaborate a bit further about what you feel is missing around posting via NCPrograms (or any new functionality for that matter!), we could figure out whether this has been covered in a different manner users may not expect and thus need better examples, or whether we need to look into implementing that.</description>
      <pubDate>Tue, 11 Apr 2023 11:30:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11887518#M3975</guid>
      <dc:creator>nicole.debowski</dc:creator>
      <dc:date>2023-04-11T11:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11911161#M3976</link>
      <description>&lt;P&gt;I have a strange case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to modify the bottom height for my operation&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Joshuamursic_0-1682026395529.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1204933i3736D310A94ACD22/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Joshuamursic_0-1682026395529.png" alt="Joshuamursic_0-1682026395529.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this parameter is expecting a "&lt;SPAN&gt;CadObjectParameterValue". I am not sure if a construction point counts as this, but the selection field accepts it.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;rotaryRoughOp = mainSetup.operations.item(3)
rotaryRoughOp.parameters.itemByName("bottomHeight_ref").value.value = [lowPoint]

# lowPoint: adsk.fusion.ConstructionPoint&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that the bottom plane that is generated is not at the correct height.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Joshuamursic_1-1682026918258.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1204936iF7C5F0ABF0115FFC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Joshuamursic_1-1682026918258.png" alt="Joshuamursic_1-1682026918258.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;you can see the point that was selected and way below it is the bottom height plane that is created.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 21:42:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11911161#M3976</guid>
      <dc:creator>Joshua.mursic</dc:creator>
      <dc:date>2023-04-20T21:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Manufacturing (CAM) API Feedback</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11911198#M3977</link>
      <description>I assume the issue was that I was giving it a construction point, when I converted that same point into a sketchPoint and then fed that into the parameter it is working correctly.</description>
      <pubDate>Thu, 20 Apr 2023 21:57:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/manufacturing-cam-api-feedback/m-p/11911198#M3977</guid>
      <dc:creator>Joshua.mursic</dc:creator>
      <dc:date>2023-04-20T21:57:37Z</dc:date>
    </item>
  </channel>
</rss>

