Please describe your problem more in detail.
E.g. which PDM?
What kind of macro... addins or standalone applications?
Thanks for your quick response.
I'm working in Solidworks PDM.
Please check this link.
I tried those steps in VB but it won't work for me.
Please help me on this.
No, but to clarify
This macro isn't really a "macro", it's a stand alone vb.net program. It doesn't use the admin login, it uses the username of the user logged into Windows on that machine.
BUT you need to change this line of code "vault.LoginAuto("MyVaultName", Me.Handle.ToInt32)" and replace "MyVaultName" with the name of your PDM vault. See the note #8 in the instructions below the code.
Give this a try and see if it works.
This method uses the logged-in PDM user:
Void LoginAuto (string bsVaultName, int hParentWnd);
Void LogInWindowsUser (string bsUserName, string bsPasswd, string bsVaultName);
Otherwise, this login can be used for a specific user:
Void Login (string bsUserName, string bsPasswd, string bsVaultName);
string bsUserName = The name of logged-in user
string bsPasswd = The password of the logged-in user
string bsVaultName = Your vaultname
I'm having trouble with the LoginAuto feature. Specifically, I'm don't know what to put in for the hParentWnd parameter. The examples I've seen all show something like "this.Handle.ToInt32()" but if I try that I get an error that my macro does not contain a definition for Handle. Any Ideas?
try this: " vault.LoginAuto("yourVaultname", 0); "
Finally it works.
I need to access specific folder in EPDM.
Could you please share some vba codes here?
I think VBA not possible...
Try this (C#):
IEdmVault5 vault = new EdmVault5(); string rootFolderPath = vault.RootFolderPath; IEdmFolder5 FolderName = default(IEdmFolder5); FolderName = vault.GetFolderFromPath(rootFolderPath + "\\YourFolderName");