<?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: Find in window in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8614183#M14673</link>
    <description>&lt;P&gt;goyals,&lt;/P&gt;
&lt;P&gt;That doesn't mean we give up!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alex,&lt;/P&gt;
&lt;P&gt;Brian had a nice sample of API script that controls the camera viewpoint&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/accurate-and-repeatable-setting-of-f360-camera-viewpoint-help/td-p/6060763" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&amp;nbsp; He sets it based on some selected points, but it seems like a good place to start.&amp;nbsp; You'd need to do the all the work of determining (presumably based on your occurence's location and bounding box) but I think in this case the API gives you all the tools you need to reproduce their 'Find in Window' behavior.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Feb 2019 13:00:11 GMT</pubDate>
    <dc:creator>p.seem</dc:creator>
    <dc:date>2019-02-22T13:00:11Z</dc:date>
    <item>
      <title>Find in window</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8589664#M14671</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've written a BOM addon as none of the existing one's i found so far did quite what i wanted ( or weren't free)&lt;/P&gt;
&lt;P&gt;It's palette based, so you make a selection and it displays the nominal dimensions of the parts in a table (as in screenshot) from there you either select them all or a subset to export as a pdf / csv etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to add a feature which allows the user to click on a zoom icon in the palette, ad have the related component activated and zoomed to so that I can double check my selection and add instance specific info, like grain direction etc. It seems likely that there is a python equivalent to 'find in window' but i can't find it - apologies if it's obvious and i've missed it!&lt;BR /&gt;&lt;BR /&gt;I've attached a screenshot of what I'm working on, not that it's necessarily helpful..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 11:17:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8589664#M14671</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-12T11:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Find in window</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8613564#M14672</link>
      <description>&lt;P&gt;I am sorry to say Find In Window functionality is not exposed through API.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 08:08:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8613564#M14672</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2019-02-22T08:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Find in window</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8614183#M14673</link>
      <description>&lt;P&gt;goyals,&lt;/P&gt;
&lt;P&gt;That doesn't mean we give up!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alex,&lt;/P&gt;
&lt;P&gt;Brian had a nice sample of API script that controls the camera viewpoint&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/accurate-and-repeatable-setting-of-f360-camera-viewpoint-help/td-p/6060763" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&amp;nbsp; He sets it based on some selected points, but it seems like a good place to start.&amp;nbsp; You'd need to do the all the work of determining (presumably based on your occurence's location and bounding box) but I think in this case the API gives you all the tools you need to reproduce their 'Find in Window' behavior.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 13:00:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8614183#M14673</guid>
      <dc:creator>p.seem</dc:creator>
      <dc:date>2019-02-22T13:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Find in window</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8614696#M14674</link>
      <description>&lt;P&gt;Both of the answers so far are correct; &lt;STRONG&gt;Find in Window&lt;/STRONG&gt; isn't directly supported by the API and there is enough functionality in the API that you can write the equivalent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, there is another solution.&amp;nbsp; Because the &lt;STRONG&gt;Find in Window&lt;/STRONG&gt; command is a simple command and doesn't have a dialog or require any input besides the current selection, you can use the API to select the item you want to show and then execute the &lt;STRONG&gt;Find in Window&lt;/STRONG&gt; command.&amp;nbsp; Below is an example&amp;nbsp;where I use the first occurrence but it can be any object that works with the &lt;STRONG&gt;Find in Window&lt;/STRONG&gt; command.&lt;/P&gt;
&lt;PRE&gt;def run(context):
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        des = adsk.fusion.Design.cast(app.activeProduct)
        root = des.rootComponent

        # Get the first occurrence in the root component.
        occ = root.occurrences.item(0)

        # Clear all current selections.
        ui.activeSelections.clear()
        
        # Select the occurrence.
        ui.activeSelections.add(occ)
        
        # Get the "Find in Window" command.
        findCmd = ui.commandDefinitions.itemById('FindInWindow')
        
        # Execute the command.
        findCmd.execute()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&gt;
&lt;P&gt;mand.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 16:04:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8614696#M14674</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2019-02-22T16:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Find in window</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8618880#M14675</link>
      <description>&lt;P&gt;Works like a charm! Thank you very much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 13:26:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/find-in-window/m-p/8618880#M14675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-25T13:26:39Z</dc:date>
    </item>
  </channel>
</rss>

