I believe I have found the root cause to this issue, it appears to me that the issue stems from how the new enhanced iLogic handles the legacy iLogic programming. There is a specific coding sequence that cause this issue.
In my case, I have components in an assembly file that may be in a suppressed state. In order for iLogic to be able to find the component occurrence, the Master LOD and view must be active so that those suppressed items become unsupressed and identifiable. My code would typically start with...
Dim oAsmCompDef As AssemblyComponentDefinition = oDoc.ComponentDefinition
oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Item("Master").activate
oDoc.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("Master").activate
My code would then search through the component occurrences to identify each component before returning to a custom LOD.
'Set desired Rep & LOD
Try
oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Item("View1").activate
Catch
oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Add("View1")
End Try
Try
oDoc.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("LevelofDetail1").activate
Catch
oDoc.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations.Add("LevelofDetail1")
End Try
The return to the Master LOD allows the iLogic rule to only run once. You don't get an error report and everything appears normal, except that anything processed in the iLogic just doesn't run. Forcing the rule to run does not work. The only work around I've found is to edit the rule, and go right to the "Save & Run" option and then the rule will run immediately and then die again.
The final solution is to simply retire the legacy code and move on to the new managed component states supported in the enhanced iLogic.
So if you have libraries built on suppressed features controlled via iLogic in this manner, expect automation errors until you've completely updated your code.
Autodesk Inventor Certified Professional