cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
jthi
Super User

Is there a way to get which shape file column can be linked to or to which graph builder's Map Shape has been linked to?

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
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Is there a way to get which shape file column can be linked to or to which graph builder's Map Shape has been linked to?

Got response from JMP support (TS-00052450) that this might not be currently possible. Going forward I will most likely either create a metadata file which I can use to perform the linking or name all the shape files in such a way, that it is easy to link to correct shape file by checking row values.

 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Is there a way to get which shape file column can be linked to or to which graph builder's Map Shape has been linked to?

Got response from JMP support (TS-00052450) that this might not be currently possible. Going forward I will most likely either create a metadata file which I can use to perform the linking or name all the shape files in such a way, that it is easy to link to correct shape file by checking row values.

 

-Jarmo