This also seems to work, but in the not-that-unusual case of having an open paren in the column name, will fail. You'd have to trap for that if it is a concern.
Names Default To Here( 1 );
dt = open("$Sample_Data\Car Physical Data.jmp");
gb = dt << Graph Builder(
Size( 526, 668 ),
Show Control Panel( 0 ),
Variables( X( :Turning Circle ), Y( :Horsepower ) ),
Elements( Points( X, Y, Legend( 5 ) ), Smoother( X, Y, Legend( 6 ) ) ),
Local Data Filter(
Show Histograms and Bars( 0 ),
Add Filter( columns( :Country, :Type ), Display( :Type, N Items( 5 ) ) ),
Add Filter( columns( :Weight ), Display( :Weight, Height( 20 ) ) )
)
);
//////////// processing here
ob = (report(gb) << parent)[outlinebox(1)];
lis = (ob << xpath( "//TabPageBox" )) << get title;
colnames = Transform Each( {v, i}, lis[2 :: (N Items( lis ) - 1)],
Trim Whitespace( Items( [1 1], v, "(" )[1] )
);