Script pour éditer un scriptJ'ai un script qui prend une sortie de tracé de contour standard et réorganise les tracés en colonnes.
Va de

à

Le placement des zones de texte provoque des ratés dans le script.
Existe-t-il une autre façon d'obtenir le résultat ? Sinon, puis-je ajuster le script actuel d'une manière ou d'une autre pour le trier ? Je me demandais si le script parent pouvait exécuter une recherche/remplacement sur le script enfant pour effectuer certains ajustements ?
clear Globals();
Delete Symbols();
window = Get Window List();
wName = window << Get Window Title;
nWindows = N Items( window );
For( i = nWindows, i > 0, i--,
If( Contains( wName[i], "Contour Plot" ),
obj = window[i]["Contour Plot?"] << Get Scriptable Object;
Show(obj);
obj << Save Script for All Objects;
obj << Close Window;
Break();
);
);
spt = Window( "Script Window" );
spt << Bring Window To Front;
spt2 = spt[Script Box(1)];
spt2 << Get Line Text( 3 );
spt2 << Set Line Text (3, "Line Up Box( N Col( 3 ), Spacing( 2 ),");
spt2 << run();
spt2 << Close Window;
Automatisation et scriptsRe: Script pour éditer un scriptSi vous pouvez utiliser JMP18, vous pouvez simplement modifier la mise en page à partir du triangle rouge de niveau le plus élevé

Je n'ai plus accès à JMP17 et je ne suis pas sûr de pouvoir obtenir un résultat similaire dans JMP18 pour tester différentes options, mais vous pouvez prendre en compte ces zones de texte (augmenter ncol à 6 et les masquer / conserver ncol à 3 et les supprimer). Vous pouvez également déterminer quelle colonne est utilisée comme colonne by et reconstruire la plate-forme en utilisant ces informations SANS utiliser By (l'exécuter plusieurs fois et la formater comme vous le souhaitez).
Re: Script pour éditer un scriptcurrent report()["Conto?"]
merci, très utile:)
Re: Script pour éditer un scriptVous pouvez collecter les scripts des OutlineBoxes , encapsuler chaque (informations Where + plot) dans une V List Box et organiser les V List Boxes via la Lineup Box :
// ask every Outline Box for a scriptable object
obs = (current report() << xpath("//OutlineBox")) << get scriptable object;
// ask the scriptable objects for a script
scripts = obs << get Script;
// prepare a template LineUp Box
myExpr = Expr( Line Up Box( N Col( 3 ), Spacing( 2 )));
// wrap the scripts with V List Box and put them into the template
For each({script}, scripts,
Eval (Substitute(Expr(Insert Into(myExpr, Expr(V list Box (_content_)))), Expr(_content_), Name Expr(script)))
);
// use the template in a new window
New Window("overview", myExpr);
Re: Script pour éditer un scriptPlus proche de l'approche originale avec le ... Script pour tous les objets :
// there is no
// myScript = (current report()[OutlineBox(1)] << get scriptable object) << get Script for All Objects;
// : (
(current report()[OutlineBox(1)] << get scriptable object) << save Script for All Objects;
sw = Window( "Script Window" );
myScript = Parse(sw[Script Box(1)] << get text);
//--------------------------
<BR />// prepare a Template for the Line Up Box
myExpr = Expr( Line Up Box( N Col( 3 ), Spacing( 2 )));<BR />
// take the V list Box - it contains the Countour Plot commands
myScript = (Extract Expr(myScript, V List Box (Wild List())));
// cycle through Contour Plot commands, "wrap" with V List Box and insert into template
For each({command}, Name Expr(myScript), // an I-DONT-CARE of VLBs
wrapped = Insert (Expr(V list Box ()), Name Expr(command));
Insert Into(myExpr, Name Expr(wrapped))
);
// generate the report
New Window("overview", myExpr);
Un grand merci au programmeur de la fonction For Each !!
merveilleux : )
Cela fonctionne avec n'importe quelle expression , pas seulement avec une liste, un tableau associatif et une matrice : )

Re: Script pour éditer un scriptJ'ai fait cela un peu différemment. J'ai généré les tracés de contour à partir de la table de données Semiconductor Capability, puis j'ai exécuté le script suivant
Clear Globals();
Delete Symbols();
window = Get Window List();
wName = window << Get Window Title;
nWindows = N Items( window );
For( i = nWindows, i > 0, i--,
If( Contains( wName[i], "Contour Plot" ),
obj = window[i]["Contour Plot?"] << Get Scriptable Object;
Break();
)
);
script = Char( obj << get bygroup script );
obj << Close Window;
Eval( Parse( "New Window(\!"Contours\!",lineupbox(ncol(3), spacing(2)," || script || "));" ) );
pour obtenir cette sortie

Re: Script pour éditer un scriptAh, c'est vrai, le script get bygroup() était déjà là. En effet, c'est beaucoup plus simple de cette façon : )
(current report()["Contour?"] << get scriptable object) << get by group script
C'est assez robuste.
Cela fonctionne avec JMP17 (en parlant au premier plot)

... et JMP18 (en parlant à la Plateforme du Groupe) :

Si vous utilisez la valeur de retour de la commande report, vous devez faire attention à ne récupérer le script qu'une seule fois :
cp =Contour Plot( ... ,By() ); // returns a list
//cp << get script; // 1 script per plot (N times, message sent to a list)<BR />// cp << get bygroup script; // returns the by group Script N times (message sent to a list)
cp[1] << get bygroup script; // 1x :)</img>
Re: Script pour éditer un script
@hogi a écrit :
... C'est assez robuste. Il fonctionne avec JMP17 (en parlant à la première parcelle)... et JMP18 (en parlant à la plate-forme de groupe)
Oh, cette déclaration fait simplement référence à la manière d'obtenir le script groupby :
(current report()["Contour?"] << get scriptable object) << get by group script
pas pour la chose complète ...
Dans JMP 18 et versions ultérieures, le script renvoie une GroupPlatform - et Lineup Box ne permet plus de contrôler la mise en page.
Vous pouvez ensuite ignorer cette partie extérieure et utiliser directement GroupPlatform pour contrôler la mise en page (options du triangle rouge mentionnées par @jthi ).
Structure arborescente via Lineup Box (regrouper par script)

[Boîte de contour sélectionnée = 1ère parcelle]
Structure arborescente via les approches précédentes :
