以下のスクリプトはウィンドウを作成します。ユーザーはこのウィンドウを使用して、車両の特定の各マップシェイプを保持する特定の列を選択します。そこから、各列に表示されているデータポイントのみを選択して新しいデータテーブル(dt1、dt2、dt3)を作成するようにスクリプトが設定されます。私が抱えている問題は、dtの最初のウィンドウで選択した列をdt1の参照として使用して、その列をグラフ化したいということです。リンクされたデータテーブルのウィンドウ選択列を参照する方法を誰かが知っていますか?
dt = Current Data Table();
If( Is Empty( dt ),
Try( dt = Open(), Throw( "No data table found" ) )
);
nc = N Col( dt );
lbWidth = 200;
custdial = New Window( "Type C Report",
H List Box(
H List Box(
Panel Box( "Select Columns", colListData = Col List Box( All, width( lbWidth ), nLines( Min( nc, 10 ) ) ) ),
V List Box(
Panel Box( "Left Side of Vehicle Column",
Lineup Box( N Col( 2 ), Spacing( 3 ),
Button Box( "Left", colListL << Append( colListData << GetSelected ) ),
colListL = Col List Box( width( lbWidth ), minitems( 1 ), maxitems( 1 ), nLines( 1 ) )
)
),
Panel Box( "Right Side of Vehicle Column",
Lineup Box( N Col( 2 ), Spacing( 3 ),
Button Box( "Right", colListR << Append( colListData << GetSelected ) ),
colListR = Col List Box( width( lbWidth ), minitems( 1 ), maxitems( 1 ), nLines( 1 ) )
)
),
Panel Box( "Top of Vehicle Column",
Lineup Box( N Col( 2 ), Spacing( 3 ),
Button Box( "Top", colListT << Append( colListData << GetSelected ) ),
colListT = Col List Box( width( lbWidth ), minitems( 1 ), maxitems( 1 ), nLines( 1 ) )
)
)
),
),
Panel Box( "Action",
Lineup Box( N Col( 1 ),
Button Box( "OK", OKScript ),
Button Box( "Cancel",
custdial << CloseWindow;
Throw();
),
)
) // End of HListBox
) //end vlist box
);
OKScript = Expr(
custdial << CloseWindow;
<BR />//get the columm list
a = colListX;
dt = Current Data Table();
dt << Clear Row States;
dt << Select Where( :Measurement Location == "Top" );
dt1 = dt << Data View;
dt1 << Set Name( "Vehicle Top" );
r = dt1 << Select Where( :ED Pass Rate == "5. Point Not Measured" );
r << Hide and Exclude;<BR /><BR />//this line is where the code has a problem
graph1 = dt1 << Graph Builder(
Size( 873, 719 ),
Show Legend( 0 ),
Legend Position( "Bottom" ),
Variables( Color( :ED Pass Rate ), Shape( :Name( "a" ) ) ),
Elements( Map Shapes( Legend( 2 ), Show Missing Shapes( 1 ), Aspect Ratio( 1.02565192625141 ) ) ),
SendToReport(
Dispatch( {}, "", ScaleBox, {Label Row( Show Major Labels( 0 ) )} ),
Dispatch(
{},
"",
ScaleBox( 2 ),
{Min( 10.4984925982116 ), Max( 89.7351316066539 ), Inc( 10 ), Minor Ticks( 0 ), Label Row( Show Major Labels( 0 ) )}
),
Dispatch( {}, "graph title", TextEditBox, {Hide( 1 )} ),
Dispatch( {}, "Y title", TextEditBox, {Hide( 1 )} )
)
);
TopEDV = Report( graph1 )[Picture Box( 1 )];
TopEDV << save picture(
"S:\Material Quality\_Chemicals\Quality Assurance\Paint Film Build\Film Build Data Requests\04 Type C Audit\Working File\Top ED Vehicle.jpeg",
jpeg
);
);
@ alexhemmert1 :
私が質問を完全に理解したかどうかわからないが、多分あなたはこれを試すことができますか?
dt = Current Data Table() ;
SelCol = dt << Get Selected Columns();
SelColはあなたが使うことができるdtであなたが選択した列の列の名前を持つでしょう。
注:赤で強調表示されているテキストはありません - したがって、コードのどの部分が問題になっているのか正確にはわかりません。
ベスト
あの日