<?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 a source file in drawing view in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661141#M144137</link>
    <description>Hi Rikard,&lt;BR /&gt;
&lt;BR /&gt;
thank you! You helped me a lot.&lt;BR /&gt;
I have to make an upgrade.</description>
    <pubDate>Thu, 22 Apr 2010 12:26:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-04-22T12:26:42Z</dc:date>
    <item>
      <title>Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661130#M144126</link>
      <description>Is it possible to change a source file in drawing view?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Tue, 06 Apr 2010 07:46:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661130#M144126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-06T07:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661131#M144127</link>
      <description>Hi, &lt;BR /&gt;
&lt;BR /&gt;
Neither UI nor API. I will consult with PD about this request (as we can replace a component in the assembly, why cannot replace a source file for drawing view?). Could you please give more info? Such as why you need this function, is it important for you?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
- Inventor API QA</description>
      <pubDate>Tue, 13 Apr 2010 06:35:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661131#M144127</guid>
      <dc:creator>JarFu</dc:creator>
      <dc:date>2010-04-13T06:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661132#M144128</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Thank you for the answer.&lt;BR /&gt;
&lt;BR /&gt;
I am writing a code which copy, rename and modify already created assembly and all connected parts. I would like to copy drawings as well and link view sources to newly created files&lt;BR /&gt;
&lt;BR /&gt;
Something similar as "Copy Design" in the Vault but the files aren't "Vaulted".&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 13 Apr 2010 10:50:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661132#M144128</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-13T10:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661133#M144129</link>
      <description>You might want to take a look at iChangeRef&lt;BR /&gt;
http://www.mcadforums.com/forums/viewtopic.php?f=34&amp;amp;t=4777&amp;amp;hilit=iChangeRef&lt;BR /&gt;
&lt;BR /&gt;
Mike&lt;BR /&gt;
&lt;BR /&gt;
&lt;KLAUSETLAILA5105&gt; wrote in message news:6371859@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
Thank you for the answer.&lt;BR /&gt;
&lt;BR /&gt;
I am writing a code which copy, rename and modify already created assembly &lt;BR /&gt;
and all connected parts. I would like to copy drawings as well and link view &lt;BR /&gt;
sources to newly created files&lt;BR /&gt;
&lt;BR /&gt;
Something similar as "Copy Design" in the Vault but the files aren't &lt;BR /&gt;
"Vaulted".&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;/KLAUSETLAILA5105&gt;</description>
      <pubDate>Tue, 13 Apr 2010 14:56:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661133#M144129</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-13T14:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661134#M144130</link>
      <description>Mike,  Thanks your info! This addin is really good to change source/reference file(s) in the drawing.</description>
      <pubDate>Wed, 14 Apr 2010 06:43:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661134#M144130</guid>
      <dc:creator>JarFu</dc:creator>
      <dc:date>2010-04-14T06:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661135#M144131</link>
      <description>Mike: Thank you for the link.&lt;BR /&gt;
&lt;BR /&gt;
But I am still looking for an example how to write it in VBA - I would like to implement more things in the code.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Thu, 15 Apr 2010 09:14:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661135#M144131</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-15T09:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661136#M144132</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I think you need to use the Apprentice part of the API&lt;BR /&gt;
&lt;BR /&gt;
Do a search for "ChangeReferenceSample" in the API Rererence and there you will find an example to change a drawings references model file..&lt;BR /&gt;
&lt;BR /&gt;
/Rikard</description>
      <pubDate>Thu, 15 Apr 2010 12:16:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661136#M144132</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-15T12:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661137#M144133</link>
      <description>Hi Rikard,&lt;BR /&gt;
&lt;BR /&gt;
thank you. It is probably what I am looking for. But I have a problem to run this for a drawing. In assambly it works.&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
Private Sub ChangeReferenceSample()&lt;BR /&gt;
    Dim oApprentice As New ApprenticeServerComponent&lt;BR /&gt;
    &lt;BR /&gt;
    ' Open a document.&lt;BR /&gt;
    Dim oDoc As ApprenticeServerDocument&lt;BR /&gt;
    Set oDoc = oApprentice.Open("C:\Temp\608-01-1108.idw")&lt;BR /&gt;
    &lt;BR /&gt;
    ' Iterate through the references looking for a&lt;BR /&gt;
    ' reference to a specific file.&lt;BR /&gt;
    Dim oRefFileDesc As ReferencedFileDescriptor&lt;BR /&gt;
    For Each oRefFileDesc In oDoc.ReferencedFileDescriptors 'IT CRASHS ON THIS LINE - ERROR 91: VARIABLE NOT SET&lt;BR /&gt;
        If oRefFileDesc.FullFileName = "C:\Temp\608-01-1108.ipt" Then&lt;BR /&gt;
            ' Replace the reference.&lt;BR /&gt;
            Call oRefFileDesc.PutLogicalFileNameUsingFull("C:\Temp\608-01-1108A.ipt")&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next&lt;BR /&gt;
    &lt;BR /&gt;
    ' Set a reference to the FileSaveAs object.&lt;BR /&gt;
    Dim oFileSaveAs As FileSaveAs&lt;BR /&gt;
    Set oFileSaveAs = oApprentice.FileSaveAs&lt;BR /&gt;
    &lt;BR /&gt;
    ' Save the assembly.&lt;BR /&gt;
    Call oFileSaveAs.AddFileToSave(oDoc, oDoc.FullFileName)&lt;BR /&gt;
    Call oFileSaveAs.ExecuteSave&lt;BR /&gt;
End Sub&lt;BR /&gt;
 &lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Does someone know how to solve it?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 20 Apr 2010 05:20:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661137#M144133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-20T05:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661138#M144134</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
There is not anything wrong with your code.. &lt;BR /&gt;
Maybe there is something with your drawing file...Have you tried this code on some other files? &lt;BR /&gt;
&lt;BR /&gt;
/Rikard</description>
      <pubDate>Tue, 20 Apr 2010 08:20:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661138#M144134</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-20T08:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661139#M144135</link>
      <description>Thank you again,&lt;BR /&gt;
&lt;BR /&gt;
I have tried to make totally new drawing and parts and the result is the same.&lt;BR /&gt;
&lt;BR /&gt;
I attached zip file with drawing, parts and VBA code.&lt;BR /&gt;
I am using Inventor 2010.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thank you</description>
      <pubDate>Wed, 21 Apr 2010 12:48:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661139#M144135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-21T12:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661140#M144136</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've done some more testing..&lt;BR /&gt;
I can't get it to work in 2010 either.. The code works in 2011.. It has to be a bug..&lt;BR /&gt;
&lt;BR /&gt;
I never used Apprentice in VBA before. I just use it in VB.NET 2008..&lt;BR /&gt;
&lt;BR /&gt;
/Rikard</description>
      <pubDate>Wed, 21 Apr 2010 14:55:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661140#M144136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-21T14:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Change a source file in drawing view</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661141#M144137</link>
      <description>Hi Rikard,&lt;BR /&gt;
&lt;BR /&gt;
thank you! You helped me a lot.&lt;BR /&gt;
I have to make an upgrade.</description>
      <pubDate>Thu, 22 Apr 2010 12:26:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-a-source-file-in-drawing-view/m-p/2661141#M144137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-22T12:26:42Z</dc:date>
    </item>
  </channel>
</rss>

