GET_COMP_ENABLED ​
Calling GET_COMP_ENABLED returns for component with id intValue the string "OK" when it is enabled, an empty string when not.
Syntax ​
leo-grammar
SEND "GET_COMP_ENABLED 2" to:"Application" answer:enabled
#--> strValue
Parameters ​
none
Returns ​
<main_return_value>
(intValue) - "OK" when enabled, empty string otherwise.
Details ​
The following list tells the ids for each component
*Acquisition 1 (see COMP_acq.png) *Modeling 2 (see COMP_mod.png) *Analysis 3 (see COMP_ana.png) *Simulation 4 (see COMP_sim.png) *Evaluation 5 (see COMP_eva.png) *ImportExport 6 (see COMP_imp.png)
See Also ​
Examples ​
GET_COMP_ENABLED is called to check if the modeling component is enabled. If not, an infobox is displayed and it is enabled. Call the example twice, once as is and a second time without the '#' character in the first line.
leo-grammar
CC "Application" DISABLE_COMP modeling
SEND "GET_COMP_ENABLED 2" to:"Application" answer:enabled
IF (enabled != "OK")
{
CC "AdoScript" INFOBOX "The modeling component is not enabled!"
CC "Application" ENABLE_COMP modeling
}
Versions and Changes ​
Available since ADOxx 1.3