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
![jthi_0-1693465270072.png jthi_0-1693465270072.png](https://community.jmp.com/t5/image/serverpage/image-id/56129iFBE82C02D2FF3D81/image-size/medium?v=v2&px=400)
![jthi_1-1693465287166.png jthi_1-1693465287166.png](https://community.jmp.com/t5/image/serverpage/image-id/56130i7537BD43E3897F50/image-size/medium?v=v2&px=400)
-Jarmo