Sunday, February 16, 2014

Autodesk Vault Programmer's Cookbook. 2.1. Login



Navigation:

|
|

Problem

Establish Autodesk Vault connection.

Solution

Create WebServiceManager from Autodesk.Connectivity.WebServices.dll with credentials parameters.

Discussion

WebServiceManager is your gates to the garden of Vaulty API. And IWebServiceCredentials is a key to this gates.
You can create this key in at lest 16 different ways (A-P) of getting IWebServiceCredentials.

After connection you can get next information about connection:
ReadOnlyGets if the connection is read only
RequiresSignInGets the value telling if a sign in is required before a service can be used.
RequiresSignOutGets the value telling if a sign out should be called when the service goes out of scope.
SecurityHeaderGets the security header.
ServerIdentitiesGets the server identity.
SupportsSignInGets the value telling if the credentials can sign in.
SupportsSignOutGets the value telling if the credentials can sign out.
UserNameGets the username.
VaultNameGets the vault name.

Connecting is quite simple operation, but its fundamental for any program that needs connect to Vault server. Here's algorithm, that describes logging with UserPasswordCredentials:

And here's "cmd edition", that handles errors and gives more verbose:

 

And the best way to login - is certainly by using dialogs fromVDF.


As a result you'll get login dialog with information, you've entered last time.

Links

"It's All Just Ones And Zeros" blog:
Autodesk Community. Vault customization forum: