<?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: Modify referenced model by iLogic in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/9636344#M135430</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was trying to make ilogic rule for changes of references. For Your request You can try function "idw reference" in enclosed rule "change_reference.iLogicVb". It's possible to run from model or drawing and it changes reference in idw file with same name model (ipt or iam or ipn) in the same folder. If there is second reference ipn model, it is also changed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the rule also for changes of ipn, ipt and other references in many ways.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here shoud be video. If not, You can see it on my dashboard...&lt;/P&gt;&lt;P&gt;&lt;A href="https://autode.sk/2WfUKML" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;https://autode.sk/2WfUKML&lt;/A&gt;&lt;/P&gt;&lt;DIV class="iframe-container" style="position: relative; height: 0; margin: 0; padding-bottom: 106.25%;"&gt;&lt;IFRAME width="640" height="680" style="position: absolute; left: 0; top: 0; width: 100%; height: 100%;" src="https://screencast.autodesk.com/Embed/Timeline/e7224269-63d9-46ea-982f-6ab22b616c53" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" scrolling="no"&gt;&lt;/IFRAME&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 15 Jul 2020 09:28:01 GMT</pubDate>
    <dc:creator>Pavel_JDK</dc:creator>
    <dc:date>2020-07-15T09:28:01Z</dc:date>
    <item>
      <title>Modify referenced model by iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/3549630#M135424</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I try to modify on a drawing the 3d model, using iLogic&amp;nbsp;(same thing as Inventor "Replace model reference" command). Do you know if it is possible ?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2012 10:13:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/3549630#M135424</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2012-07-24T10:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Modify referenced model by iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/3558950#M135425</link>
      <description>&lt;P&gt;So... nobody need to replace the 3d model from a drawing ?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2012 07:37:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/3558950#M135425</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2012-07-31T07:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Modify referenced model by iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/3573440#M135426</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will need the Advanced API of iLogic: ThisDoc.Document.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;e.g. the code below replace the first file of the drawing to a new part. Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; doc = ThisDoc.Document
 Dim oFD As FileDescriptor
 oFD = doc.ReferencedFileDescriptors(1).DocumentDescriptor.ReferencedFileDescriptor
 oFD.ReplaceReference("c:\NewPart.ipt")
 doc.Update()&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 10:40:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/3573440#M135426</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2012-08-10T10:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Modify referenced model by iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/3573726#M135427</link>
      <description>&lt;P&gt;Thanks !&lt;/P&gt;&lt;P&gt;This is exactly what I need !&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 13:45:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/3573726#M135427</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2012-08-10T13:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Modify referenced model by iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/5109138#M135428</link>
      <description>&lt;P&gt;Xiaodong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I change the following code to include a second .ipt in the replace reference routine?&lt;/P&gt;&lt;P&gt;I have a part 485000-001 and 485000-002. I can successfully replace the reference of the 485000-001 but, cannot replace the 485000-002.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you assist with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub SAVEDETAIL (ByVal TemplateDrawing As String, ByVal PLAINPN As String, ByVal PNWSUFFIX As String, ByVal PTASSYPN As String, ByVal filePath As String)

      DESTINATIONDOC = ThisApplication.DOCUMENTS.Open(TemplateDrawing, False)
      DESTINATIONDOC.SAVEAS(filePath &amp;amp; PLAINPN &amp;amp; ".idw", False)
      Dim STRNEWREFNAME As String
      Dim OREFFILE As FILEDESCRIPTOR

      For Each OREFFILE In DESTINATIONDOC.FILE.REFERENCEDFILEDESCRIPTORS
            Dim OORIGREFNAME As String
	   OORIGREFNAME = OREFFILE.FULLFILENAME
			
            If OORIGREFNAME.EndsWith(".ipt") Then           
		STRNEWREFNAME = filePath &amp;amp; PNWSUFFIX &amp;amp; ".ipt"            
		OREFFILE.REPLACEREFERENCE(STRNEWREFNAME)
				
	   ElseIf OORIGREFNAME.EndsWith(".iam") Then           
		STRNEWREFNAME = filePath &amp;amp; PTASSYPN &amp;amp; ".iam"            
		OREFFILE.REPLACEREFERENCE(STRNEWREFNAME)
				
	   End If
			
      Exit For
      Next
	  
      DESTINATIONDOC.Update()

      DESTINATIONDOC.Save
	  
      DESTINATIONDOC.Close
	  
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jun 2014 18:45:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/5109138#M135428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-21T18:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Modify referenced model by iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/9158237#M135429</link>
      <description>&lt;P&gt;I am after some code that reads the .idw filename and uses the &lt;EM&gt;Replace Model Reference&lt;/EM&gt; routine to replace the first component in the .idw with an .ipt or .iam that is in exactly the same folder.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 20:49:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/9158237#M135429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-20T20:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Modify referenced model by iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/9636344#M135430</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was trying to make ilogic rule for changes of references. For Your request You can try function "idw reference" in enclosed rule "change_reference.iLogicVb". It's possible to run from model or drawing and it changes reference in idw file with same name model (ipt or iam or ipn) in the same folder. If there is second reference ipn model, it is also changed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the rule also for changes of ipn, ipt and other references in many ways.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here shoud be video. If not, You can see it on my dashboard...&lt;/P&gt;&lt;P&gt;&lt;A href="https://autode.sk/2WfUKML" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;https://autode.sk/2WfUKML&lt;/A&gt;&lt;/P&gt;&lt;DIV class="iframe-container" style="position: relative; height: 0; margin: 0; padding-bottom: 106.25%;"&gt;&lt;IFRAME width="640" height="680" style="position: absolute; left: 0; top: 0; width: 100%; height: 100%;" src="https://screencast.autodesk.com/Embed/Timeline/e7224269-63d9-46ea-982f-6ab22b616c53" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" scrolling="no"&gt;&lt;/IFRAME&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jul 2020 09:28:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/9636344#M135430</guid>
      <dc:creator>Pavel_JDK</dc:creator>
      <dc:date>2020-07-15T09:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Modify referenced model by iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/9638992#M135431</link>
      <description>&lt;P&gt;Another videos with example of using the rule change_reference:&lt;/P&gt;&lt;P&gt;&lt;A href="https://autode.sk/30hbS5R" target="_blank"&gt;https://autode.sk/30hbS5R&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://autode.sk/3fAanpH" target="_blank"&gt;https://autode.sk/3fAanpH&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:13:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/modify-referenced-model-by-ilogic/m-p/9638992#M135431</guid>
      <dc:creator>Pavel_JDK</dc:creator>
      <dc:date>2020-07-16T13:13:09Z</dc:date>
    </item>
  </channel>
</rss>

