<?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: The component name is the same after replacement in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7436030#M260657</link>
    <description>&lt;P&gt;If it is just your browser names and there are multiply of them inventor has a feature to rename all of them at once.&amp;nbsp; See attached.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 15:48:10 GMT</pubDate>
    <dc:creator>dankle43</dc:creator>
    <dc:date>2017-10-05T15:48:10Z</dc:date>
    <item>
      <title>The component name is the same after replacement</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7434059#M260654</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a really strange problem. I use a rule for replacing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exactly that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;My_Variable2 = ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;If NUMBER_OF_FANS = 1 And SIZE = "S" And CS_or_LS = "Triangolare" Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Component.Replace(My_Variable2, "30084127.ipt", True)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;The first component will be replaced but the component name doesn`t change.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea, what could be the problem?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Janos&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 08:13:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7434059#M260654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T08:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: The component name is the same after replacement</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7434852#M260655</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a really strange problem. I use a rule for replacing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Exactly that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;My_Variable2 = ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;If NUMBER_OF_FANS = 1 And SIZE = "S" And CS_or_LS = "Triangolare" Then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Component.Replace(My_Variable2, "30084127.ipt", True)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;The first component will be replaced but the component name doesn`t change.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any idea, what could be the problem?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many Thanks&lt;/P&gt;
&lt;P&gt;Janos&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may be just the browser "instance" name that is not changing.&amp;nbsp; Look at the iProperties of the component and verify that it is indeed the correct part (file name, path location etc).&amp;nbsp; If the part is correct, it is just the browser name that did not change, you can manually rename that to whatever you need without affecting the filename of the part.&amp;nbsp; Do a "slow" double click on the instance name like you would in Windows Explorer if you were renaming a file.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 12:30:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7434852#M260655</guid>
      <dc:creator>cbenner</dc:creator>
      <dc:date>2017-10-05T12:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: The component name is the same after replacement</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7435862#M260656</link>
      <description>&lt;P&gt;Hi&amp;nbsp;janos.buczko,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to the forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just as a tip, you can search and ask programming questions of this type on the &lt;STRONG&gt;Inventor Customization forum&lt;/STRONG&gt; too:&lt;BR /&gt;&lt;A href="http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120" target="_blank"&gt;http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;cbenner mentioned, the likely cause of this is that the browser name is overridden, when working with ilogic or other programming customization, we often "stabalize" the browser names in an assembly, so that the code is sure to find the expected component.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if you're looking to reset the browser name from the override, back to the default you can just clear it by setting it to be nothing. Do do so via code you can just add this line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name = ""&lt;/PRE&gt;
&lt;P&gt;So in the example you'd add this line similar to this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'get component name
My_Variable2 = ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name

'replace component based on condition
If NUMBER_OF_FANS = 1 And SIZE = "S" And CS_or_LS = "Triangolare" Then
	'true replaces all instances of the component
	'False replaced only the one specified
	Component.Replace(My_Variable2, "C:\TEMP\30084127.ipt", True)
	'reset browser name
	ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name = ""
End If&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're looking to rename or reestablish the name, then you'd do something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'get component name
My_Variable2 = ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name

'replace component based on condition
If NUMBER_OF_FANS = 1 And SIZE = "S" And CS_or_LS = "Triangolare" Then
	'true replaces all instances of the component
	'False replaced only the one specified
	Component.Replace(My_Variable2, "C:\TEMP\30084127.ipt", True)
	'reset browser name
	ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name = "MyWidget"
End If&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 15:21:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7435862#M260656</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2017-10-05T15:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: The component name is the same after replacement</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7436030#M260657</link>
      <description>&lt;P&gt;If it is just your browser names and there are multiply of them inventor has a feature to rename all of them at once.&amp;nbsp; See attached.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 15:48:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/the-component-name-is-the-same-after-replacement/m-p/7436030#M260657</guid>
      <dc:creator>dankle43</dc:creator>
      <dc:date>2017-10-05T15:48:10Z</dc:date>
    </item>
  </channel>
</rss>

