Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When to use GetBOMByFileIds vs GetFileAssociationsByIds

3 REPLIES 3
Reply
Message 1 of 4
FarrenYoung
524 Views, 3 Replies

When to use GetBOMByFileIds vs GetFileAssociationsByIds

I am working on some code that uses GetBOMByFileIds and it isn't giving me the results I expect.  It's basically giving me the very first version of some files.  When I look at the "Uses" tab in vault for the same version of the parent file (assembly) it shows a much newer version.  I am wondering what the difference between GetBOMByFileIds and GetFileAssociationsByIds is?  When should each be used?  Would I get the same results with both or would GetFileAssociationsByIds show me the same results I see in the "Uses" tab?

--Farren

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
3 REPLIES 3
Message 2 of 4
FarrenYoung
in reply to: FarrenYoung

Is it possible someone from autodesk that knows about this could respond? I see newer messages answered and my message just gets pushed farther down the list...

--Farren

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
Message 3 of 4
Chris_Rogers
in reply to: FarrenYoung

I would like to know the same thing!  Bump for an Autodesk response.

-Chris Rogers
Inventor Certified Professional
________________________________________________________
If this post helps, please click the "Thumbs up"/"Kudos"
If this post gives the solution, please click "Accept as Solution"
Message 4 of 4
Daniel.Dulzo
in reply to: FarrenYoung

Hi Farren Young,

 

The GetFileAssociationsByIds() method reads relationship data that is directly stored in Vault. This is the data that you provide via the associations parameter in the CheckinFile() method. The GetBOMByFileIds() method gets BOM metadata that is really only intended for use with items and is stored seperately in BOM blobs in Vault, so it's possible that the two could return different file versions, however, you really should be using GetFileAssociationsByIds() when trying to get File associations.

 

The reason your "Uses" tab might look different that the data you get back with these methods is because the server actually provides multiple methods for getting file references that behave slightly different. For versions of Vault that support revisions, you can get file relationships that are "released bias". The other "versions" of the GetFileAssociationsByIds() methods are GetRevisionFileAssociationsByIds() and GetRevisionFileAssociationsByIds2().



Daniel Dulzo
Software Engineer
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report