<?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-filename, parameters in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749432#M76565</link>
    <description>&lt;P&gt;Hola,&amp;nbsp;The suggestion is this, look at these examples, in the name of the detailed part in red&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;Color&lt;/SPAN&gt;(&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;"PartA:1"&lt;/SPAN&gt;&lt;/FONT&gt;)
&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;"part1:1"&lt;/SPAN&gt;&lt;/FONT&gt;, &lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Do not write the name of the file, extract it as property, for example if you have a file of part, place this rule, it will return the name of the file, and in the routines you should use oName for example, to establish the name of the file.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For example, if you know the location in the model tree from assembly, you can specify the occurrence through the item, as in the following case&amp;nbsp;executing this rule in an assembly&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;
    &lt;SPAN&gt;oDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt;
    &lt;SPAN&gt;oDef&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
    &lt;SPAN&gt;' Get the top level occurrence of an assembly&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;
    &lt;SPAN&gt;oOcc&lt;/SPAN&gt; = &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;FONT color="#00FF00"&gt;2&lt;/FONT&gt;)&lt;SPAN&gt;'Firt component occurrence&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
	&lt;SPAN&gt;oName&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;oName&lt;/SPAN&gt;, &lt;SPAN&gt;"Title"&lt;/SPAN&gt;)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Change the item number from&lt;FONT color="#00FF00"&gt; 2&lt;/FONT&gt; forward to identify the type of occurrence displayed by the model browser in the assembly. By identifying by item you can rename and you will not have problems. regards&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 08:04:56 GMT</pubDate>
    <dc:creator>Sergio.D.Suárez</dc:creator>
    <dc:date>2019-04-24T08:04:56Z</dc:date>
    <item>
      <title>iLogic-filename, parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749267#M76564</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a small question. I made some simple assemblies (3 or 4 parts inside). Assembly and parts is parametric. I have iLogic in my .iam file wchich controls other .ipt's. Ok... works. But problem is when i copy all assembly and change filenames of the .ipt. It's obvious that there are some errors. Is there any solutions to keep in my iLogic rule proper filenames? (every time I have to edit my ilogic rule and change filenames)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paweł&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 06:50:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749267#M76564</guid>
      <dc:creator>pbartosinski</dc:creator>
      <dc:date>2019-04-24T06:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic-filename, parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749432#M76565</link>
      <description>&lt;P&gt;Hola,&amp;nbsp;The suggestion is this, look at these examples, in the name of the detailed part in red&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;Color&lt;/SPAN&gt;(&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;"PartA:1"&lt;/SPAN&gt;&lt;/FONT&gt;)
&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;"part1:1"&lt;/SPAN&gt;&lt;/FONT&gt;, &lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Do not write the name of the file, extract it as property, for example if you have a file of part, place this rule, it will return the name of the file, and in the routines you should use oName for example, to establish the name of the file.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For example, if you know the location in the model tree from assembly, you can specify the occurrence through the item, as in the following case&amp;nbsp;executing this rule in an assembly&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;
    &lt;SPAN&gt;oDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt;
    &lt;SPAN&gt;oDef&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
    &lt;SPAN&gt;' Get the top level occurrence of an assembly&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt;
    &lt;SPAN&gt;oOcc&lt;/SPAN&gt; = &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;FONT color="#00FF00"&gt;2&lt;/FONT&gt;)&lt;SPAN&gt;'Firt component occurrence&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
	&lt;SPAN&gt;oName&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;oName&lt;/SPAN&gt;, &lt;SPAN&gt;"Title"&lt;/SPAN&gt;)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Change the item number from&lt;FONT color="#00FF00"&gt; 2&lt;/FONT&gt; forward to identify the type of occurrence displayed by the model browser in the assembly. By identifying by item you can rename and you will not have problems. regards&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 08:04:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749432#M76565</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2019-04-24T08:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic-filename, parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749555#M76566</link>
      <description>&lt;P&gt;hmmm.... i don't understand. I'll show example. In my assembly i have ilogic which contant line. It works but if i change name &lt;SPAN style="color: #008080;"&gt;Flange_DIN.ipt&lt;/SPAN&gt; to ex. &lt;SPAN style="color: #008080;"&gt;Flange_DIN_1.ipt i have to edit my ilogic and change filename in Parameter section.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;can you give me proper code how to avoid missing filename in this section below?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN style="color: #800080;"&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Flange_DIN.ipt"&lt;/SPAN&gt;,&lt;SPAN style="color: #008080;"&gt;"DN"&lt;/SPAN&gt;) = &lt;SPAN style="color: #0000ff;"&gt;DN_DIN&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 09:13:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749555#M76566</guid>
      <dc:creator>pbartosinski</dc:creator>
      <dc:date>2019-04-24T09:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic-filename, parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749597#M76567</link>
      <description>&lt;P&gt;What I was trying to tell you is that you should not put the name to identify a component in an assembly, because the name is what you are going to change&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;&lt;STRIKE&gt;"Flange_DIN.ipt"&lt;/STRIKE&gt;&lt;/FONT&gt;&lt;/STRONG&gt;,&lt;SPAN&gt;"DN"&lt;/SPAN&gt;) = &lt;SPAN&gt;DN_DIN&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Then I leave you a code so you can identify the item that defines your component in the assembly, each item has a component&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;
    &lt;SPAN&gt;oDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt;
    &lt;SPAN&gt;oDef&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;

	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = 2 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;
	    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;)
		&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Item Number: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;i&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbCrLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"Occurrence Name: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; )
	&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;For instance, if for your part &lt;FONT color="#FF00FF"&gt;"Flange_DIN.ipt"&lt;/FONT&gt; you&amp;nbsp; find that it corresponds to item 3 you should place&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"Dim&lt;/SPAN&gt; &lt;SPAN&gt;oFlangeDIN&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN&gt;oDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;FONT color="#FF00FF"&gt;&lt;SPAN&gt;oFlangeDIN.name&lt;/SPAN&gt;&lt;/FONT&gt;,&lt;SPAN&gt;"DN"&lt;/SPAN&gt;) = &lt;SPAN&gt;DN_DIN&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I can not specify the item because I do not know how you have formed your assembly&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 09:33:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749597#M76567</guid>
      <dc:creator>Sergio.D.Suárez</dc:creator>
      <dc:date>2019-04-24T09:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic-filename, parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749636#M76568</link>
      <description>&lt;P&gt;Works perfectly.&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 09:56:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/8749636#M76568</guid>
      <dc:creator>pbartosinski</dc:creator>
      <dc:date>2019-04-24T09:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic-filename, parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/9533347#M76569</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having the same issue with my assembly renaming as you did. Until the names stay the same, the rules work, when I copy the assembly and change it's name and the name of its parts(the XX part changes), the rules do not work. Because&amp;nbsp; I am not a VB user and do not know hot to write&amp;nbsp; the statements, it would be very helpful if you could share your script that worked for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to follow&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4253164"&gt;@Sergio.D.Suárez&lt;/a&gt;&amp;nbsp; instructions but I still get an error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 05:27:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/9533347#M76569</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-22T05:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic-filename, parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/9535207#M76570</link>
      <description>&lt;P&gt;Hi! Please share the files here. We have quite a few iLogic experts on the forum to help.&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 01:24:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/9535207#M76570</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2020-05-23T01:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic-filename, parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/11015752#M76571</link>
      <description>&lt;P&gt;Please help with this question:&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-forum/vba-ilogic-rule-to-rename-model-parameter-names/td-p/11015699" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-forum/vba-ilogic-rule-to-rename-model-parameter-names/td-p/11015699&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2022 10:49:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-filename-parameters/m-p/11015752#M76571</guid>
      <dc:creator>bionorica2015</dc:creator>
      <dc:date>2022-03-19T10:49:14Z</dc:date>
    </item>
  </channel>
</rss>

