Depending also where are you running your script from, you might have not access to your project. Projects have their own namespace(s).
Names Default To Here(1);
project = New Project(
Run Script(
Open("$SAMPLE_DATA/Big Class.jmp");
Open("$SAMPLE_DATA/Probe.jmp");
)
);
For(i = 1, i <= N Table(), i++,
collName = Data Table(i) << Get Column Names;
If(N Items(collName) == 2,
Data Table(i) << Set Name("Image"),
Data Table(i) << Set Name("Numerical data")
);
);
vs
Names Default To Here(1);
project = New Project(
Run Script(
Names Default To Here(1);
Open("$SAMPLE_DATA/Big Class.jmp");
Open("$SAMPLE_DATA/Probe.jmp");
For(i = 1, i <= N Table(), i++,
collName = Data Table(i) << Get Column Names;
If(N Items(collName) == 5,
Data Table(i) << Set Name("Image"),
Data Table(i) << Set Name("Numerical data")
);
);
)
);
And if I run this from project (using JMP17) it does work for me
-Jarmo