- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have looked through a large number of forum post about this subject, but nothing that answers my problem.
I have the following code (copied) from this post:
using Connectivity.InventorAddin.EdmAddin;
using VDF = Autodesk.DataManagement.Client.Framework.Vault;
using System.Windows.Forms;
public void SetupUserInterace(Inventor.ApplicationAddInSite applicationAddInSite, bool firstTime, string clientID)
{
if (firstTime)
{
EdmSecurity edmSecurity = EdmSecurity.Instance;
var vaultServerName = edmSecurity.GetEdmLoginPreferences().Server;
var vaultName = edmSecurity.GetEdmLoginPreferences().VaultName;
var vaultUserName = edmSecurity.GetEdmLoginPreferences().UserName;
var vaultPassword = edmSecurity.GetEdmLoginPreferences().Password;
VDF.Results.LogInResult logInResults;
logInResults = VDF.Library.ConnectionManager.LogIn(vaultServerName, vaultName, vaultUserName, vaultPassword, VDF.Currency.Connections.AuthenticationFlags.Standard, null);
VDF.Currency.Connections.Connection connection = null;
if (logInResults.Success)
{
connection = logInResults.Connection;
MessageBox.Show("There is a connection with the Houten Vault.");
}
}
}
The trouble I am having is how to get necessary inputs for this method. I wanna call this method at a specific moment in my add in. The add in itself gets the ApplicationAddInSite object, but I can't figure out how to pass it in my method. firstTime I am not sure if necessary? I think I always want to check if the connection still exists.
clientID: is that the Guid of my add in or of the Vault add in for Inventor? If it is the latter, how do I find this value?
To add: what I want, is to pass a value to the comment field when checking in a file to the Vault when the user clicks check in.
Solved! Go to Solution.