Product Documentation
Virtuoso ADE SKILL Reference
Product Version IC23.1, November 2023

sevWriteValue

sevWriteValue(
x_stateHandle 
t_componentName
t_attributeName
t_compValue
)
=> t / nil

Description

Writes a XML component value in the specified XML state file.

Arguments

x_stateHandle

The handle of a state file.

This can be any integer value.

t_componentName

Name of the XML component whose value you want to write.

t_attributeName

Name of the attribute of the specified component.

t_compValue

Value you want to write for the specified component.

Value Returned

t

An XML component value is written in the specified XML state file.

nil

Indicates an error.

Examples

Writes the values of the arguments a and b of component test. A combination of write and read commands are used in this example.

directory = "/home/user"
stateFile = strcat(directory "/xml.state")
// The above commands return the handle of the XML state file.
stateHandle = sevOpenXmlFile(stateFile)
// The above commands opens the XML state file handle.
sevWriteValue(stateHandle "test" "a" list(nil))
sevWriteValue(stateHandle "test" "b" list('a))
// The above commands write the argument values a and b for component test.
sevReadValue(stateHandle "test" "b")
// The above command reads the value for argument b of component test. sevCloseXmlFile(stateHandle)
// The above command closes the XML state file handle.

When you view the state file contents, the following output appears:

<?xml version="1.0"?>
<statedb ICVersion="IC6.1.6-64b.ADE.634" version="5">xml
    <test Name="a" Type="skillDpl"></test>
    <test Name="b" Type="list">(a)</test>
</statedb>

Return to top
 ⠀
X