<?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 Search part of a filename with iLogic in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/search-part-of-a-filename-with-ilogic/m-p/7382983#M75022</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I like to get a parameter from a part in an assembly.&lt;/P&gt;
&lt;P&gt;But I only know one part of the filename or the partnumber.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do i get that solved?&lt;/P&gt;</description>
    <pubDate>Fri, 15 Sep 2017 10:18:55 GMT</pubDate>
    <dc:creator>Rob67ert</dc:creator>
    <dc:date>2017-09-15T10:18:55Z</dc:date>
    <item>
      <title>Search part of a filename with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/search-part-of-a-filename-with-ilogic/m-p/7382983#M75022</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I like to get a parameter from a part in an assembly.&lt;/P&gt;
&lt;P&gt;But I only know one part of the filename or the partnumber.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do i get that solved?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 10:18:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/search-part-of-a-filename-with-ilogic/m-p/7382983#M75022</guid>
      <dc:creator>Rob67ert</dc:creator>
      <dc:date>2017-09-15T10:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Search part of a filename with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/search-part-of-a-filename-with-ilogic/m-p/7383034#M75026</link>
      <description>&lt;P&gt;You can use &lt;STRONG&gt;.Expression&lt;/STRONG&gt; or &lt;STRONG&gt;.Value&amp;nbsp;&lt;/STRONG&gt;depending on how you want to use the parameter. Bear in mind there's no error testing in the code to see if the parameter exists or not, so you will get an error if it doesn't exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;' Get the component definition of the currently open assembly.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;' This will fail if an assembly document is not open.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Dim&lt;/STRONG&gt; doc &lt;STRONG&gt;As&lt;/STRONG&gt; AssemblyDocument&lt;/P&gt;
&lt;P&gt;doc &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisDoc&lt;/STRONG&gt;.&lt;STRONG&gt;Document&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Dim&lt;/STRONG&gt; oAsmCompDef &lt;STRONG&gt;As&lt;/STRONG&gt; AssemblyComponentDefinition&lt;/P&gt;
&lt;P&gt;oAsmCompDef &lt;STRONG&gt;=&lt;/STRONG&gt; doc.ComponentDefinition&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Dim&lt;/STRONG&gt; oComp &lt;STRONG&gt;As&lt;/STRONG&gt; ComponentOccurrence&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Dim&lt;/STRONG&gt; oComps &lt;STRONG&gt;As&lt;/STRONG&gt; ComponentOccurrences&lt;/P&gt;
&lt;P&gt;oComps &lt;STRONG&gt;=&lt;/STRONG&gt; doc.ComponentDefinition.Occurrences&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For&lt;/STRONG&gt; &lt;STRONG&gt;Each&lt;/STRONG&gt; oComp &lt;STRONG&gt;In&lt;/STRONG&gt; oComps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;If&lt;/STRONG&gt; oComp.&lt;STRONG&gt;Name&lt;/STRONG&gt;.Contains&lt;STRONG&gt;(&lt;/STRONG&gt;"part of the part number"&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;Then&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value = oComp.Definition.Parameters.Item("myparam").Expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;End&lt;/STRONG&gt; &lt;STRONG&gt;If&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 10:46:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/search-part-of-a-filename-with-ilogic/m-p/7383034#M75026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-15T10:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Search part of a filename with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/search-part-of-a-filename-with-ilogic/m-p/7383076#M75029</link>
      <description>Thanks &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Sep 2017 11:05:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/search-part-of-a-filename-with-ilogic/m-p/7383076#M75029</guid>
      <dc:creator>Rob67ert</dc:creator>
      <dc:date>2017-09-15T11:05:21Z</dc:date>
    </item>
  </channel>
</rss>

