리콜 버튼이 질문을 원래 스레드에 게시했지만 제대로 강조 표시되지 않았을 수 있으므로 새로운 게시물로 시도해 보겠습니다.
이 링크의 코드는 매우 유용해 보입니다.
사용자 정의 창에 Recall 버튼을 만드는 방법 - JMP User Community
그러나 리콜 기능을 적절하게 활용하는 방법은 분명하지 않습니다.
나는 리콜이 부족한 일부 코드(아래)를 빌려서 수정했으며 이를 함께 용접하는 방법을 알아내려고 노력했습니다. 가까워졌지만 평소처럼 뭔가 빠졌어요. 모든 도움을 주셔서 감사합니다.
dt = Current Data Table();
cd = Column Dialog(
exy = ColList( "Y", Min Col( 1 ) ),
exx = ColList( "X", Min Col( 1 ) )
);
Eval( cd[1] );
Eval( cd[2] );
yyy = Expr( y() );
xxx = Expr( x() );
xval = exx[1];
For( i = 1, i <= N Items( exy ), i++,
Insert Into( yyy, exy[i] )
);
For( i = 1, i <= N Items( exx ), i++,
Insert Into( xxx, exx[i] )
);
nw = New Window( "Annotated Multiple Plots",
For( i = 1, i <= N Items( exy ), i++,
Notes = exy[i] << Get Property( "Notes" );
Try(
Bivariate(
Y( exy[i] ),
X( exx[1] ),
SendToReport(
Dispatch(
{},
"",
AxisBox( 2 ),
Add Text Annotation(
Text( "Category: " || Notes ),
Fixed Size( 0 ),
Text Box( {-80, 25, 0, 50} ),
Filled( 0 )
)
)
)
)
);
)
);
감사해요
안녕
스패너헤드
자동화 및 스크립팅답: 리콜 버튼안녕,
다음은 사용자 정의 창에서 호출 버튼을 만드는 방법에서 참조된 스크립트와 스크립트를 간단하게 결합한 것입니다. 우선 제공된 예제에서는 Column Dialog()를 사용하고 Recall 예제에서는 사용자 대화 상자에 새 창을 사용합니다. JMP는 새 창을 선호하여 열 대화 상자를 평가절하했습니다. 당신이 해야 할 일은 스크립트를 연구하고 그것이 어떻게 작동하는지 배우는 것입니다. 그것은 어느 정도 이해가 필요한 몇 가지 항목을 가져옵니다. NameSpaces가 주요한 것입니다.
Names Default To Here( 1 );
/* Assign dt to reference a table. Open a sample table for demonstration purposes */
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
/* Use a named namespace to hold the recall values */
If( !Namespace Exists( "Custom Dialog" ), // define namespace if it does not exist
dialogRecallNS = New Namespace(
"Custom Dialog",
{
ycolRecall =
{
}
,
orderRecall =
{
}
,
byRecall =
{
}
}
)
, // else get a reference to the existing namespace
dialogRecallNS = Namespace( "Custom Dialog" )
);
nc = N Col( dt );
lbWidth = 130;
// The program to execute when the OK button is pressed
pgm = Expr(
nw = New Window( "Annotated Multiple Plots",
For( i = 1, i <= N Items( exy ), i++,
Notes = Try( exy[i] << Get Property( "Notes" ) );
Try(
Bivariate(
Y( exy[i] ),
X( exx[1] ),
SendToReport(
Dispatch( {}, "", AxisBox( 2 ),
Add Text Annotation(
Text( "Category: " || Notes ),
Fixed Size( 0 ),
Text Box( {-80, 25, 0, 50} ),
Filled( 0 )
)
)
)
)
);
)
)
);
/* Expression to clear all current settings */
clearRoles = Expr(
colListY << RemoveAll;
colListX << RemoveAll;
);
/* Expression to store the current settings in global variables */
recallRoles = Expr(
dialogRecallNS:ycolRecall = colListY << GetItems;
dialogRecallNS:orderRecall = colListX << GetItems;
);
/* Custom Launch Window */
customDlg = New Window( "Example of a Custom Dialog",
Border Box( Left( 3 ), top( 2 ),
V List Box(
Text Box( "Example dialog to demonstrate a Recall button" ),
H List Box(
V List Box(
Panel Box( "Select Columns",
colListData = Col List Box( All, width( lbWidth ), nLines( Min( nc, 10 ) ) )
)
),
Panel Box( "Cast Selected Columns into Roles",
Lineup Box( N Col( 2 ), Spacing( 3 ),
Button Box( "Y", colListY << Append( colListData << GetSelected ) ),
colListY = Col List Box( width( lbWidth ), nmin( 1 ), nLines( 5 ), numeric ),
Button Box( "X", colListX << Append( colListData << GetSelected ) ),
colListX = Col List Box( width( lbWidth ), nLines( 1 ), numeric )
)
),
Panel Box( "Action",
Lineup Box( N Col( 1 ),
Button Box( "OK",
recallRoles;
exy = colListY << get items;
exx = colListX << get items;
pgm;
customDlg << CloseWindow;
),
Button Box( "Cancel", customDlg << CloseWindow ),
Button Box( "Reset", clearRoles ),
Text Box( " " ),
Button Box( "Remove",
colListY << RemoveSelected;
colListX << RemoveSelected;
),
Button Box( "Recall",
clearRoles;
/* Restore any previous settings from the namespace variables */
Try(
colListY << Append( dialogRecallNS:ycolRecall );
colListX << Append( dialogRecallNS:orderRecall );
);
)
)
)
)
)
)
);
colListx << set min items( 1 );
colListy << set min items( 1 );
제공된 JSL에서 예제에 대해 아무 작업도 수행하지 않는 것처럼 보이는 여러 줄의 코드를 제거했습니다.
Re: 리콜 버튼Jim이 제공한 스크립트에서 영감을 얻은 다음 Recall Function Library를 여기에 적용할 수 있습니다. 이는 JSL에 대한 다양한 내용을 학습하는 매우 좋은 방법일 가능성이 높습니다(다른 패키지를 사용하도록 기존 작업 솔루션 수정). 저는 개인적으로 리콜 라이브러리가 작동하는 방식이 마음에 들지 않아서 사용하지 않았지만(나만의 라이브러리를 제작 중입니다), 제가 아는 바로는 현재 모든 것을 직접 작성하지 않고도 리콜을 구현하는 가장 좋은 방법입니다.
답: 리콜 버튼이것은 매우 가깝고 설명된 대로 작동합니다. 그러나 전체 목적은 노트의 정보를 기반으로 그래프에 주석을 지정하고 어떻게든 이 개정에서 중단되도록 하는 방법을 갖는 것이었습니다.
주석이 누락된 것으로 나타나고 메모 자체에는 아무것도 포함되어 있지 않습니다.
Notes = Try(exy[i] << Get Property( "Notes" ));
Show(Notes);
왜 그런 것인지 단서가 있나요?
감사해요
안녕
스패너헤드
답: 리콜 버튼바꿔보세요
Notes = Try(exy[i] << Get Property("Notes"));
에게
Notes = Try(Column(dt, exy[i]) << Get Property("Notes"));
<< Col List Box의 항목 가져오기는 문자열 목록을 반환하므로
답: 리콜 버튼그 작품들을 결합하는 것이 딱 맞습니다.
감사해요
안녕
스패너헤드