Open from Vault does not download the components

In one of our recent migrations, from another data management System (SmartTeam) to Vault 2013, we run into a strange behavior. Opening the Inventor assembly from Vault worked fine. An “open from Vault”, from within Inventor, downloaded only the assembly file into the local workspace, without the components, and Inventor came with the following message: Inventor allows you to work in assemblies with unresolved components. However updates that depend upon unresolved components will not solve correctly until all unresolved component(s) are resolved.

We use BCP for populating the Vault. So far we never experienced such behavior. It turned out that the redirection information were missing in the BCP file. For this situation we thought it is not necessary, as the file name remains the same, even tough the folder location changes. We expected that Inventor should resolve the references, which it would if Vault would download all the references. It was the first time we made a migration without redirection info. We thought we can take the short way – we were wrong!

In the Vault.XML file of the BCP package, you’ll find for each Association Element, an attribute called RefId (line 29,30 in the source below).

<?xml version="1.0" encoding="utf-8"?>
<Vault sourceId="317c3bd0-f91e-4d5e-82b2-e79c4530ebca" xmlns="http://schemas.autodesk.com/pseb/dm/DataImport/2012-01-12">
 <Statistics TotalFiles="3" TotalFolders="3" />
 <Security></Security>
 <Behaviors></Behaviors>
 <Root>
 <Folder Name="Designs" Category="Folder">
 <Created User="Administrator" Date="2013-05-06T06:29:21.84Z" />
 <Folder Name="test" Category="Folder">
 <Created User="Administrator" Date="2013-05-06T06:29:21.84Z" />
 <File Name="Part2.ipt" Classification="None" Category="Base">
 <Revision>
 <Iteration Comment="" Modified="2013-05-06T06:27:27.213Z" LocalPath=".\redir-files-0\1-1.ipt" Id="_412" cspid="4">
 <Created User="Administrator" Date="2013-05-06T06:29:23.42Z" />
 </Iteration>
 </Revision>
 </File>
 <File Name="Part1.ipt" Classification="None" Category="Base">
 <Revision>
 <Iteration Comment="" Modified="2013-05-06T06:27:27.2Z" LocalPath=".\redir-files-0\3-1.ipt" Id="_416" cspid="4">
 <Created User="Administrator" Date="2013-05-06T06:29:24.2Z" />
 </Iteration>
 </Revision>
 </File>
 <File Name="Assembly1.iam" Classification="None" Category="Base">
 <Revision>
 <Iteration Comment="" Modified="2013-05-06T06:29:12.57Z" LocalPath=".\redir-files-0\5-1.iam" Id="_420" cspid="4">
 <Created User="Administrator" Date="2013-05-06T06:29:24.563Z" />
 <Association ChildId="_412" Source="INVENTOR" RefId="2" NeedsResolution="false" Type="Dependency" />
 <Association ChildId="_416" Source="INVENTOR" RefId="1" NeedsResolution="false" Type="Dependency"  />
 </Iteration>
 </Revision>
 </File>
 </Folder>
 </Folder>
 </Root>
</Vault>

It describes the referenceInfo index of the according internal Inventor reference. In this post we already spoke about this topic. As long the folder structure of the Inventor files does not change, and also the file name remains the same, a redirection is not needed, of course. If the folder structure changes, even though the filename remains the same, it seems that redirection is needed. We made some tests, and could not find a difference in the association object within Vault, however with redirection info, everything is fine. Here the tests we made:

  1. We created an empty Vault. Created an assembly with 2 parts and uploaded that assembly via Inventor. Via BCP we exported this package. We deleted the files in Vault and reimported the package. Both opening from Vault and Inventor worked.
  2. We manipulated the Vault.XML file and removed the RefId. We deleted the files in Vault and reimported the package. Both opening from Vault and Inventor worked.
  3. We manipulated again the VaultXML file and renamed the folder in which the files are located. We deleted the files in Vault and reimported the package. Bingo! Opening the assembly from Vault works. Opening the assembly from Inventor via “open from Vault” brings the message Inventor allows to work… The work folder contains only the assembly – no components!!
  4. As soon we add again the RefId into the BCP package, everything works fine, even tough the NeedsResolution attribute is set to false.

During these steps, we checked the FileAssoc object in Vault and it looked almost the same, except for the RefId attribute that was either NULL if omitted in the BCP package, or set to the according value. The other attributes remained the same.

Bottom line is, it takes a bit more effort to include the RefId in the BCP package, but it’s worth the investment!!

This entry was posted in Vault API and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s