Skip to content

IS_MODEL_LOADED

IS_MODEL_LOADED returns true if the specified model is loaded in the Core! This does not necessarily mean, that a model window exists!

Syntax

leo-grammar
CC "Core" IS_MODEL_LOADED modelid:intValue

#-->RESULT ecode:intValue isloaded:[0|1]
CC "Core" IS_MODEL_LOADED modelid:intValue

#-->RESULT ecode:intValue isloaded:[0|1]

Parameters

  • modelid (idValue) - the ID of the model

Returns

  • ecode (intValue) - is 0 in case of success or an error code if the model does not exist.
  • isloaded (intValue) - is 1 if the model is loaded or 0 if the model is not loaded

Details

See Also

Examples

asc
CC "Core" GET_MODEL_ID modelname:"A" modeltype:"Geschäftsprozeßmodell"

IF (ecode = 0)
{
   CC "Core" IS_MODEL_LOADED modelid:(modelid)
   IF (isloaded = 0)
   {
     CC "AdoScript" INFOBOX ""The model is not loaded. Do you want to open it???"
     # the rest is up to you :)
   }
   ELSE
   {
     # the model is loaded -> do whatever you want to do...
   }
}
ELSE
{
   CC "AdoScript" ERRORBOX "The model does not exist!"
}
CC "Core" GET_MODEL_ID modelname:"A" modeltype:"Geschäftsprozeßmodell"

IF (ecode = 0)
{
   CC "Core" IS_MODEL_LOADED modelid:(modelid)
   IF (isloaded = 0)
   {
     CC "AdoScript" INFOBOX ""The model is not loaded. Do you want to open it???"
     # the rest is up to you :)
   }
   ELSE
   {
     # the model is loaded -> do whatever you want to do...
   }
}
ELSE
{
   CC "AdoScript" ERRORBOX "The model does not exist!"
}

Before you execute this example, create a model of type "Geschäftsprozeßmodell" called "A". Then execute the example first the model id of the model is retrieved and it is queried whether it is loaded or not!

Versions and Changes

Available since ADOxx 1.3