<?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: Change reference .ipt from .idw in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282840#M163451</link>
    <description>I appreciated all your help! It works great.  This is the first time I work with Apprentice.  Is there a way to use apprentice within IV VBAIDE?&lt;BR /&gt;
&lt;BR /&gt;
NewVBA</description>
    <pubDate>Thu, 31 Mar 2005 17:48:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-03-31T17:48:34Z</dc:date>
    <item>
      <title>Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282836#M163447</link>
      <description>Hello All,&lt;BR /&gt;
I think this question has been asked before but I couldn't find it.  I have Sample.ipt, SampleRev.ipt and Sample.idw.  (Sample.ipt and SampleRev.ipt are the same configuration part with some different parameter value) &lt;BR /&gt;
Sample .idw is a drawing of Sample.ipt.  How can I use code to change Sample.idw to be a drawing of SampleRev.ipt. &lt;BR /&gt;
&lt;BR /&gt;
Thank in advance for any help!&lt;BR /&gt;
NewVBA</description>
      <pubDate>Wed, 30 Mar 2005 22:56:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282836#M163447</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-30T22:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282837#M163448</link>
      <description>To my knowledge there is no way to change the referenced part in a IDW.
-- 
Kent Keller
http://www.KWiKMcad.com

Autodesk Discussion Group Facilitator

"NewVBA" &lt;NOSPAM&gt; wrote in message 
news:31837100.1112223422416.JavaMail.jive@jiveforum2.autodesk.com...
&amp;gt; Hello All,
&amp;gt; I think this question has been asked before but I couldn't find it.  I 
&amp;gt; have Sample.ipt, SampleRev.ipt and Sample.idw.  (Sample.ipt and 
&amp;gt; SampleRev.ipt are the same configuration part with some different 
&amp;gt; parameter value)
&amp;gt; Sample .idw is a drawing of Sample.ipt.  How can I use code to change 
&amp;gt; Sample.idw to be a drawing of SampleRev.ipt.
&amp;gt;
&amp;gt; Thank in advance for any help!
&amp;gt; NewVBA&lt;/NOSPAM&gt;</description>
      <pubDate>Thu, 31 Mar 2005 03:38:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282837#M163448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-31T03:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282838#M163449</link>
      <description>&amp;gt; To my knowledge there is no way to change the referenced part in a IDW.

I do it all the time (with Apprentice)

The code should look something like this:

Dim oApprentice As New ApprenticeServerComponent
Dim oAppDrawDoc As ApprenticeServerDrawingDocument
Dim oRefFileDesc As ReferencedFileDescriptor
Dim oFileSaveAs As FileSaveAs
Dim sNewReference As String

Set oAppDrawDoc = oApprentice.Open("C:\Sample.idw")
For Each oRefFileDesc In oAppDrawDoc.ReferencedFileDescriptors
            sNewReference = "C:\SampleRev.ipt"
            On Error Resume Next
            Call oRefFileDesc.PutLogicalFileNameUsingFull(sNewReference)
            If Err Then
                MsgBox "Error number = " &amp;amp; Err.Number &amp;amp; vbCrLf &amp;amp; "Error
description = " &amp;amp; Err.Description, vbCritical
                Err.Clear
                Exit For
            End If
            On Error GoTo 0
Next oRefFileDesc

' Set a reference to the FileSaveAs object.
Set oFileSaveAs = oApprentice.FileSaveAs

' Save the IDW.
Call oFileSaveAs.AddFileToSave(oAppDrawDoc, oAppDrawDoc.FullFileName)
Call oFileSaveAs.ExecuteSave

But I first copy the IPT and the IDW to another location (with a different
name) before I start changing things in the new part.
I don't think Inventor will allow you to change the reference after the part
has been modified (but I havn't tested that in a while)

Cheers,

Teun

"Kent Keller" &lt;KWIK.MCAD&gt; wrote in message
news:424b7156_3@newsprd01...
&amp;gt; To my knowledge there is no way to change the referenced part in a IDW.
&amp;gt; -- 
&amp;gt; Kent Keller
&amp;gt; http://www.KWiKMcad.com
&amp;gt;
&amp;gt; Autodesk Discussion Group Facilitator
&amp;gt;
&amp;gt; "NewVBA" &lt;NOSPAM&gt; wrote in message
&amp;gt; news:31837100.1112223422416.JavaMail.jive@jiveforum2.autodesk.com...
&amp;gt; &amp;gt; Hello All,
&amp;gt; &amp;gt; I think this question has been asked before but I couldn't find it.  I
&amp;gt; &amp;gt; have Sample.ipt, SampleRev.ipt and Sample.idw.  (Sample.ipt and
&amp;gt; &amp;gt; SampleRev.ipt are the same configuration part with some different
&amp;gt; &amp;gt; parameter value)
&amp;gt; &amp;gt; Sample .idw is a drawing of Sample.ipt.  How can I use code to change
&amp;gt; &amp;gt; Sample.idw to be a drawing of SampleRev.ipt.
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; Thank in advance for any help!
&amp;gt; &amp;gt; NewVBA
&amp;gt;
&amp;gt;&lt;/NOSPAM&gt;&lt;/KWIK.MCAD&gt;</description>
      <pubDate>Thu, 31 Mar 2005 07:04:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282838#M163449</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-31T07:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282839#M163450</link>
      <description>See how far my knowledge gets me ;~)

-- 
Kent Keller
Autodesk Discussion Forum Facilitator


"Teun Ham (IV9 SP2)" &lt;TEUN d.o.t="" ham="" a=""&gt; wrote in
message news:424ba10b$1_1@newsprd01...
&amp;gt; &amp;gt; To my knowledge there is no way to change the referenced part in a IDW.
&amp;gt;
&amp;gt; I do it all the time (with Apprentice)&lt;/TEUN&gt;</description>
      <pubDate>Thu, 31 Mar 2005 16:19:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282839#M163450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-31T16:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282840#M163451</link>
      <description>I appreciated all your help! It works great.  This is the first time I work with Apprentice.  Is there a way to use apprentice within IV VBAIDE?&lt;BR /&gt;
&lt;BR /&gt;
NewVBA</description>
      <pubDate>Thu, 31 Mar 2005 17:48:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282840#M163451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-31T17:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282841#M163452</link>
      <description>Hello,
Open IV VBA, bring up a code window and hit F2, this will open the object 
browser, RMB anywhere I believe and this should bring up a context menu with 
References being an option, select this, a dialogue will appear showing the 
currently referenced References at the top and all the other available 
references underneath, Autodesk Inventor's Apprentice is in there somewhere, 
select it.

Teun, does this work with changing the referenced derived part component 
with in a part document do you know?  IV won't allow you to delete a derived 
solid part, move the EOP marker to above all the other solid creating 
features and then derive another solid again in the document, surfaces only, 
just wondered if this could be a sneaky route. :-)

Thanks

Scott
"NewVBA" &lt;NOSPAM&gt; wrote in message 
news:14126667.1112291344480.JavaMail.jive@jiveforum1.autodesk.com...
&amp;gt;I appreciated all your help! It works great.  This is the first time I work 
&amp;gt;with Apprentice.  Is there a way to use apprentice within IV VBAIDE?
&amp;gt;
&amp;gt; NewVBA&lt;/NOSPAM&gt;</description>
      <pubDate>Thu, 31 Mar 2005 19:56:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282841#M163452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-31T19:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282842#M163453</link>
      <description>Hello Scott,&lt;BR /&gt;
I put a check mark on Autodesk Inventor's Apprentice Object Library on my IV VBAIDE.  I tested the code and I still have runtime  error.  Any idea?&lt;BR /&gt;
&lt;BR /&gt;
New VBA</description>
      <pubDate>Thu, 31 Mar 2005 20:18:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282842#M163453</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-31T20:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282843#M163454</link>
      <description>You can't run Apprentice within Inventors VBAIDE.  You need to run it in
something like Word or Excel  or VB6.


I am not sure if it would work by referencing Inventor instead and changing
the calls from oApprentice  to Thisapplication??

-- 
Kent Keller
Autodesk Discussion Forum Facilitator


"NewVBA" &lt;NOSPAM&gt; wrote in message
news:26546027.1112300351796.JavaMail.jive@jiveforum2.autodesk.com...
&amp;gt; Hello Scott,
&amp;gt; I put a check mark on Autodesk Inventor's Apprentice Object Library on my
IV VBAIDE.  I tested the code and I still have runtime  error.  Any idea?
&amp;gt;
&amp;gt; New VBA&lt;/NOSPAM&gt;</description>
      <pubDate>Thu, 31 Mar 2005 20:32:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282843#M163454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-31T20:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282844#M163455</link>
      <description>I don't think it would work by referencing Inventor instead of Inventor Apprentice because, according to the help file, the method PutLogicalFileNameUsingFull is only valid within Apprentice.</description>
      <pubDate>Mon, 12 Sep 2005 18:46:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/1282844#M163455</guid>
      <dc:creator>fourholesn1</dc:creator>
      <dc:date>2005-09-12T18:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/3553098#M163456</link>
      <description>&lt;P&gt;I was getting confused with all these apprentice thing. (what is that?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Close idw,&amp;nbsp;then change the ipt name (from 123.ipt to 123a.ipt)&amp;nbsp;then open up idw again, it will prompt locate 123.ipt select 123REVA.ipt. This should work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jis&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2012 02:23:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/3553098#M163456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-26T02:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/3553466#M163457</link>
      <description>&lt;P&gt;jis.augustin, you are responding to a question that is 7 years old.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2012 11:47:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/3553466#M163457</guid>
      <dc:creator>jdkriek</dc:creator>
      <dc:date>2012-07-26T11:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/3554846#M163459</link>
      <description>&lt;P&gt;do you have a better solution by any chance?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2012 00:15:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/3554846#M163459</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-27T00:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Change reference .ipt from .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/3555662#M163460</link>
      <description>&lt;P&gt;The command you are looking for I believe is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dim oDoc as DrawingDocument&lt;/P&gt;&lt;P&gt;Set oDoc = ThisApplication.ActiveDocument 'provided your active document is an .idw&lt;/P&gt;&lt;P&gt;Call oDoc.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedFileDescriptor.ReplaceReference("C:\Path\Part.ipt") 'set the sheet number to the page and the drawing view number to the base view (typically 1)&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2012 14:34:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-reference-ipt-from-idw/m-p/3555662#M163460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-27T14:34:15Z</dc:date>
    </item>
  </channel>
</rss>

