<?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: Ilogic to search the file, open it and do something in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823168#M56892</link>
    <description>&lt;P&gt;Where do you want to open the document from ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
    <pubDate>Sun, 25 Oct 2020 16:17:09 GMT</pubDate>
    <dc:creator>FINET_Laurent</dc:creator>
    <dc:date>2020-10-25T16:17:09Z</dc:date>
    <item>
      <title>Ilogic to search the file, open it and do something</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9822311#M56891</link>
      <description>&lt;P&gt;Im looking for a code in vb.net that could search the file (in my case for now .ipt), open it and do something like convert, add parameters etc. Usually the file names comes as&amp;nbsp; list in excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code can search but doesnt do much.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If System.IO.Directory.GetFiles("C:\Inventor Study\", "Test.ipt", IO.SearchOption.AllDirectories).Length &amp;gt; 0 Then&lt;/SPAN&gt;
&lt;SPAN&gt;    MsgBox("Found!")&lt;/SPAN&gt;
&lt;SPAN&gt;Else&lt;/SPAN&gt;
&lt;SPAN&gt;    MsgBox("Not found!")&lt;/SPAN&gt;
&lt;SPAN&gt;End If&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This one got error: textbox_sa is not decleared.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;allFiles&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;IEnumerable&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;) = &lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;IO&lt;/SPAN&gt;.&lt;SPAN&gt;Directory&lt;/SPAN&gt;.&lt;SPAN&gt;EnumerateFiles&lt;/SPAN&gt;(&lt;SPAN&gt;"C:\Inventor Study\"&lt;/SPAN&gt;, &lt;SPAN&gt;"Test.ipt"&lt;/SPAN&gt;, &lt;SPAN&gt;IO&lt;/SPAN&gt;.&lt;SPAN&gt;SearchOption&lt;/SPAN&gt;.&lt;SPAN&gt;AllDirectories&lt;/SPAN&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;filePaths&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;IList&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;) = &lt;SPAN&gt;allFiles&lt;/SPAN&gt;.&lt;SPAN&gt;Where&lt;/SPAN&gt;(&lt;SPAN&gt;Function&lt;/SPAN&gt;(&lt;SPAN&gt;f&lt;/SPAN&gt;) &lt;SPAN&gt;f&lt;/SPAN&gt;.&lt;SPAN&gt;IndexOf&lt;/SPAN&gt;(&lt;SPAN&gt;TextBox_sa&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt;, &lt;SPAN&gt;StringComparison&lt;/SPAN&gt;.&lt;SPAN&gt;OrdinalIgnoreCase&lt;/SPAN&gt;) &amp;lt;&amp;gt; -1).&lt;SPAN&gt;ToList&lt;/SPAN&gt;()

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;filePaths&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt; = 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;
    &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"File not found"&lt;/SPAN&gt;)
&lt;SPAN&gt;Else&lt;/SPAN&gt;
    &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;filePath&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;filePaths&lt;/SPAN&gt;
        &lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;Diagnostics&lt;/SPAN&gt;.&lt;SPAN&gt;Process&lt;/SPAN&gt;.&lt;SPAN&gt;Start&lt;/SPAN&gt;(&lt;SPAN&gt;filePath&lt;/SPAN&gt;)
    &lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 16:18:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9822311#M56891</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-24T16:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic to search the file, open it and do something</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823168#M56892</link>
      <description>&lt;P&gt;Where do you want to open the document from ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 16:17:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823168#M56892</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2020-10-25T16:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic to search the file, open it and do something</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823182#M56893</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9053366"&gt;@FINET_Laurent&lt;/a&gt;&amp;nbsp;. I'd like to open it in Inventor.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 16:30:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823182#M56893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-25T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic to search the file, open it and do something</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823205#M56894</link>
      <description>&lt;P&gt;From the start menu ? From an assembly file ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 16:56:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823205#M56894</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2020-10-25T16:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic to search the file, open it and do something</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823585#M56895</link>
      <description>&lt;P&gt;The code will search the file using ilogic. If found, it should open it in Inventor.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 01:57:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823585#M56895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-26T01:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic to search the file, open it and do something</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823896#M56896</link>
      <description>&lt;P&gt;Hi @Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oFolder&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"C:\Inventor Study"&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oName&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"Test.ipt"&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;System&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;IO&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Directory&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Exists&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oFolder&lt;/SPAN&gt;) = &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Show&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"The directory: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;oFolder&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #008080;"&gt;" doesn't exist!"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Invalid directory"&lt;/SPAN&gt;, _
	&lt;SPAN style="color: #800000;"&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;OK&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;MessageBoxIcon&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Error&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;Exit&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oFoundDocs&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt;() = &lt;SPAN style="color: #800000;"&gt;System&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;IO&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Directory&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;GetFiles&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oFolder&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oName&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;IO&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SearchOption&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;AllDirectories&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oFoundDocs&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Length&lt;/SPAN&gt; &amp;gt; 0 &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPath&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oFoundDocs&lt;/SPAN&gt;
		&lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Documents&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Open&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oPath&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;True&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Else&lt;/SPAN&gt;
    &lt;SPAN style="color: #800000;"&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Show&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Couldn't find the document "&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;oName&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #008080;"&gt;" in "&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #800000;"&gt;oFolder&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: #008080;"&gt;" or any of its sub folders!"&lt;/SPAN&gt;, _
	&lt;SPAN style="color: #008080;"&gt;"No file found"&lt;/SPAN&gt;, _
	&lt;SPAN style="color: #800000;"&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;OK&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;MessageBoxIcon&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Information&lt;/SPAN&gt;)
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;GetFiles returns an array of strings with the filepaths to all the found documents.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 08:11:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9823896#M56896</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-10-26T08:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic to search the file, open it and do something</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9824759#M56897</link>
      <description>&lt;P&gt;It works like magic. A super mega THANK YOU&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5330176"&gt;@JhoelForshav&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 14:49:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-search-the-file-open-it-and-do-something/m-p/9824759#M56897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-26T14:49:44Z</dc:date>
    </item>
  </channel>
</rss>

