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: 

finding local workspace path with api

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
lornemartin
2784 Views, 9 Replies

finding local workspace path with api

I need to find the local copy of a file with the api. found this old post. Is it still relevant?  I can't find the "WorkingFolders.xml" file anywhere on my system. Windows 7 running Vault Colloberation 2012. If it is no longer revelant, could somebody point me to a current solution?

 

Thanks,

Lorne Martin

9 REPLIES 9
Message 2 of 10
Redmond.D
in reply to: lornemartin

Here is some updated information: 

Client XML Files - The locaiton of the client XML files, including WorkingFolder.xml.

2 API-Related Hotfixes - Hotfix for some features in Autodesk.Connectivity.Explorer.ExtensibitilyTools, including GetWorkingFolder().



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 10
lornemartin
in reply to: Redmond.D

Thanks Doug, I think I will try to use the new GetWorkingFolder() call.  However I think that means I will have to update my login code to use the new WebServiceManager. I have the following sample code, but I haven't found any code that shows me how to login from an explorer extension that already has these credentials supplied when the user started up the vault explorer. Could you point me to some?

// THE NEW WAY - C#

            UserPasswordCredentials login =
                new UserPasswordCredentials(
                "localhost", "Vault", "Administrator", "", true);

            using (WebServiceManager serviceManager =
                new WebServiceManager(login))
            {
                Folder root =
                    serviceManager.DocumentService.GetFolderRoot();
            }

 

Message 4 of 10
Redmond.D
in reply to: lornemartin

Most of the sample applications on my blog are Vault Explorer extensions.  So they have code that illustrates how to handle the credentails.  For example, you can look at the source code from Hyperlink Maestro.

 

The quick answer is you want to be using the UserIdTicketCredentials when creating a new WebServiceManager.

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 5 of 10
lornemartin
in reply to: Redmond.D

Thanks for that tip, now for the next question, the only example code I can find that uses the GetWorkingFolder function goes something like this:

 

IExplorerUtil vcetExplorer = ExplorerLoader.LoadExplorerUtil(
                e.Context.Application.VaultContext.RemoteBaseUrl.ToString(), 
                e.Context.Application.VaultContext.VaultName,
                e.Context.Application.VaultContext.UserId,
                e.Context.Application.VaultContext.Ticket);

            if (vcetExplorer != null)
            {
                Folder vcetFolder = GlobalManager.WebServices.DocumentService.GetFolderRoot();
                string sVltWorkingFolder = vcetExplorer.GetWorkingFolder(vcetFolder);

                MessageBox.Show(sVltWorkingFolder);

 This compiles ok, but when I run it the plugin won't load. Is there any complete example somewhere?

 

Message 6 of 10
lornemartin
in reply to: lornemartin

ok, i have to use GetExplorerUtil because my extension is already running.  But it still won't load.

 

 

 

IExplorerUtil vcetExplorer = ExplorerLoader.GetExplorerUtil(e.Context.Application);

            if (vcetExplorer != null)
            {
                Folder vcetFolder = GlobalManager.WebServices.DocumentService.GetFolderRoot();
                string sVltWorkingFolder = vcetExplorer.GetWorkingFolder(vcetFolder);

                MessageBox.Show(sVltWorkingFolder);

 

Message 7 of 10
Redmond.D
in reply to: lornemartin

Autodesk.Connectivity.Explorer.ExtensibilityTools.dll and Autodesk.Connectivity.WebServicesTools.dll are not part of the Vault Explorer install.  So you need to deploy these DLLs with your extension if you are referencing them.

 

This article has more things to check.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 8 of 10
lornemartin
in reply to: Redmond.D

Thanks. That did the trick.

Message 9 of 10
lornemartin
in reply to: lornemartin

Now that I got the call working, I am running into the problem described in this thread. I did install the hotfix but it is still returning the default path. When I do a search for the dll that gets updated, I find 1 with the correct version and 3 older ones with differeing versions. Should these be deleted?

Message 10 of 10
noontz
in reply to: lornemartin

I eventually succeeded running an instance of IExplorerUtil with vault base 2013 in a standalone client, so the base limitation is only on explorer extensions, or something has changed. Anyway: I´m keeping this thread alive as It seems to be an extremely heavy way to get a "simple" path mapping from the server. Is there any "lightweight" alternatives?

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

Post to forums  

Autodesk Design & Make Report