Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 1.22 KB

File metadata and controls

54 lines (44 loc) · 1.22 KB

SetScriptResource

Description

Set the script text of the specified script resource.

FUNCTION SetScriptResource(
				scriptName : STRING;
				script     : DYNARRAY[] of CHAR;
				python     : BOOLEAN): BOOLEAN;
def vs.SetScriptResource(scriptName, script, python):
    return BOOLEAN

Parameters

Name Type Description
scriptName STRING The script name identifying the resource.
script DYNARRAY[] of CHAR The script text.
python BOOLEAN Pass TRUE if the script text contains python script. Otherwise it will be considered VectorScript.

Examples

resultOK := SetScriptResource('Example', script, TRUE);
import vs

# Set the script text of the specified script resource.
scriptName = 'Example'
script = 'Example'
python = True

ok = vs.SetScriptResource(scriptName, script, python)
if ok:
    vs.Message('SetScriptResource succeeded')
else:
    vs.Message('SetScriptResource failed')

See Also

VS Functions: CreateScriptResource | GetScriptResource | OpenScriptResPal

Version

Availability: from Vectorworks 2014

Category