Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: j.haggenjos

Hi @j.haggenjos.  There is actually a workflow for doing what you want with iLogic rules, it's just not discussed very much here on the forums for some reason.  You can actually build up your own sets of regularly used Public Subs, Functions, Enums, etc., as iLogic rules (as long as they are formatted correctly and have the right settings turned on).  Then you can have access to the resources in those other rules by including a special type of reference to those other rule(s) at the top of your new rule.

Here is a link to one online help page that touches on the subject.

Advanced iLogic Techniques Reference 

 

1)  In order to prepare an 'external' rule to be used as a reference for resources like this, you first need to more thoroughly prepare/format the code within, similarly to how it might be laid out in regular vb.net, with everything contained within Classes &/or Modules.  Then in the Option panel of the iLogic Rule Editor for that rule, turn on the 'Straight VB Code' setting.

2)  Then in the new rule (where you want to use a resource from that first rule), either use the AddVBRule followed by the quoted name of the other rule, at the top of the rule, or use the AddVBFile, followed by the quoted path & name of the file to reference code from at the top of the rule.

It can be a bit difficult to get working properly if you're new to programming, because all the usual iLogic snippet type codes won't work like normal within that resource rule, due to how it has to be formatted.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) :thumbs_up:.

If you want and have time, I would appreciate your Vote(s) for My IDEAS :light_bulb: or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)