スクリプト実行中のエラー - Send は、 'Send' のアクセスまたは評価でスクリプト可能オブジェクトを期待しています、 dt << /*###*/get columns names( string,Continuous ) /*###*/以前に貢献者の 1 人から共有されたスクリプトを変更して、ユーザーがどのデータ ファイル (.jmp) を開くかを選択できるようにしました。
Names Default To Here( 1 );
// Open a dialog to choose a .jmp file to open
// Get the filename of the .jmp file to open
dt = Pick File("Select a .jmp file to open", "", {"JMP Files|jmp;jsl;jrn", "All Files|*"}, 1, 0, "");
// If the user did not select a file, exit the script
If( Is Missing( dt ),
Throw(),
// Else Open the selected file
Open( dt )
);
// Get all of the numeric column's names
colNameList = dt << get column names( string, continuous );
// Take the data from rows 1 & 2 and create the Spec Limits column property
For Each( {col}, colNameList,
Eval(
Substitute(
Expr(
Column( dt, col ) << set property(
"Spec Limits",
{LSL( _LSL_ ), USL( _USL_ ), Show Limits( 1 )}
)
),
Expr( _LSL_ ), As Column( dt, col )[1],
Expr( _USL_ ), As Column( dt, col )[2]
)
)
);
// Exclude and Hide row 1 & 2 to eliminate them from Distributions
dt << Select rows( {1,2} );
dt << hide and exclude;
// Run the Distribution Platform
dt << Distribution( column( eval(colNameList) ));スクリプトを実行すると、次のエラーが発生しました。
Send は、 'Send' のアクセスまたは評価でスクリプト可能オブジェクトを期待します、 dt << /*###*/列名を取得(文字列、連続) /*###*/
dt << get columns names? に問題があるようです。
処理したいデータファイルのコピーも添付しました。データの 1 行目と 2 行目はそれぞれ LSL と USL ですが、データの一部として含めたくないです。しかし、むしろ、分布グラフに LSL 線と USL 線をプロットするために使用されます。
コミュニティからのご協力に感謝いたします。ありがとう!
自動化とスクリプト作成Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/こんにちは、ジムさん
この旅を通して私を導いてくださって本当にありがとうございました!
Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/はい、行う必要があるのは、出力をループして各軸を調整することだけです。以下を参照してください
names default to here(1);
// Get the filename of the .jmp file to open
dt = Pick File("Select a .jmp file to open", "", {"JMP Files|jmp;jsl;jrn", "All Files|*"}, 1, 0, "");
// If the user did not select a file, exit the script
If( Is Missing( dt ),
Throw(),
// Else Open the selected file
dt = Open( dt )
);
// Get all of the numeric column's names
colNameList = dt << get column names( string, continuous );
// Take the data from rows 1 & 2 and create the Spec Limits column property
For Each( {col}, colNameList,
Eval(
Substitute(
Expr(
Column( dt, col ) << set property(
"Spec Limits",
{LSL( _LSL_ ), USL( _USL_ ), Show Limits( 1 )}
)
),
Expr( _LSL_ ), As Column( dt, col )[1],
Expr( _USL_ ), As Column( dt, col )[2]
)
)
);
// Exclude and Hide row 1 & 2 to eliminate them from Distributions
dt << Select rows( {1,2} );
dt << hide and exclude(1);
// Run the Distribution Platform
dist = dt << Distribution( column( eval(colNameList) ));
// Loop across the output and addjust the axes
rdist = dist << report;
For Each( {col, i}, colNameList,
offset = (Column( col )[2] - Column( col )[1]) * .1;
myMin = Column( col )[1] - offset;
myMax = Column( col )[2] + offset;
// Adjust Min and Max Y-axis
rdist[axis box( i )] << Min( myMin ) << Max( myMax );
);Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/軸の設定がすべての分布図に適用されるように、ある種のループが必要になるように思えますか?
Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/スクリプトを次のように変更することで、少し進歩しました。
// Get the filename of the .jmp file to open
dt = Pick File("Select a .jmp file to open", "", {"JMP Files|jmp;jsl;jrn", "All Files|*"}, 1, 0, "");
// If the user did not select a file, exit the script
If( Is Missing( dt ),
Throw(),
// Else Open the selected file
dt = Open( dt )
);
// Get all of the numeric column's names
colNameList = dt << get column names( string, continuous );
// Take the data from rows 1 & 2 and create the Spec Limits column property
For Each( {col}, colNameList,
Eval(
Substitute(
Expr(
Column( dt, col ) << set property(
"Spec Limits",
{LSL( _LSL_ ), USL( _USL_ ), Show Limits( 1 )}
)
),
Expr( _LSL_ ), As Column( dt, col )[1],
Expr( _USL_ ), As Column( dt, col )[2]
)
)
);
// Exclude and Hide row 1 & 2 to eliminate them from Distributions
dt << Select rows( {1,2} );
dt << hide and exclude;
// Adjust Min and Max Y-axis
//dist = dt << Set Axis(
// Min( -10 ),
// Max( 10 )
//);
// Run the Distribution Platform
dist = dt << Distribution( column( eval(colNameList) ));
// Adjust Min and Max Y-axis
rdist = dist << report;
axisbox = rdist[axis box( 1 )];
axisbox << Min( 0 );この変更により、最初の分布図の最小値を「0」に変更することができましたが、残りの変更は変更されませんでした。すべてのチャートに最小設定を適用できるようにコードをどのように変更すればよいか教えていただけますか?
Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/軸の最大値を設定するための構文は次のとおりです。
dist = dt << Set Axis(
Min( -10 ),
Max( 10 )
);
AxisBox() の設定を変更するためのスクリプト インデックスを以下に示します。

JSL の例は、使用する正しい構文を示しています。
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :weight ), X( :height ), FitLine );
rbiv = biv << report;
axisbox = rbiv[axis box( 1 )];
axisbox << Max( 120 );
ここでは、サンプル構文を少し変更しています。軸の設定は、スクリプトで使用するように指定したものと同様の、ヒストグラム プロット用です。
// Run the Distribution Platform
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist = dt << Distribution( column( :weight ));
rdist = dist << report;
axisbox = rdist[axis box( 1 )];
axisbox << Max( 200 ) << Min( 50 );
表示出力の操作の詳細については、スクリプト ガイドの表示ツリーに関するセクションを参照してください。
Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/分布グラフを取得して Y 軸の最大値と最小値を変更できるかどうかを確認するために、次の行を追加しました。
// Adjust Min and Max Y-axis
dist = dt << Set Axis(
Min( -10 ),
Max( 10 )
);
効果はないようです。私のやり方が間違っているのでしょうか?
完全なスクリプト:
// Get the filename of the .jmp file to open
dt = Pick File("Select a .jmp file to open", "", {"JMP Files|jmp;jsl;jrn", "All Files|*"}, 1, 0, "");
// If the user did not select a file, exit the script
If( Is Missing( dt ),
Throw(),
// Else Open the selected file
dt = Open( dt )
);
// Get all of the numeric column's names
colNameList = dt << get column names( string, continuous );
// Take the data from rows 1 & 2 and create the Spec Limits column property
For Each( {col}, colNameList,
Eval(
Substitute(
Expr(
Column( dt, col ) << set property(
"Spec Limits",
{LSL( _LSL_ ), USL( _USL_ ), Show Limits( 1 )}
)
),
Expr( _LSL_ ), As Column( dt, col )[1],
Expr( _USL_ ), As Column( dt, col )[2]
)
)
);
// Exclude and Hide row 1 & 2 to eliminate them from Distributions
dt << Select rows( {1,2} );
dt << hide and exclude;
// Adjust Min and Max Y-axis
dist = dt << Set Axis(
Min( -10 ),
Max( 10 )
);
// Run the Distribution Platform
dist = dt << Distribution( column( eval(colNameList) ));Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/簡単にできます。 Scripting Index を参照して、AxisBox オブジェクトで使用できるメッセージを確認してください。最小値と最大値を設定できます。 JSL を説明する例が索引にあります。
Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/スクリプトに Show( ) 関数を組み込むと、JMP はすべてのデータ ポイントと LSL と USL を考慮して軸の最大値と最小値を調整するとおっしゃっていました。
しかし、スクリプトを使用して最大値と最小値を手動で (前述の数式を使用して) 定義したい場合、それは実行可能でしょうか?
Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/仕様制限列プロパティを設定し、Show(1) 要素を指定すると、デフォルトで、JMP は各グラフの軸の値を変更して、すべてのデータ ポイントと指定されたすべての仕様制限を含めます。

Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/わかりやすい説明をありがとうございます。 dt が元々パス名とファイル名を取得していたため、列名を取得しようとしたときに使用できなくなった、という意味は理解できました。したがって、次のことを実行する必要があります。
dt = Open( dt )
これにより、適切な処理のためにファイルから適切なデータがデータ テーブルにロードされます。
また、スクリプトで各グラフの Y 軸の個別の最大値と最小値を調整したい場合は、どうすればよいですか?
USL と LSL の間の絶対範囲を見つけて、最大 Y を USL + 0.1 * 範囲、最小 Y を LSL-0.1 * 範囲に設定したいと考えています。目的は、分布グラフの一貫したプレゼンテーションを行うことです。
Re: スクリプト実行中のエラー - Send Expects Scriptable Objects in access or ratings of 'Send' , dt << /*###*/get columns names( string,Continuous ) /*###*/変数「dt」が問題です。これは、ピックの結果として Pick File() で使用されています。したがって、次のように、開きたいファイルのパスと名前の値が含まれます。
「C:\ドキュメント\myfile.jmp」
これは Open() 関数に非常に適しています。
Open( dt )
Open() 関数にはパスとファイル名が必要であるためです。
ただし、データテーブルを開いた後、列名を取得する()メッセージのオブジェクトとして「dt」が使用されます。
colNameList = dt << get column names( string, continuous );
get column names() メッセージは、パスやファイル名ではなく、データ テーブルに適用する必要があります。
Open() 関数呼び出しを次のように変更すると、JSL が実行されます。
dt = Open( dt )
変数は値を受け取るように変更されます
Data Table( "データテーブルの名前" )
これは、JSL の残りの部分に必要なフォームになります。