Re: Cómo comprobar si se ha establecido una preferencia y cómoEl valor devuelto es un comando para establecer las preferencias tal como son en este momento.
Puede convertir el comando en una cadena, analizarlo y verificar si la opción está habilitada o deshabilitada:
returnedString=Char(Get Platform Preference( Control chart builder( K sigma ) ));
Regex(returnedString,"(on|off)","\1")
Re: Cómo comprobar si se ha establecido una preferencia y cómoGracias @hogi , eso funcionó perfectamente. Estaba irritado, porque asigné el comando de preferencia a una variable y luego la conversión al personaje no funcionó. Pero es la magia de JSL.
returnedCommand = Get Platform Preference( Control chart builder( K sigma ) );
// this gives nothing:
show(char(returnedCommand));
returnedString=Char(Get Platform Preference( Control chart builder( K sigma ) ));
// this works
show (returnedString);
Re: Cómo comprobar si se ha establecido una preferencia y cómo¿No podrías también verificar el literal como una expresión?
Names default to here(1);
Get Platform Preference( Control chart builder( K sigma ) ) == Expr(Platform Preferences( Control chart builder( K Sigma( 3, <<OFF></OFF>
Cómo comprobar si se ha establecido una preferencia y cómoMe gustaría verificar si una preferencia está establecida en un valor determinado, pero con JSL no puedo recuperar el valor para compararlo en una declaración if, etc. y reaccionar ante la situación. Get Preferences devuelve algo, pero ¿qué es exactamente y cómo proceder?
Names Default To Here( 1 );
// Task: what is the preference set to
prefs = Get Platform Preference( Control chart builder( K sigma ) );
// hover over prefs shows the result correctly, but how to retrieve it,
// e.g. as a string?
// what type is this? JMP gives no answer
Type( prefs );
// it has a length
length(prefs);
// this does not work
Log Capture( Get Platform Preference( Control chart builder( K sigma ) ) );
Modelado Estadístico AvanzadoAutomatización y secuencias de comandosInvestigación del Consumidor y del MercadoLa personalización en masa