안녕하세요 여러분,
저는 스크립팅을 배우기 시작했고 6개의 산점도(수직 2개 + 수평 3개)로 창을 만들려고 합니다.
이중 for 루프를 시도했지만 작동하지 않는 이유를 모르겠습니다. 오류는 없지만 이미지를 가져올 수 없습니다. 코드는 다음과 같습니다.
BladeList = List( "Blade8", "Blade61", "Blade74" );
New Window( "Oneway Advisor",
H List Box(
For( j = 1, j <= 2, j++,
V List Box(
For( i = 1, i <= 3, i++,
Write(i);
Scatterplot 3D(
Y( :Name( " x" ), :y, :z ),
Coloring( :Name( " Mean Io" ) ),
Legend( 1522 ),
Frame3D(
Legend( 1 ),
Set Grab Handles( 0 ),
Set Rotation( -64, 0, -41 ),
Set Marker Scale( 5.2652 )
),
Where( :Blade == BladeList[i] & :Embodiment == "THP" ),
SendToReport(
Dispatch(
{},
"100",
ScaleBox,
{Legend Model(
1522,
Properties(
0,
{gradient( {Color Theme( "Jet" )} )},
Item ID( " Mean Io", 1 )
)
)}
)
)
)
);
),
);
);
);그러나 단일 루프를 시도하면 작동합니다.
BladeList = List( "Blade8", "Blade61", "Blade74" );
New Window( "Oneway Advisor",
H List Box(
/*For( j = 1, j <= 2, j++,*/
V List Box(
For( i = 1, i <= 3, i++,
Write(i);
Scatterplot 3D(
Y( :Name( " x" ), :y, :z ),
Coloring( :Name( " Mean Io" ) ),
Legend( 1522 ),
Frame3D(
Legend( 1 ),
Set Grab Handles( 0 ),
Set Rotation( -64, 0, -41 ),
Set Marker Scale( 5.2652 )
),
Where( :Blade == BladeList[i] & :Embodiment == "THP" ),
SendToReport(
Dispatch(
{},
"100",
ScaleBox,
{Legend Model(
1522,
Properties(
0,
{gradient( {Color Theme( "Jet" )} )},
Item ID( " Mean Io", 1 )
)
)}
)
)
)
);
),
V List Box(
For( i = 1, i <= 3, i++,
Write(i);
Scatterplot 3D(
Y( :Name( " x" ), :y, :z ),
Coloring( :Name( " Mean Io" ) ),
Legend( 1522 ),
Frame3D(
Legend( 1 ),
Set Grab Handles( 0 ),
Set Rotation( -64, 0, -41 ),
Set Marker Scale( 5.2652 )
),
Where( :Blade == BladeList[i] & :Embodiment == "THP" ),
SendToReport(
Dispatch(
{},
"100",
ScaleBox,
{Legend Model(
1522,
Properties(
0,
{gradient( {Color Theme( "Jet" )} )},
Item ID( " Mean Io", 1 )
)
)}
)
)
)
);
),
/*);*/
);
);누구든지 이것으로 나를 도울 수 있습니까?
고맙습니다,
다윗
이것이 되돌려야 할 약간의 오래된 스레드라는 것을 알고 있지만 중첩 루프 문제를 해결한 두 코드 세트 사이의 근본적인 변경 사항이 무엇인지 알 수 없습니다. 중첩 루프를 사용하는 도구 중 하나에서 오류가 발생합니다. 관련이 있기를 바랍니다.
편집: HLB 추가 기능을 사용하는 문제입니까?
이중 루프를 작동시킬 수 없었지만 아래 방법을 사용하면 원하는 결과를 얻을 수 있습니다.
BladeList = List( "Blade8", "Blade61", "Blade74" );
New Window( "Oneway Advisor",
hlb = H List Box()
);
For( j = 1, j <= 2, j++,
vlb = V List Box(
For( i = 1, i <= 3, i++,
sc = Scatterplot 3D(
invisible,
Y( :Name( " x" ), :y, :z ),
Coloring( :Name( " Mean Io" ) ),
Legend( 1522 ),
Frame3D(
Legend( 1 ),
Set Grab Handles( 0 ),
Set Rotation( -64, 0, -41 ),
Set Marker Scale( 5.2652 )
),
Where( :Blade == BladeList[i] & :Embodiment == "THP" ),
SendToReport(
Dispatch(
{},
"100",
ScaleBox,
{Legend Model(
1522,
Properties( 0, {gradient( {Color Theme( "Jet" )} )}, Item ID( " Mean Io", 1 ) )
)}
)
)
),
)
);
hlb << append( vlb );
);