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: 

GetItemFileAssociationsByItemIds returns ItemFileAssoc with empty file name

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
jmsunseri
889 Views, 5 Replies

GetItemFileAssociationsByItemIds returns ItemFileAssoc with empty file name

I'm using Vault 2012 and when running GetItemFileAssociationsByItemIds the returned ItemFileAssociation FileName attribute is always empty.  I can go to the Item in the Vault look at it's associated files and those files have a filename attribute defined. 

Tags (1)
5 REPLIES 5
Message 2 of 6
Redmond.D
in reply to: jmsunseri

It's working for me.  Can you post some of your code and maybe a screenshot or two?



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 6
jmsunseri
in reply to: Redmond.D

I've published all the source code to the project here.  Specifically the clsGlobal.cs and PublishToBuzzsaw.cs files are important.  The tmr_Timer_Elapsed runs every 30 seconds checking a SQL database to see if there are any un processed rows.  It inturn calls clsGlobal.GetLatestFiles which in the case calls GetLatestAssociatedFiles which calls Autodesk.Connectivity.WebServices.ItemFileAssoc[] oAssocs = oItemService1.GetItemFileAssociationsByItemIds(new long[] { oItemIn.Id }, ItemFileLnkTypOpt.Primary);

 

As you can see in the screen shot attached in the left hand side I have Item 100151 below in it's associated files you see File Name 004.dwg.  On the right hand side you can see oItemIn.Id which we passed to GetItemFileAssociationsByItemIds.  It's kind of obscured but you can see the FileName property at the top of the Watch window that is = ""  that is the FileName attribute of oAssoc.  

 

I hope this is enough information.

Message 4 of 6
Redmond.D
in reply to: jmsunseri

From your screenshot it looks like the Cloaked property is true, which means that the logged in user doesn't have read permission on the file.  As a result, the file name is blanked out.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 5 of 6
jmsunseri
in reply to: Redmond.D

How on earth does it get to be cloaked?  I don't think I'm specifically setting that value anywhere and it's not a visible property through the vault interface.

Message 6 of 6
jmsunseri
in reply to: jmsunseri

Nevermind I figured it out.

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

Post to forums  

Autodesk Design & Make Report