Is there any way how I could get the information which shape file is being currently used in my graph builder / to which shape file my column is / could be linked to? In my example I think it is linked to $MAPS/US-State-Name.jmp.
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/CrimeData.jmp");
gb = dt << Graph Builder(
Size(534, 456),
Show Control Panel(0),
Variables(Shape(:State)),
Elements(Map Shapes(Legend(6)))
);
fbox = Report(gb)[FrameBox(1)];
For Each({gb_var}, gb << get variables,
gb_var = (gb << get variables)[1];
Extract Expr(gb_var, Role(Wild()));
If(!IsEmpty(Extract Expr(gb_var, Role(Wild()))),
Show(gb_var[1]);
);
);
stop();
mapname_path = Convert File Path("$MAPS/US-State-Name.jmp");
dt_mapname = Open(mapname_path);
gb_mapfile = dt_mapname << Graph Builder(
Size(534, 456),
Show Control Panel(0),
Variables(Shape(:Name)),
Elements(Map Shapes(Legend(2)))
);
I'm trying to build a script in which I could dynamically perform some actions depending on which shape file is currently being used in Graph Builder and I'm considering the different options I have on how to determine the correct file.
-Jarmo