/** ** Functions for adding or removing variables into an existing GraphBuilder. ** //This could be done two ways. Findvarbyrole uses the graph builder element. You could have done findVarbyVarname to get the varnameês role. ** Developers include Geoff Mann, Drew Foglia and Kelci Miclaus (maybe Xan or Joseph??) **/ //from KJ DomainDistribution (modified by GM) findVarByRole = Function({varlist, rolename}, {i}, for (i = 1, i <= n items(varlist), i++, if (varlist[i]["Role"] == rolename, Return(i)); ); 0; // not found ); //from KJ DomainDistribution (modified by GM) GetGBVariableIndexByRole = Function({_gb, varRole}, _gbr1 = report(_gb)[Graph Builder Box(1)]; gbVars = _gbr1<