<?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: Edit Sketch via API in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/11004394#M11814</link>
    <description>&lt;P&gt;when following this code i get this error the rootLogger object has no occurrence ItemByName I am wondering where I want wrong here is what i used&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; &amp;nbsp;      sk = root.sketches.ItemByName('Sketch1')
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #Activating SKETCH
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #choose the section sketch as active
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui.activeSelections.clear()
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui.activeSelections.add(sk)


&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; skCmd=ui.commandDefinitions.itemById('SketchActivate')
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; skCmd.execute()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Mar 2022 18:45:21 GMT</pubDate>
    <dc:creator>yosef.ali.omar</dc:creator>
    <dc:date>2022-03-14T18:45:21Z</dc:date>
    <item>
      <title>Edit Sketch via API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/9500913#M11811</link>
      <description>&lt;P&gt;It looks to me like this isn't possible. But I would like to be able to loop through a heap of sketches, then once I find one with a specific attribute, 'select' it for manual editing by the user.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it looks like in most cases you can't call native Fusion commands on objects you have selected via the API... or am I missing a trick here?&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 06:06:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/9500913#M11811</guid>
      <dc:creator>scottmoyse</dc:creator>
      <dc:date>2020-05-08T06:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Sketch via API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/9501031#M11812</link>
      <description>&lt;P&gt;You can start ANY command using the API.&amp;nbsp; However, most commands don't use the current selection or need additional input besides a selection so just starting the command doesn't cause anything to happen except for the command dialog to pop up, waiting for input.&amp;nbsp; There are a few commands that don't require any input or they do use the active selection and that's enough for them to do whatever they do without requiring any additional input.&amp;nbsp; The edit sketch command happens to be one of these.&amp;nbsp; Here's an untested example of how it would work.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;sk = root.Sketches.ItemByName('MySketch')
ui.activeSelections.clear()
ui.activeSelections.add(sk)
skCmd = ui.commandDefinitions.itemById('SketchActivate')
skCmd.execute()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 07:02:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/9501031#M11812</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-05-08T07:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Sketch via API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/9501098#M11813</link>
      <description>Legend. Thanks. I'll give that a try.&lt;BR /&gt;</description>
      <pubDate>Fri, 08 May 2020 07:40:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/9501098#M11813</guid>
      <dc:creator>scottmoyse</dc:creator>
      <dc:date>2020-05-08T07:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Sketch via API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/11004394#M11814</link>
      <description>&lt;P&gt;when following this code i get this error the rootLogger object has no occurrence ItemByName I am wondering where I want wrong here is what i used&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; &amp;nbsp;      sk = root.sketches.ItemByName('Sketch1')
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #Activating SKETCH
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #choose the section sketch as active
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui.activeSelections.clear()
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ui.activeSelections.add(sk)


&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; skCmd=ui.commandDefinitions.itemById('SketchActivate')
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; skCmd.execute()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 18:45:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/11004394#M11814</guid>
      <dc:creator>yosef.ali.omar</dc:creator>
      <dc:date>2022-03-14T18:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Sketch via API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/11005060#M11815</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12054426"&gt;@yosef.ali.omar&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is due to the fact that the first letter of the method name is capitalized.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;sk = root.sketches.itemByName('Sketch1')&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Mar 2022 00:57:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/11005060#M11815</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2022-03-15T00:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Sketch via API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/11007175#M11816</link>
      <description>Thank you, yes that fixed it</description>
      <pubDate>Tue, 15 Mar 2022 20:26:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/edit-sketch-via-api/m-p/11007175#M11816</guid>
      <dc:creator>yosef.ali.omar</dc:creator>
      <dc:date>2022-03-15T20:26:22Z</dc:date>
    </item>
  </channel>
</rss>

