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: 

File.Hidden=True not hiding file

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Mzwijacz
453 Views, 3 Replies

File.Hidden=True not hiding file

 

I'm trying to mark a file for later processing and hide the file from the user. I found the File object has a Hidden property. When I set the property to true, the file remains visable. If I log in as guest or some other non-Administrator account, the file is visable.


void Test_Execute(Object sender, CommandItemEventArgs e) { //get connection object VDF.Vault.Currency.Connections.Connection conn = e.Context.Application.Connection; IEnumerable<ISelection> Selection = e.Context.ViewSelectionSet; foreach (ISelection Selent in Selection) { if (Selent.TypeId == SelectionTypeId.File) { File MasterFile = conn.WebServiceManager.DocumentService.GetLatestFileByMasterId(Selent.Id); // check if file is locked or checked out if (!MasterFile.Locked || !MasterFile.CheckedOut) { //Hide the master file MasterFile.Hidden = true; }//end if not checked out or locked }//end if is file }//end for each file }//end void Test_Execute

Not sure why the file remains visable

Thanks,

MFZ

 

3 REPLIES 3
Message 2 of 4
smithmat
in reply to: Mzwijacz

There is a Vault Explorer client setting which determines whether hidden files show up for the user or not: Tools->Options->Show hidden files.:

showHidden.PNG

 

Hidden files are not a security feature--any user can see them if they want to.

 

- Matt

Message 3 of 4
minkd
in reply to: smithmat

In addition to Matt's comment, your code is not changing the file to hidden.  You have to checkin the file with hidden=false (hidden is a parameter of the checkin method).

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
Message 4 of 4
Mzwijacz
in reply to: minkd

How do I mark this thread as accepted ? I don't see a link or a menu anywhere.

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

Post to forums  

Autodesk Design & Make Report