我正在尝试构建一个 UI,要求用户从列表中选择“产品”,然后创建每个产品的图表,并根据是否选中复选框将“材料”添加到图表标题。
到目前为止,我有我的 UI 窗口,但我不知道如何将它连接到我的图形脚本。 我认为像 If 语句之类的东西可能是关键,但我可能错了。
Names Default To Here( 1 );
dt = Data Table( "untitled 16" );
values = dt:Product << Get Values;
array = Associative Array( values );
ProductList = array << Get Keys;
Final Products = {};
// Prompt for the input and create graph
FP = New Window( "Choose the Final Products",
<<MODAL> 0,
For( i = 1, i <= nt, i++,
If(
Final_Products[i] == 1,
// Call function for One step
Print( {1} ); // I tried "1" , but I'm missing something here. I am guessing I can insert the graph function here rather than print, but I was using print to check my work.
,
Final_Products[i] == 2,
// Call function for Two step
Print( 2 ); // I tried "2" , but I'm missing something here
);
);
);
FP << Close Window;</MODAL>