I have this problem, when I try to cast the "batch" object, I am raised exception "Invalid cast". Can you help me out with why? The vault5 object exists and is correct.
public void batch(IEdmVault5 vault5)
{
edmVault11 = (IEdmVault11)vault5;
IEdmBatchRefVars batch = default(IEdmBatchRefVars);
batch = (IEdmBatchRefVars)edmVault11.CreateUtility(EdmUtility.EdmUtil_BatchRefVars);
//some code
}
Edit 1: Error message:
System.InvalidCastException HResult=0x80004002 Messaggio=Cast specificato non valido
I would suggest you try out this change , also
Besides given the nature of Solidworks API make sure that the installation and license are valid .