RENAME_MODEL

RENAME_MODEL renames a model.

Syntax

CC "Core" RENAME_MODEL modelid:id basename:strValue version:strValue
#-->RESULT ecode:intValue

Parameters

modelidintValue, the id of the model that should be renamed
basenamestrValue, the new name of the model
versionstrValue, the new version of the model

Returns

ecodeintValue, Contains the error code or is 0 in case of success.

Remarks

The version can be specified in long or in short format.

Error code “52” means that the new model name is not unique.  It is quite typical and should be caught.

See Also

Example 1

SEND "GET_ACTIVE_MODEL" to:"Modeling" answer:modelid
CC "Core" RENAME_MODEL modelid:(VAL modelid) basename:"My new modelname" version:"2.0"
IF (ecode = 0)
{
   CC "AdoScript" INFOBOX "The model has sucessfully been renamed!"
}

Retrieves the currently opened model and renames it to “My new modelname 2.0”.