iLogic logic rule error (catastrophic) with basic code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm getting this error with the most basic of code. The error ONLY appears if the rule is run during opening of the file, otherwise it works fine. It also seems to work on other objects.
Here's the full issue:
Here's my ilogic code which i've reduced to this:
if FLG_TYPE = 1 then
Component.Replace("U_Tip_Flange:1", "U_Tip_Flange.ipt", True)
ELSE
Component.Replace("U_Tip_Flange:1", "U_Tip_Plate_Flange.ipt", True)
End if
If the FLG_TYP is anything other than 1 when loading the file, i get this message:
iLogic Rule Error in rule: FlangeSwap, in document: U_TIP_ASSY.iam (U-Tip)
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
This is the second tab.
System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.ComponentOccurrence.Replace(String FileName, Boolean ReplaceAll)
at iLogic.ComponentInRule.Replace(Object componentName, String newFileName, Boolean replaceAll, Boolean ignoreError)
at iLogic.ComponentInRule.Autodesk.iLogic.Interfaces.ICadComponent.Replace(Object componentName, String newFileName, Boolean replaceAll, Boolean ignoreError)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at e.a(String A_0)
It works JUST FINE if the rule is not run on file open. Manual, just fine. On change, just fine, on save, just fine. What's the problem at startup? Especially considering I run the same basic code on a couple other pieces and they cause no problems. I even use it on a series of 5 different numbers (if 1, 2, 3, etc) on another part/sub and it works no problem.
Every object is grounded in place, none are used in any constraints.
Why would it cause issues only in open and only on this piece? Could be related to it being the first part in the assembly?
Seems to me it's something wrong in the plate flange part itself (which seems to be just fine on it's own) or a problem in iLogic itself for rules run in the opening of a file.
This is Inventor 2010 fwiw (awaiting IT to get us 2013).