안녕 모두
XPATH 기능에 대한 몇 가지 논의를 검토하고 JMP를 사용한 JSL 도움말이 아래 스크립트와 함께 나왔습니다.
가변성 차트에서 데스크탑 폴더까지 그래프를 PNG 파일로 처리하기 위해이 스크립트를 공유하고 싶습니다.
이것은 곱셈 그래프로 보고서를 작성할 때 정말 도움이됩니다.
이것이 다른 플랫폼에서 작동하기위한 주요하고 중요한 매개 변수는 "xpath"함수와 아웃 라인 박스 함수에서 대응하는 f (i) 함수를 나누는 데 사용되는 숫자입니다.
이 경우 xpath 분배기는 = 2입니다.
f (i) = 2 * i-1.
//-------------------------
Clear Log();
Names Default To Here( 1 );
while( 1,
If( Is Directory( "$DESKTOP/Graph" ) == 0,
//if no directory -> create folder and display Message
rc = Create Directory( "$DESKTOP/Graph" );
//copy graphs
for( i = 1, i <= N Items( Current Report() << XPath( "//OutlineBox" ) ) / 2, i++,
Current Report()[Outline Box( 2 * i - 1 )] << Save Picture(
"$DESKTOP/Graph/Graph" || Char( i ) || ".PNG", "PNG"
);
Wait( 0.001 );
);
//display Message
New Window( "Message",
modal,
H List Box(
Spacer Box( size( 5, 0 ) ),
Text Box( "All graphs are saved at new folder at Desktop/Graph" )
)
);
//if there is directory -> check if empty if no break if yes continue
,
if( N Items( Files In Directory( "$DESKTOP/Graph" ) ) > 0,
New Window( "Message",
modal,
H List Box( Spacer Box( size( 5, 0 ) ), Text Box( "Please empty folder DESKTOP/Graph" ) )
);
Break();
,
//copy graphs
for( i = 1, i <= N Items( Current Report() << XPath( "//OutlineBox" ) ) / 2, i++,
Current Report()[Outline Box( 2 * i - 1 )] << Save Picture(
"$DESKTOP/Graph/Graph" || Char( i ) || ".PNG", "PNG"
);
Wait( 0.001 );
);
//display Message
New Window( "Message",
modal,
H List Box(
Spacer Box( size( 5, 0 ) ),
Text Box( "All graphs are saved at new folder at Desktop/Graph" )
)
);
)
);
Break();
);
//-------------------------