exportdicttooml

Exports the Tcl dictionary to the OML variable.

Syntax

set status [exportdicttooml tclvariablename omlvariablename key]

Inputs

tclvariablename
Any valid Tcl variable name as a string.
Type: string
omlvariablename
Any valid OML variable name as a string.
Type: string
Tcl Variable Type OML Variable Type Limitations
Dictionary Struct Keys in the dictionary should be string or char. Values in the dictionary should be Bool, Int, Double, String. Other types of values are exported as strings.
key (optional)
Key of the element in the dictionary. Exports entire dictionary if key is not provided.
Type: string

Outputs

status
Status of exporting the Tcl dictionary to the OML variable.
1 = success
"error message" - failure
Type: int | string

Example

set mydictionary [dict create k true key2 1 key3 2.2 key4 "4"]
set status [exportdicttooml mydictionary omldictionary]
1

Comments

Any error reported by OML is returned as a string. Returns 1 on success.