GET_MODEL_VERSION ​
GET_MODEL_VERSION returns the version of a model.
Syntax ​
leo-grammar
CC "Core" GET_MODEL_VERSION modelversionid:intValue
#-->RESULT ecode:intValue version:strValue
Parameters ​
modelversionid
(intValue) - the id of the model
Returns ​
ecode
(intValue) - Contains the error code or is 0 in case of success.version
(strValue) - the version of the model
Details ​
In modelversionid you must not pass thread ids but only model version ids!
See Also ​
Examples ​
asc
# 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_VERSION modelversionid:(VAL modelid)
# tell the user the modeltype of the current model
CC "AdoScript" INFOBOX ("The current model is of version: " + version)
Versions and Changes ​
Available since ADOxx 1.3