Skip to content

UPDATE_MODEL_LIST ​

The command UPDATE_MODEL_LIST updates the list of known models in the core.

Syntax ​

leo-grammar
CC "Core" UPDATE_MODEL_LIST [ force:boolValue ]

#--> ecode:intValue
CC "Core" UPDATE_MODEL_LIST [ force:boolValue ]

#--> ecode:intValue

Parameters ​

  • force (boolValue, optional) -

Returns ​

  • ecode (intValue) - Contains the error code or is 0 in case of success

Details ​

The model list from the core is used as the base for the model list window that is e.g. displayed in the "Open model" dialog.

The update can take some time on systems with a few thousand models so it may be a good idea to add a waiting mouse cursor while performing this operation.

Using the boolean parameter force allows to enforce the update (i.e. refetching data from the DB is ensured). Without specifying the parameter (or using force:0) it might happen that the ADOxx internal handling detects no relevant change and therefore does not access the database.

See Also ​

UPDATE_SINGLE_MODEL

Examples ​

asc
# update
CC "Core" UPDATE_MODEL_LIST force:1

IF ((ecode)!=0)
{
  CC "AdoScript" ERRORBOX ("Error "+(STR ecode)+" occured!")
  EXIT
}

CC "AdoScript" INFOBOX ("Updated model list successfully!")
# update
CC "Core" UPDATE_MODEL_LIST force:1

IF ((ecode)!=0)
{
  CC "AdoScript" ERRORBOX ("Error "+(STR ecode)+" occured!")
  EXIT
}

CC "AdoScript" INFOBOX ("Updated model list successfully!")

Versions and Changes ​

Available since ADOxx 1.3