Intermitent Problem with setting Paramaters Ilogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have been working on code in Ilogic to setup parts and assemblies with. Recently I have found the need to update old parts and assemblies so i have created an external rule. This rule works but occasionaly it will result in an error saying "Member not found. (Exception form HRESULT: 0x80020003 (DISP_E_mEMBERNOTFOUND))". Unfortunately, I have not been able to force this error to occur. Oddly enough the only way to get past the error is to close Inventor and restart it at which time the rule runs fine.
More Info (On Error)
System.Runtime.InteropServices.COMException (0x80020003): Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
I have traced the problem to this line of code but have not been able to figure out how to correct it (in red).
Code
Imports Inventor.UnitsTypeEnum
Dim oParams As Parameters
oParams=ThisDoc.Document.ComponentDefinition.Parameters
.....
Any information on how to correct this would be greatly appreciated as I would like to roll this out to my Workgroup but cannot until this error is resolved.