You don't need illogic for this!
you can do that inventor default.
Use parameters for this.
i.e.: Use a parameter distance "0"
and a parameter for the suppression of the component one.
read this also:
https://www.cadlinecommunity.co.uk/hc/en-us/articles/210054325-Inventor-2017-quick-tip-Set-rules-to-...
In detail I can show you on Monday.
Regards,
Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !