<?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: Issue with the addSelectionFilter Method of SelectionCommandInput in C++ in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12391020#M2466</link>
    <description>&lt;P&gt;You are right that there is an error in the example, respectively the filter setting is not functional. The fact that it doesn't report any error is because the return value of the -&amp;gt;addSelectionFilter() method is bool. Thus, the filter setting does not take place but the script continues to run.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 11:38:06 GMT</pubDate>
    <dc:creator>pezidek</dc:creator>
    <dc:date>2023-11-21T11:38:06Z</dc:date>
    <item>
      <title>Issue with the addSelectionFilter Method of SelectionCommandInput in C++</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12375803#M2463</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;while trying out&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-c7d4d41e-cb39-11e7-ac26-005056c00008" target="_blank" rel="noopener"&gt;Selection Events API Sample&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, I came across a problem with the addSelectionInput method of&amp;nbsp;SelectionCommandInput. In the python version of the sample in&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MyCommandCreatedHandler class&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;selectInput = inputs.addSelectionInput('SelectionEventsSample', 'Edges', 'Please select edges')
selectInput.addSelectionFilter(adsk.core.SelectionCommandInput.Edges)
selectInput.setSelectionLimits(1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Selection Filters, in this case adsk.core.SelectionCommandInput.Edges are used as argument of the addSelectionFilter().&lt;BR /&gt;&lt;BR /&gt;This works fine, however while working with the c++ sample, I found out that the equivalent approach:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;bool result = selectInput-&amp;gt;addSelectionFilter(adsk::core::SelectionCommandInput::Edges);&lt;/LI-CODE&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="jan_vokurka4DDUA_0-1699954746087.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1292599i58074F049A8F35F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jan_vokurka4DDUA_0-1699954746087.png" alt="jan_vokurka4DDUA_0-1699954746087.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;returns false, hence no filter was set. Fortunately I can just use string instead and so avoid having to deal with this issue but I was curious if this is a bug or I'm missing something.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 09:41:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12375803#M2463</guid>
      <dc:creator>jan_vokurka</dc:creator>
      <dc:date>2023-11-14T09:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the addSelectionFilter Method of SelectionCommandInput in C++</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12378474#M2464</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;mistake is in the used argument.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;bool result = selectInput-&amp;gt;addSelectionFilter(adsk::core::SelectionCommandInput::Edges);&lt;/LI-CODE&gt;&lt;P&gt;The argument must be a string. In your case "Edges"&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;bool result = selectInput-&amp;gt;addSelectionFilter("Edges");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 09:40:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12378474#M2464</guid>
      <dc:creator>pezidek</dc:creator>
      <dc:date>2023-11-15T09:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the addSelectionFilter Method of SelectionCommandInput in C++</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12390894#M2465</link>
      <description>&lt;P&gt;I realized I need to use string as an argument. I rather wanted to ask, if an equivalent approach that is showcased in the official c++ sample shouldn't work as well..and if not report a bug there &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 10:43:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12390894#M2465</guid>
      <dc:creator>jan_vokurka</dc:creator>
      <dc:date>2023-11-21T10:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the addSelectionFilter Method of SelectionCommandInput in C++</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12391020#M2466</link>
      <description>&lt;P&gt;You are right that there is an error in the example, respectively the filter setting is not functional. The fact that it doesn't report any error is because the return value of the -&amp;gt;addSelectionFilter() method is bool. Thus, the filter setting does not take place but the script continues to run.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 11:38:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12391020#M2466</guid>
      <dc:creator>pezidek</dc:creator>
      <dc:date>2023-11-21T11:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the addSelectionFilter Method of SelectionCommandInput in C++</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12391682#M2467</link>
      <description>Yes, I only traced the mistake after comparing the two samples.</description>
      <pubDate>Tue, 21 Nov 2023 15:56:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/issue-with-the-addselectionfilter-method-of/m-p/12391682#M2467</guid>
      <dc:creator>jan_vokurka</dc:creator>
      <dc:date>2023-11-21T15:56:09Z</dc:date>
    </item>
  </channel>
</rss>

