Skip to content

GET_MODEL_CHANGECOUNTER ​

GET_MODEL_CHANGECOUNTER retrieves the overall change counter of a model. The change counter is updated everytime an attribute changes, a instance is created or deleted, etc.

Syntax ​

leo-grammar
CC "Core" GET_MODEL_CHANGECOUNTER modelid:intValue

#-->RESULT ecode:intValue changecounter:intValue

Parameters ​

  • modelid (idValue) - the id of the model

Returns ​

  • ecode (intValue) - Contains the error code or is 0 in case of success.
  • changecounter (intValue) - if a model with the specified ID exists, the return variable changecounter is set to the current changecounter of the model.

Details ​

This command returns a session-specific change counter. This means that after restarting the ADOxx Modelling Toolkit, it is always reset to "0".

See Also ​

Examples ​

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

IF (ecode = 0)
{
   CC "Core" GET_MODEL_CHANGECOUNTER modelid:(modelid)
   CC "AdoScript" INFOBOX ("The current changecounter is: " + STR (changecounter))
}
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 then the changecounter is queried.

Versions and Changes ​

Available since ADOxx 1.3