Yes, it would be nice to have a ‘trigger’ input for Data Dam. But I don’t agree that either of the proposals in the thread you refer to are a solution.
- The one in testDataDam.gh using VB Script appears to trigger all data dams?
- The one using Metahopper appears to be more selective using its “Get objects in group” feature but it’s a little obscure. The connection is only “explicit” in the sense that Data Dam and ObjFromGroup (and only those two components?) must be in the same group, a condition that is easily broken by accident. Besides, installing Metahopper for this feature alone isn’t worth it to me.
It would be best if the trigger is an event rather than a condition (“an integer value from a file is equal to a specific value”). Events don’t really exist in GH while a condition could be true thousands of times.
And there is serious flaw with Data Dams, mentioned a few days ago by @ivelin.peychev in another thread: they leak and pass data once when a GH file is opened! Very bad.
You don’t need Python since Stream Gate does the same thing:
data_dam_2019Jul20a.gh (7.4 KB)
However… two things:
-
To replicate multiple inputs supported by Data Dam (like Merge, Entwine and similar components), you have to either use multiple ‘Stream Gates’ activated by the same toggle (best solution) or Entwine first and BANG! (Explode Tree) after a single Stream Gate.
data_dam_2019Jul20b.gh (14.9 KB) -
Gates are not data dams since they don’t retain their values after the trigger event. Adding a data dam after the gate doesn’t solve that problem either (I tried it). This is an important difference. Data Recorder after the gate is tempting but highly problematic.
Conclusion: Gates solve the dam leak problem (pun intended) but don’t offer the same functionality in terms of multiple streams and more importantly, data retention.