Getting the Vault name in an Event

Many people have noticed that with Web Service Command Events, there is no way to tell the name of the Vault you are connected to.  You can get a context to make API calls, but the Vault name is not part of the context.  It's a limitation of the architecture.

So here is my suggested workaround:  Create a Vault Option called "VaultName" and store the name there.  That way, your code can call KnowledgeVaultService.GetVaultOption("VaultName") to get the Vault name. 

Of course, the option has to be set up ahead of time, like during the install or the initial configuration of your app.

 

PS. Sorry for the short article. I'm busy finishing up the materials for my AU class on events.


Comments

2 responses to “Getting the Vault name in an Event”

  1. please……
    Iam install autodesk vault 2012
    when Iam complete install
    some page appear ask me about
    username
    passward
    server
    database
    please what I do

  2. The best place for you to go is the WikiHelp for Vault. Try this article as a starting point:
    http://wikihelp.autodesk.com/Vault/enu/2012/Help/02._Working_with_Vault/01._Vault_Client/0009Getting_Started_with_Vault

Leave a Reply to aliCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading