I'm trying to run a rule to suppress a component in an Inventor assembly file and I get the following error:
Error in rule: Component IsActive Rule, in document: Component IsActive Rule.txt
Failed to create VaultAccess object.
>>>>>>>>>>>>>>>>>>>>>>>>>More Info>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
System.InvalidOperationException: Failed to create VaultAccess object. ---> System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'VaultAddInLib.IVaultApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6796EC03-5DAB-4B0B-849B-41195C3429E8}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at iLogic.VaultApplication..ctor(Application app)
at iLogic.VaultAccess..ctor(Application app)
at iLogic.ComponentInRule..ctor(Document rootDoc, StandardAddInServer iLogicAddin)
--- End of inner exception stack trace ---
at iLogic.ComponentInRule..ctor(Document rootDoc, StandardAddInServer iLogicAddin)
at iLogic.RuleEvalContainer.GetOrCreateNamedProperty(NamedProperty property)
at iLogic.RuleEvalContainer.GetCadComponent()
at LmiRuleScript.SetHost(IRulesHost host)
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I checked the files in and then checked them back out. Do I need to create a vault access object for the iLogic addin prior to running the rule? If so, how?
Thank you
Eric.
Eric,
It looks like an internal error.
Are you running Inventor 2012? Do you have SP1 installed?
Have you logged into Vault before opening the assembly? Can you verify that Vault commands are working before opening the assembly?
Mike,
Yes I'm running Inventor 2012 and yes I have SP1 installed. I tried running the rule before and after logging into Vault. The Vault commands from the Inventor tool bar work just fine and also from the Vault client software. Does that answer your question?
I don't know if this is any help at all but I am also getting the same error message on a fully patched 2012 Inventor install. Interestingly the process that generates the error works absolutely fine in 2011.
My senario is different in that I am calling the iLogic rule from an external program and the iLogic does not display the error when it is run manually.
If anybody can offer any advice or information it would be greatly appreciated.
thanks
Gav