CONVERT_OBJ ​
CONVERT_OBJ converts an object from its current class into another class, using a customized conversion function.
Syntax ​
leo-grammar
CC "Core" CONVERT_OBJ objid:id
[ tclassid:idValue| tclassname:strValue ] objname:strValue .
#-->RESULT ecode:intValue tobjid:id
Parameters ​
objid
(idValue) -tclassid
(idValue) -tclassname
(strValue) -objname
(strValue) -
Returns ​
ecode
(intValue) - Contains the error code or is 0 in case of success.tobjid
(idValue) -
Details ​
With execution of this command the related conversion function is called for the object specified with objid. The target class can be specified by ID (tclassid) or name (tclassname). Conversion functions are customized in "Conversion" class attributes. See see "Customizing Reference\Class Attributes\Conversion..." for details.
The conversion function creates a new object and deletes the existing one. The return value tobjid is the ID of the new object.
See Also ​
Examples ​
asc
SET objid:(VAL objids)
CC "Core" CONVERT_OBJ objid:(objid) tclassname:"Activity"
Versions and Changes ​
Available since ADOxx 1.3