Hi,
The following code will do the job for Origin 8.5:
win -cd %H;
newbook template:=test123 sheet:=1;
string path$;
path$ = "Y:\DATA";
findfiles ext:="s*.dat";
impAsc options.Sparklines:=0 options.template:=test123;
@glob=1; // Make local variables global
string iniwks$ = %H; // Remember first workbook
xyz_renka 3 20 20;
worksheet -p 242 temp; // Make one surface plot
%T = %H; // Remember the graph window
doc -e w
{
if(!(iniwks$==%H)) // Only process workbook not the initial one
{
xyz_renka 3 20 20;
range rr = [%H]1!1;
win -a %T; // Activate plot created earlier
layer -i rr; // Add dataset to active layer
}
//worksheet -p 242 temp;
}
@glob=0;
layer.unit = 4;
rescale;
Regards!
Sean