iLogic Error: Object reference not set to an instance of an object
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working on moving some rules I have been using to external, so that I don't have to go through and update each rule in each part/assembly.
I am stuck with the error: "Object reference not set to an instance of an object".
Here's the other info with the error message.
System.NullReferenceException: Object reference not set to an instance of an object.
at iLogic.CadAssemblyUtil.FindComponentOccurrence(Document rootDoc, Object compoName, Boolean topLevelOnly, Boolean inTopLevelContext)
at iLogic.CadCompoOrDoc..ctor(Document rootDoc, Object oName)
at iLogic.ParamDynamicFinder.GetParameterInCompoOrDoc(Object compoOrDocName, String paramName)
at iLogic.ParamDynamic.set_Item(Object compoOrDocName, String paramName, Object value)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
SyntaxEditor Code Snippet
Parameter("SHELL PL1 - A:1", "ShellPL1ID")=Parameter("ShellPL1ID")
I have narrowed it down to just this parameter change.
The weird thing is, is that the error pops up and then Inventor proceeds to change the part according to the rule, so the rule is actually working. It just keeps throwing up an error before it changes it though.
The part it is changing is a just circular contour flange. The part is pretty simple and if I add this rule to the assembly with the part in it. It works just fine with no errors.
Thanks for the help.