Hi,
I've got some code that is attempting to do the following:
1) Retrieve a .dwg and associated .ipt from Vault ($\Test\Part1.dwg and $\Test\Part1.ipt)
2) Rename the files locally and copy them to a subfolder (resulting in C:\Projects\Test\Replace\Part1-2.dwg and C:\Projects\Test\Replace\Part1-2.ipt)
3) Update the reference in the new .dwg (Part1-2.dwg) to point to the new .ipt (Part1-2.ipt)
4) Upload the renamed, updated files into the new location in Vault ($\Test\Replace)
Everything seems to work fine, except that if I delete the local files after this process completes and then use Inventor's "Open From Vault" command to open the .dwg, it only downloads the .dwg rather than also downloading the .ipt. This causes a reference error to then pop up in Inventor.
I'm using the .dwg's ReferencedFileDescriptor.ReplaceReference method to update the reference in step 3 and then saving the file. If I look in Vault Explorer after this process completes, the references appear to be correct. If I select the $\Test\Replace\Part1-2.dwg file, Part1-2.ipt is shown below in the "Uses" tab.
Also, when I use Fiddler to profile the web service requests being sent to Vault after selecting a file to open from Vault within Inventor, the references are being returned correctly. Here is the sequence of requests in both cases (when the files have been added to Vault using my code vs. files that have been checked in from Inventor):
When you check-in the DWG and set up your dependency to the IPT, what are you setting as the 'dependSources' value. I think Inventor expects the value to be "INVENTOR".
To check things our for yourself, call GetFilesAssociationsByIds on Part1.dwg. The 'Source' value on the FileAssoc object is what you want to use for the 'dependSources' value on check-in.
I just double-checked, and the call to AddFile is passing "INVENTOR" as the single element in an array for the dependSources parameter. The call to GetFileAssociationsByIds is also returning "INVENTOR" as the Source on the dependency file association. Here's the complete result from GetFileAssociationsByIds, in case anything else jumps out at you:
<GetFileAssociationsByIdsResult>
<FileAssocArray>
<FileAssocs>
<FileAssoc Id="70" Typ="Dependency" Source="INVENTOR" CorrectRev="true">
<ParFile Id="209" Name="Part1-12.dwg" MasterId="208" VerNum="1" MaxCkInVerNum="1" CkInDate="2011-02-11T08:04:56.72-06:00" Comm="Vault File Copy Operation" CreateDate="2011-02-11T08:04:56.72-06:00" CreateUserId="2" Cksum="-752367122" FileSize="195931" ModDate="2011-02-11T08:05:24.767-06:00" CreateUserName="Administrator" CheckedOut="false" CkOutFolderId="-1" CkOutSpec="" CkOutMach="" CkOutUserId="-1" FileClass="DesignDocument" Locked="false" Hidden="false" Cloaked="false" FileStatus="Unknown" IsOnSite="true" OrigFileId="-1" DesignVisAttmtStatus="None" ControlledByChangeOrder="false">
<FileRev RevId="95" Label="" MaxConsumeFileId="-1" MaxFileId="209" RevDefId="0" MaxRevId="95" Order="1" />
<FileLfCyc LfCycStateId="-1" LfCycDefId="-1" LfCycStateName="" Consume="false" />
<Cat CatId="1" CatName="Base" />
</ParFile>
<CldFile Id="207" Name="Part1-12.ipt" MasterId="206" VerNum="1" MaxCkInVerNum="1" CkInDate="2011-02-11T08:04:44.347-06:00" Comm="Vault File Copy Operation" CreateDate="2011-02-11T08:04:44.347-06:00" CreateUserId="2" Cksum="954900923" FileSize="75264" ModDate="2011-02-11T08:05:12.067-06:00" CreateUserName="Administrator" CheckedOut="false" CkOutFolderId="-1" CkOutSpec="" CkOutMach="" CkOutUserId="-1" FileClass="None" Locked="false" Hidden="false" Cloaked="false" FileStatus="Unknown" IsOnSite="true" OrigFileId="-1" DesignVisAttmtStatus="None" ControlledByChangeOrder="false">
<FileRev RevId="94" Label="" MaxConsumeFileId="-1" MaxFileId="207" RevDefId="0" MaxRevId="94" Order="1" />
<FileLfCyc LfCycStateId="-1" LfCycDefId="-1" LfCycStateName="" Consume="false" />
<Cat CatId="1" CatName="Base" />
</CldFile>
</FileAssoc>
</FileAssocs>
</FileAssocArray>
</GetFileAssociationsByIdsResult>