列一致ダイアログのスクリプト作成方法ユーザーが列のペアを一致させる必要があるダイアログがあります。 テーブルの結合で行うのとほとんど同じです。

特定の例 - 実験的に測定されたパラメータのセットと、それらの理論的予測のセットがあります。 このデータはさまざまなソースから取得されており、列の名前は任意に付けることができるため、ユーザーは各パラメーターについて理論と実験を一致させる必要があります。
この部分をスクリプト化する方法の例はありますか? そして、これらのペアをどのように保存し、後でどのように使用するのでしょうか?
これまでのところ、私はこれを持っており、一致したペア(上記の例のように)を反映するために緑の枠のボックスをスクリプト化する方法と、それらのペア(2つの項目リストのリスト?)を保持する方法、および削除/呼び出し方法に興味があります。彼らなど:

そして、これがスクリプトです:
dt = New Table( "Untitled 5",
Add Rows( 4 ),
Set Header Height( 46 ),
New Column( "X", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2, 3, 4] ) ),
New Column( "A_Theory", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 3, 2, 3] ) ),
New Column( "B_Measured", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [4, 5, 6, 5] ) ),
New Column( "A_Measured", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 4, 3, 4] ) ),
New Column( "B_Theory", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [4, 5, 3, 4] ) )
);
notImplemented = Expr(
win = New Window( "Feature Not Implemented Yet", <<MODAL></MODAL>
データのブレンディングとクリーンアップRe: 列一致ダイアログのスクリプト作成方法アプリケーションの動作方法によっては、ユーザーがリスト ボックスから値を削除したい場合があるため (現時点では不可能です)、ユーザーが実行 / OK ボタンを押すまでリストに値を追加しない方がよい場合があります。
この例に Run ボタンと runExpr を追加し (JMP16 がない場合は、Transform Each を For ループに変更して値をリストに追加できます)、ボタンを削除し、Match が押されたときに列リスト ボックスの選択をクリアします。
Names Default To Here(1);
matchedList = {};
dt = New Table("Untitled 5",
Add Rows(4),
Set Header Height(46),
New Column("X", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4])),
New Column("A_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([1, 3, 2, 3])),
New Column("B_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 6, 5])),
New Column("A_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([1, 4, 3, 4])),
New Column("B_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 3, 4]))
);
notImplemented = Expr(
a = (clb1 << get selected)[1];
b = (clb2 << get selected)[1];
clb1 << Clear selection;
clb2 << Clear selection;
lb << Append(a || "=" || b);
);
notImplemented2 = Expr(
lb << Remove Selected;
);
runExpr = Expr(
lb << get items;
lb_values = Transform Each({val}, lb << get items, Words(val, "="));
show(lb_values);
);
gui = Expr(
H List Box(
V List Box(
Panel Box("Theory",
clb1 = Col List Box(All, Nlines(5))
),
Panel Box("Experiment",
clb2 = Col List Box(All, Nlines(5))
)
),
Panel Box("Theory vs Experiment Matching",
H List Box(
Lineup box(N Col(1),
Button Box("Match", notImplemented),
Button Box("Remove", notImplemented2),
),
lb = List Box({}, Nlines(12))
)
),
Panel Box("Actions",
Button Box("Run",
runExpr;
)
)
)
);
fileLoad = New Window("Example", Show Menu(0), Show Toolbars(0), gui);
Re: 列一致ダイアログのスクリプト作成方法わかりました。次のように機能します。
notImplemented = Expr(
a = (clb1 << get selected)[1];
b = (clb2 << get selected)[1];
lb << Append(a || "=" || b);
matchedList[N Items( matchedList ) + 1] = Eval List ({a, b});
//Insert Into(matchedList, Eval List(columnPair));
Show(matchedList);
);Re: 列一致ダイアログのスクリプト作成方法もう一つ質問です。 スクリプトを次のように変更しました。
Names Default To Here(1);
matchedList = {};
dt = New Table("Untitled 5",
Add Rows(4),
Set Header Height(46),
New Column("X", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4])),
New Column("A_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([1, 3, 2, 3])),
New Column("B_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 6, 5])),
New Column("A_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([1, 4, 3, 4])),
New Column("B_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 3, 4]))
);
notImplemented = Expr(
a = (clb1 << get selected)[1];
b = (clb2 << get selected)[1];
lb << Append(a || "=" || b);
Insert Into(matchedList, {a, b});
Show(matchedList);
);
gui = Expr(
H List Box(
V List Box(
Panel Box("Theory",
clb1 = Col List Box(All, Nlines(5))
),
Panel Box("Experiment",
clb2 = Col List Box(All, Nlines(5))
)
),
Panel Box("Theory vs Experiment Matching",
H List Box(
Button Box("Match", notImplemented),
lb = List Box({}, Nlines(12))
)
)
)
);
fileLoad = New Window("Example", Show Menu(0), Show Toolbars(0), gui);そして私はこれを取得しています:
matchedList = {a, b, a, b};私はこれを期待していましたが、
matchedList = {{"A_Theory", "A_Measured"}, {"B_Theory", "B_Measured"}}または、ペアを反復処理できるように、これらの線に沿った何かをします。
私の何が間違っているのでしょうか?
Re: 列一致ダイアログのスクリプト作成方法それを試してみます。
そして、後でこれらの列を使用して何かを行う場合 (たとえば、各ペアに対して Y を X に当てはめてプロットする)、それらをリストのリストとして保持しても問題ありませんか?
columnPairs = {{A_Theory, A_Experiment}, {B_Theory, B_Experiment}};それからそれらを反復処理しますか、それともより良いオプションがありますか?
Re: 列一致ダイアログのスクリプト作成方法推測する必要があるのであれば、結合プラットフォームはリストボックスを使用し、列のペアを追加するときに新しい値を追加します。
Names Default To Here(1);
dt = New Table("Untitled 5",
Add Rows(4),
Set Header Height(46),
New Column("X", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4])),
New Column("A_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([1, 3, 2, 3])),
New Column("B_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 6, 5])),
New Column("A_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([1, 4, 3, 4])),
New Column("B_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 3, 4]))
);
notImplemented = Expr(
a = clb1 << get selected;
b = clb2 << get selected;
lb << Append(a[1] || "=" || b[1]);
);
gui = Expr(
H List Box(
V List Box(
Panel Box("Theory",
clb1 = Col List Box(All, Nlines(5))
),
Panel Box("Experiment",
clb2 = Col List Box(All, Nlines(5))
)
),
Panel Box("Theory vs Experiment Matching",
H List Box(
Button Box("Match", notImplemented),
lb = List Box({}, Nlines(12))
)
)
)
);
fileLoad = New Window("Example", Show Menu(0), Show Toolbars(0), gui);
//{col1, col2} = Words((lb << get items)[1], "=");

スクリプトをすぐにまとめたので、変数の場合よりも適切な名前を使用し、列リスト ボックスで複数の値を選択できないようにし、列インデックスのハードコードされた制限を削除しました。 取得できる値が必要な場合は、<< get items を使用してリスト ボックス参照を実行すると、項目のリストが得られます。 次に、Words() を使用して、それをさらに複数の部分に分割します。