操作表格時遇到問題我不太明白為什麼我在操作從表格報告創建的表中的列時遇到問題。 我附上了表格和腳本供您參考。 我正在嘗試創建一個與我們當前的報告表相匹配的表。
總是,感謝您的幫助
Names Default To Here(1);
dt = Current Data Table();
LotListSQLString = "Wafer_1";
tab = dt
<< Tabulate(
invisible,
Show Control Panel( 0 ),
Add Table(
Column Table(
Category Table,
Statistics(
N,
Name( "% of Total" )
)
),
Row Table(
Columns by Categories(
:Name( "test" ),
:Name( "[Rx] test1" ),
:Name( "[Rx] test2" ),
:Name( "[Rx] test3" ),
:Name( "[Tx] test1" ),
:Name( "[Tx] test2" ),
:Name( "[Tx] test3" ),
:Name( "test4" ),
:Name( "Composite" )
)
)
)
);
dtFinal = tab << Make Into Data Table;
Wait( 1 );
dtFinal << set name( " Yield Report" );
dtFinal = New Column( "Mode",
<< Formula(
If( (:Columns by Categories == "test" ), "-",
IF( :Columns by Categories == "[Rx] test1", "Rx",
IF( :Columns by Categories == "[Rx] test2", "Rx",
IF( :Columns by Categories == "[Rx] test3", "Rx",
IF( :Columns by Categories == "[Tx] test1", "Tx",
IF( :Columns by Categories == "[Tx] test2", "Tx",
IF( :Columns by Categories == "[Tx] test3", "Tx",
If( :Columns by Categories == "test4", "-"
)
)
)
)
)
)
)
)
)
);
Wait( 0 );
dtFinal = New Column( "TestName",
<< Formula(
If( (:Columns by Categories == "test" ), "test",
IF( :Columns by Categories == "[Rx] test1", "test1",
IF( :Columns by Categories == "[Rx] test2", "test2",
IF( :Columns by Categories == "[Rx] test3", "test3",
IF( :Columns by Categories == "[Tx] test1", "test1",
IF( :Columns by Categories == "[Tx] test2", "test2",
IF( :Columns by Categories == "[Tx] test3", "test3",
If( :Columns by Categories == "test4", "test4"
)
)
)
)
)
)
)
)
)
);
// ------------------------ BEGIN FORMATING TABLE FOR FINAL REPORTING
// Says Scriptable[] but won't delete
dtFinal << Delete Columns( {"N(Fail)", "% of Total(Fail)"} );
// Works Correctly
dtFinal = New Column( "wafer_number",
<< Formula(
LotListSQLString
)
);
// Says Scriptable[] but won't go to column and obviously doesn't move
dtFinal << Go To( "wafer_number" );
Wait ( 0.5 );
dtFinal << move selected Columns( To First );
dtFinal << clear Column selection;
// Works Correctly
dtFinal = Column( "Mode" ) << Delete Formula;
dtFinal = Column( "TestName" ) << Delete Formula;
// Says Scriptable[] but won't go to column and obviously doesn't move
dtFinal << Go To( :Mode );
Wait ( 1 );
dtFinal << move selected Columns( after( "wafer_number" ) );
dtFinal << Clear Column Selection;
// Says Scriptable[] but won't go to delete
dtFinal << Delete Columns( :Columns by Categories);
// Says Scriptable[] but won't go to delete
dtFinal << go to( :TestName );
Wait( 1 );
dtFinal << Move Selected Column( after( "name" ) );
dtFinal << clear Column selection;
// Works Correctly
lot = "XYZ";
part = New Column( "part_number" );
part << Set Formula( lot );
// Says Scriptable[] but won't go to column and obviously doesn't move
dtFinal << go to( :part_number );
Wait ( 1 );
dtFinal << Move Selected Column( after( "name" ) );
dtFinal << clear Column selection;
// Works Correctly
die = 334;
numdie = New Column( "NumDie" );
numdie << Set Formula( die );
// Says Scriptable[] but won't go to column and obviously doesn't move
dtFinal<< go to( :NumDie );
Wait ( 1 );
dtFinalYield<< move selected Columns( after( "part_number" ) );
dtFinalYield<< clear Column selection;
回复:操作表格時出現問題只是獲取語法就讓我喪命了.. 謝謝你指出這一點.. 由於我仍在學習如何使用 JSL 進行編碼,因此我肯定擁有這些表格、腳本指南和腳本索引,都可以用來搜索如何做事情。 我錯過了=到<<..回复:操作表格時出現問題dtFinalYield 應該只是 dtFinal.. 當我將腳本附加到該論壇時,我必須重命名所有內容,但我錯過了那個.. 我很抱歉。
我看到“=”符號而不是“<<”的問題,我不知道為什麼我要這樣做。回复:操作表格時出現問題下面是我對你的腳本的評論......問題似乎不理解何時使用“=”和何時使用“<<”之間的區別,而且你似乎更小心,這有時與不完全理解 JSL。所以我強烈建議您閱讀腳本指南!
幫助==>書籍==>腳本指南
這是我帶註釋的腳本
Names Default To Here(1);
dt = Current Data Table();
LotListSQLString = "Wafer_1";
tab = dt
<< Tabulate(
invisible,
Show Control Panel( 0 ),
Add Table(
Column Table(
Category Table,
Statistics(
N,
Name( "% of Total" )
)
),
Row Table(
Columns by Categories(
:Name( "test" ),
:Name( "[Rx] test1" ),
:Name( "[Rx] test2" ),
:Name( "[Rx] test3" ),
:Name( "[Tx] test1" ),
:Name( "[Tx] test2" ),
:Name( "[Tx] test3" ),
:Name( "test4" ),
:Name( "Composite" )
)
)
)
);
dtFinal = tab << Make Into Data Table;
Wait( 1 );
dtFinal << set name( " Yield Report" );
// changed from
// dtFinal = New Column( "Mode",
// to
dtFinal << New Column( "Mode", character,
// More efficient way to code the If()
Formula(
If(
:Columns by Categories == "test", "-",
:Columns by Categories == "[Rx] test1", "Rx",
:Columns by Categories == "[Rx] test2", "Rx",
:Columns by Categories == "[Rx] test3", "Rx",
:Columns by Categories == "[Tx] test1", "Tx",
:Columns by Categories == "[Tx] test2", "Tx",
:Columns by Categories == "[Tx] test3", "Tx",
:Columns by Categories == "test4", "-"
)
)
);
Wait( 0 );
// changed from
// dtFinal = New Column( "TestName",
// to
dtFinal << New Column( "TestName", character,
// More efficient way to code the If()
Formula(
If(
:Columns by Categories == "test", "test",
:Columns by Categories == "[Rx] test1", "test1",
:Columns by Categories == "[Rx] test2", "test2",
:Columns by Categories == "[Rx] test3", "test3",
:Columns by Categories == "[Tx] test1", "test1",
:Columns by Categories == "[Tx] test2", "test2",
:Columns by Categories == "[Tx] test3", "test3",
If( :Columns by Categories == "test4",
"test4"
)
)
)
);
// ------------------------ BEGIN FORMATING TABLE FOR FINAL REPORTING
// Says Scriptable[] but won't delete
// You had not used the proper syntax in the above step, so that dtFinal
// was changed from a data table pointer to pointer to column "TestName"
dtFinal << Delete Columns( {"N(Fail)", "% of Total(Fail)"} );
// Works Correctly
// changed from
// dtFinal = New Column( "wafer_number",
// to
dtFinal << New Column( "wafer_number", character,
<< Formula(
LotListSQLString
)
);
// Says Scriptable[] but won't go to column and obviously doesn't move
dtFinal << Go To( "wafer_number" );
Wait ( 0.5 );
dtFinal << move selected Columns( To First );
dtFinal << clear Column selection;
// Works Correctly
// Changed from
// dtFinal = Column( "Mode" ) << Delete Formula;
// to
dtFinal:Mode << Delete Formula;
// Changed from
// dtFinal = Column( "TestName" ) << Delete Formula;
// to
dtFinal:TestName << Delete Formula;
// Says Scriptable[] but won't go to column and obviously doesn't move
// With keeping dtFinal as a pointer to the data table this now works
dtFinal << Go To( :Mode );
// Wait ( 1 ); // not necessary wait
dtFinal << move selected Columns( after( "wafer_number" ) );
dtFinal << Clear Column Selection;
// Says Scriptable[] but won't go to delete
// With keeping dtFinal as a pointer to the data table this now works
dtFinal << Delete Columns( :Columns by Categories);
// Says Scriptable[] but won't go to delete
dtFinal << go to( :TestName );
//Wait( 1 );
// changed from
// dtFinal << Move Selected Column( after( "name" ) );
// to
dtFinal << Move Selected Column( after( :name("N(Pass)" ) ) );
dtFinal << clear Column selection;
// Works Correctly
// This form will not work, once you save the table and reopen it
// because the formula requires a variable named Lot
//lot = "XYZ";
//part = New Column( "part_number" );
//part << Set Formula( lot );
// here is a form that will work
dtFinal << New Column( "part_number", character, set each value("XYZ" ) );
// Says Scriptable[] but won't go to column and obviously doesn't move
dtFinal << go to( :part_number );
//Wait ( 1 );
// There is not a column named "name", therefore
// changed
// dtFinal << Move Selected Column( after( "name" ) );
// to
dtFinal << Move Selected Column( after( :name("N(Pass)" ) ) );
dtFinal << clear Column selection;
// Works Correctly
// This form will not work, once you save the table and reopen it
// because the formula requires a variable named die
//die = 334;
//numdie = New Column( "NumDie" );
//numdie << Set Formula( die );
dtFinal << New Column( "NumDie", set each value(334) );
// Says Scriptable[] but won't go to column and obviously doesn't move
dtFinal<< go to( :NumDie );
//Wait ( 1 );
// There is no pointer called dtFinalYield
// changed from
// dtFinalYield<< move selected Columns( after( "part_number" ) );
// dtFinalYield<< clear Column selection;
// to
dtFinal << move selected Columns( after( "part_number" ) );
dtFinal << clear Column selection;
回复:操作表格時出現問題錯誤的語法造成了多次名稱衝突:
dtFinal = tab << Make Into Data Table;
Wait( 1 );
dtFinal << set name( " Yield Report" );
dtFinal = New Column( "Mode",
正如您的腳本所期望的那樣,dtFinal 是表引用,但語法 dtFinal = New Column() 正在將新列分配給引用 dtFinal。語法應該是 dtFinal << New Column( ) 也在您引用 dtFinalyield 的腳本末尾,沒有這樣的表。
您還應該查找 JMP If() 函數的語法。 您不需要嵌套 ifs:
if (cond1, result1, cond2, result2, ...condk, 結果 k, else);
回复:操作表格時出現問題我用你的數據運行你的腳本沒有問題......
創建了表格報告和相關表格....並且還可以修改此類表格....
你能更好地解釋一下你遇到了什麼麻煩嗎
再見
詹保羅