I've got an assembly and parts controlled by an excel file.
I made a small change to the excel file and now when I try to open the assembly i get a catastrophic error that is pointing to one of the ilogic routines i have in the assembly.
Now, there are no complex routines here. The rule it's pointing to is basically:
If parameter = 1 then
suppress this part
activate this part
else
activate this part
suppress this part
end if
Obviously that's not the exact/proper syntax - but that's the extent of the rule. And it's worked just fine til this morning. FWIW, the change in the excel file was altering the size - not structural. The parts still open and adjust accordingly.
I set the ilogic trigger to run when the file is opened. Now, i can't access the file period. Is there a key you can hit or something to keep the trigger from activating? or is this assebly just shot?
Solved! Go to Solution.
Solved by jdkriek. Go to Solution.
You might try Code Injector.
I've had some luck deleting iLogic Rules that would normally instantly crash Inventor.
Is it possible to load your assembly after iLogic AddIn is disabled?
I was able to get back in by loading a back up of my excel file.
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?
Can't post the models, proprietary stuff unfortunately.
The problem has something to do with suppression and LOD's though.
I've replaced the above code with a version that makes the pieces invisible, disabled, and a bom structure of reference instead of using suppress and LOD.
Doing that and getting rid of the single LOD i had seems to make things a bit quicker and i'm not getting no errors.
The weirdest part before was that the error only occurred when using the trigger options to run the rule when opening the filed. Worked fine if you took it out of there and only had it set to run upon saving the file.
Can't find what you're looking for? Ask the community or share your knowledge.