Choose Language Hide Translation Bar
Highlighted
Pablo_Iglesia
Level II

making a list of Scriptable Objects

Hello JMP Comunity

 

I have been trying to clean up some of the code i have done recently, but i keep getting the error below. I think my issue is on the way i am defining the list, but i have tried several different things and still fail :(.

Pablo_Iglesia_0-1579195967067.png

 

My current code looks like this, and this setup DOES work!!, but it looks very messy.

Report(pepwd) [Border Box( 2 )] << delete;
Report(pepht) [Border Box( 2 )] << delete;
Report(nepwd) [Border Box( 2 )] << delete;
Report(spacwd)[Border Box( 2 )] << delete;
Report(neucnt)[Border Box( 2 )] << delete;
Report(peucal)[Border Box( 2 )] << delete;
Report(peuctd)[Border Box( 2 )] << delete;

The way i tried to clean it up is with the below for loop, and this setup is the one that gives the error from above.

 

List_of_Graphs=List(pepwd,pepht,nepwd,spacwd,neucnt,peucal,peuctd);

For (i=1, i<=N Items(List_of_Graphs), i++,
Report( List_of_Graphs[i] )[Border Box( 2 )] << delete;
);

I will greatly appreciate any help!! Thanks a lot in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: making a list of Scriptable Objects

I believe the issue is that your list is just a list of names, not the platforms pointed to by the names. You would need Eval List() in order to have the values in the list be the platforms, as shown below.

 

List_of_Graphs = Eval List( List( pepwd, pepht, nepwd, spacwd, neucnt, peucal, peuctd ) );

 

However, you can actually send a message to a list of platforms (even without evaluating the names). You can even use the <<Report message to get the reports for all platforms/graphs. You can also use the <<Find message to find a box within multiple reports at a time.

 

graphReports = List_of_graphs << Report();
borderBoxes = graphReports << Find( Border Box( 2 ) );
borderBoxes << Delete();

The XPath message can also be useful for finding boxes within the display tree. More details about XPath can be found in this blog post.

 

While  you can delete boxes from JMP generated reports, I would not necessarily advise doing so, as it could cause JMP to become unstable if it expecting the box to still be there. Therefore, when removing boxes from JMP generated reports, I suggest using the Visibility("Collapse") message instead.

borderBoxes << Visibility("Collapse");

 

Justin

View solution in original post

2 REPLIES 2
Highlighted

Re: making a list of Scriptable Objects

I believe the issue is that your list is just a list of names, not the platforms pointed to by the names. You would need Eval List() in order to have the values in the list be the platforms, as shown below.

 

List_of_Graphs = Eval List( List( pepwd, pepht, nepwd, spacwd, neucnt, peucal, peuctd ) );

 

However, you can actually send a message to a list of platforms (even without evaluating the names). You can even use the <<Report message to get the reports for all platforms/graphs. You can also use the <<Find message to find a box within multiple reports at a time.

 

graphReports = List_of_graphs << Report();
borderBoxes = graphReports << Find( Border Box( 2 ) );
borderBoxes << Delete();

The XPath message can also be useful for finding boxes within the display tree. More details about XPath can be found in this blog post.

 

While  you can delete boxes from JMP generated reports, I would not necessarily advise doing so, as it could cause JMP to become unstable if it expecting the box to still be there. Therefore, when removing boxes from JMP generated reports, I suggest using the Visibility("Collapse") message instead.

borderBoxes << Visibility("Collapse");

 

Justin

View solution in original post

Highlighted
Pablo_Iglesia
Level II

Re: making a list of Scriptable Objects

This work great!!! 

Thanks a lot !!!

Article Labels

    There are no labels assigned to this post.