GET_MODEL_BASENAME ​
GET_MODEL_BASENAME returns the basename of a model.
Syntax ​
leo-grammar
CC "Core" GET_MODEL_BASENAME modelid:intValue
#-->RESULT ecode:intValue basename:strValue
Parameters ​
modelid
(idValue) - the id of the model
Returns ​
ecode
(intValue) - Contains the error code or is 0 in case of successbasename
(strValue) - the name of the model.
Details ​
See Also ​
Examples ​
Retrieve the name 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_BASENAME modelid:(VAL modelid)
# tell the user the modeltype of the current model
CC "AdoScript" INFOBOX ("The current model is called: " + basename)
Versions and Changes ​
Available since ADOxx 1.3