GET_MODEL_MODELTYPE ​
GET_MODEL_MODELTYPE returns the modeltype of a model.
Syntax ​
leo-grammar
CC "Core" GET_MODEL_MODELTYPE modelid:intValue
#--> RESULT ecode:intValue modeltype:strValue
Parameters ​
modelid
(idValue) - the ID of the model
Returns ​
ecode
(intValue) - Contains the error code or is 0 in case of success.modeltype
(strValue) - the modeltype of the given model
Details ​
See Also ​
Examples ​
Retrieve the modeltype of the current model
leo-grammar
# get the id of the current model
SEND "GET_ACTIVE_MODEL" to:"Modeling" answer:modelid
IF (modelid = "")
{
CC "AdoScript" ERRORBOX "Open a model first!"
EXIT
}
# get the modeltype of the model
CC "Core" GET_MODEL_MODELTYPE modelid:(VAL modelid)
# tell the user the modeltype of the current model
CC "AdoScript" INFOBOX ("The current model is of modeltype: " + modeltype)
Versions and Changes ​
Available since ADOxx 1.3