setName(name)

Description

Function to change the name of an element in the Program Tree.

Available in: Controller.

Arguments

nameThe new name for the element.string

Example

-- print current name of the script module
print(this.name)
-- set the name of the script module to "My Element"
this:setName("My Element")
-- print the new name of the script module
print(this.name)