Support Board
Date/Time: Mon, 03 Feb 2025 10:57:11 +0000
Post From: Accessing a subgraph value at an index
[2019-11-06 17:21:52] |
ForgivingComputers.com - Posts: 994 |
This is not technically correct, 'SC_OPEN' is declared in scconstants.h as a const int with a value of 0.
The following declarations amount to the same thing: SCSubgraphRef BarOpen = sc.Subgraph[0] SCSubgraphRef BarOpen = sc.Subgraph[SC_OPEN] Yes, you are right, I did not know that. But why bother? What value does using those constants add? How does that prevent you from using another Subgraph[0] by mistake? I have never seen anyone declare SubgraphRefs using constants this way. From a support standpoint, I want all my subgraphs numbered sequentially, so I can easily scan the list to ensure the next one I create has not already been used. I do the same thing with SCInputRefs and persistent variables. Using SC_OPEN instead of 0 does not assign the value of the bar's open to the subgraph, which I assumed, perhaps incorrectly, was what the original poster wanted to do. |