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: 

Visual Studio Perform Vault Search and Export

6 REPLIES 6
Reply
Message 1 of 7
williamweb15
550 Views, 6 Replies

Visual Studio Perform Vault Search and Export

I need to use code to perform a search for all files checked out and export those results to a .txt file. Attached is a capture of the search performed without code. I am using Visual Studio 2019 to create the program and C# to code it. I have never used code to tell Vault to do anything before, so I'm not really sure where to begin besides installing "Autodesk Vault 2020 SDK". Unless I'm mistaken, the included examples don't seem to have what I'm looking for.

Labels (1)
6 REPLIES 6
Message 2 of 7
smilinger
in reply to: williamweb15

You can already use the various export or report functions built in vault to get what you want, why bother to write code for that?

Message 3 of 7
williamweb15
in reply to: smilinger

Because this needs to be done automatically weekly. The information is going to be sent with an auto-generated email to the people who have files checked out as well. If this can all be done without programming, I'm all ears.

Message 4 of 7
smilinger
in reply to: williamweb15

How about educate your users to save a search folder such as "My Checked Out Files", so they can check it up every now and then?

You can also try to add it to the deployment so every user will get it by default.

Message 5 of 7
williamweb15
in reply to: smilinger

Because my job is to do what I described. The admin doesn't trust everyone to keep track of what they have checked out, and considering this is an automation company, we should probably have this automated.

Message 6 of 7
smilinger
in reply to: williamweb15

OK, then you may need to learn something about job processor and how to create a job processor extension, which looks like the obvious solution for your situation. I believe you can find a code sample in the installed vault SDK. As of vault 2019 you can add a scheduled job on the server, make it run at an interval as you want.

Also if you are familiar with powershell, I believe you can also make a powershell script to do the job, using windows task scheduler to schedule it to run  on some machine periodically.

Message 7 of 7
williamweb15
in reply to: smilinger

I have SDK installed, but I don't think any of the sample code has what I need. I need to know the functions for doing what I want to do, and I can't find information about those. These are the functions I believe I need:

  1. Performing a search
  2. specifying search criteria (Checked Out By is not empty)
  3. sorting results based off the "Created By" column
  4. exporting to either a .txt or .xml file

I can perform all of these through the UI, but I don't know how to perform any of these through code, specifically C# in Visual Studio.

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

Post to forums  

Autodesk Design & Make Report