EPANET icon indicating copy to clipboard operation
EPANET copied to clipboard

request additional api functions for enabling/disabling rules and controls nondestructively

Open samhatchett opened this issue 3 years ago • 2 comments

The new rules/controls API functions are great - however in my application I have a need to be able to selectively enable and disable these rules/controls individually after load-time without removing them entirely.

I have example code that could enter into a PR.

samhatchett avatar Jun 14 '22 17:06 samhatchett

So you will add a new property for a rule\control, like active?

eladsal avatar Jun 14 '22 17:06 eladsal

that's right - it would be a new property on those structures to signify whether it is enabled. The enabled/disabled state would not be saved in any way into an INP file however - I suppose the default of "enabled" would ensure backwards compat.

samhatchett avatar Jun 14 '22 18:06 samhatchett