VS:CreateScriptResource

From Vectorworks Developer
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Create a document script resource.

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

Parameters

scriptName STRING A unique name for the new document script.
paletteName STRING A name of the script palette that will contain the new script. If the script palette doesn't exist, it will be created.
paletteOpen BOOLEAN Pass in TRUE if the script palette should be opened when created, and FALSE if it should be closed. If the palette exist, this parameter has no effect.
script DYNARRAY[] of CHAR The script text.
python BOOLEAN Pass TRUE if the script text contains python script. Otherwise it will be considered VectorScript.

Return Value

Return TRUE if the creation was successful. The routine will fail if script with the specified name already exist.

Version

Availability: from Vectorworks 2014

See Also

VS Functions:

VS:GetScriptResource | VS:SetScriptResource | VS:OpenScriptResPal

VS Functions:

[[VS:GetScriptResource]] | [[VS:SetScriptResource]]

| [[VS:OpenScriptResPal]]