Help! Unable to reactivate Vault add-in with iLogic?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
This is driving me nuts and I'm hoping someone can help me get to the bottom of this:
I need to suppress check-out dialog temporarily while some other code runs. I have been doing this successfully for some time now using the following code:
Dim oVault As ApplicationAddIn = ThisApplication.ApplicationAddIns.ItemById("{48B682BC-42E6-4953-84C5-3D253B52E77A}")
oVault.Deactivate
'other code...
oVault.Activate
This was working perfectly up until about a week or two ago. Nothing has changed that I'm aware of, but all of a sudden I get this error every time it tries to run the activate command after the deactivate command has run:
"The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"
Here is what it says under the "More Info" tab:
"System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.ApplicationAddIn.Activate()
at ThisRule.Main() in rule: Activate Vault, in document MyDoc.ipt:line 11
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)"
To make things even weirder, it randomly will work every now and then - most of the time it works if I've just restarted the computer and usually only works once if at all. Also, I'm the ONLY person having this issue, my coworkers can use the same iLogic rule just fine with no errors. This leads me to believe it's probably computer specific?
If I run the code with the activate portion commented out (so it only deactivates), I can't even manually reactivate vault - either nothing happens or inventor just straight up crashes if I click anything in the Vault browser tab. Also, attempting to manually load the Vault addin back in with the Addin Manager does nothing. The Addin Manager also says it is still loaded even after running the deactivate command, but I know it is deactivated because I will get errors saying I'm not logged into Vault if I try to check something in for instance.
Any help or direction will be greatly appreciated.