你好,
无法将对象“GraphBuilder”发送到 Journal。 您需要检索报告:report (obj) << Journal;
此外,不清楚您是要关闭 Journal 还是要使用脚本的最后一条语句关闭 Obj。 我建议分开这两个步骤。
最好的,
TS
我在您的过程中的这个简单步骤示例中看不到这个问题:
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( :height ), Y( :weight ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
);
obj << Journal;
obj << Close Window;
这是引发此错误的一些代码。为什么会发生这种情况?我不知道。
//Fan Statuses vs. Occupancy graphs
For( j = 1, j <= N Items( var ), j++, //Outer loop to cycle within list of variables
v1 = Char( "Time " || var[j] || "_FanStatus" );
v2 = Char( var[j] || "_FanStatus" );
obj = Graph Builder(
Size( 1400, 800 ),
Variables(
X( Column( v1 ) ),
X( :Time Final, Position( 1 ) ),
Y( Column( v2 ) ),
Color( :Occupancy )
),
Elements(
Line( X( 1 ), Y, Color( 0 ), Legend( 2 ), Connection( "Step" ) ),
Heatmap( X( 2 ), Legend( 3 ) )
),
SendToReport(
Dispatch( {"Line"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Heatmap"}, "", OutlineBox, {Close( 0 )} ),
Dispatch(
{},
v1,
ScaleBox,
{Min( :Time Final[1] ), Max( :Time Final[N Rows( :Time Final )] ), Interval( "Minute" ),
Inc( 15 ), Minor Ticks( 0 ), Label Row( Label Orientation( "Angled" ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
3,
Properties( 0, {Transparency( 0.5 )}, Item ID( "Occupied", 1 ) ),
Properties( 1, {Fill Color( 4 ), Transparency( 0.5 )}, Item ID( "OptStart", 1 ) ),
Properties( 2, {Fill Color( 2 ), Transparency( 0 )}, Item ID( "Unoccupied", 1 ) )
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "Raney " || v2 || " vs. Occ" )} )
)
);
obj << Journal << Close Window;
);