DocumentVariableList

From SDK
Jump to navigation Jump to search
Back.jpg

This object is responsible for managing all the document variables associated with a Job. A reference to a DocumentVariableList is obtained via the DocumentVariables property of the VectricJob.

local document_variable_list = job.DocumentVariables


Methods

:DocumentVariableExists( string variable_name)

Returns: (bool) true if a DocumentVariable with the passed name exists
Variable_name (string) Name for variable 


:GetDocumentVariable( string variable_name)

Returns: (string) a DocumentVariable with the passed name if exists otherwise nil
Variable_name (string) Name for variable 


:SetDocumentVariable( string variable_name, double value)

Sets the DocumentVariable with the specified name to the passed value. It either creates a new variable if one with the passed name doesn’t exist or updates the current one to the new value. Please see the documentation for IsInvalidDocumentVariableName as to what constitutes a valid variable name.

Variable_name (string) Name for variable 
Value (double) value of the variable 


:DocumentVariable True(string variable_name)

Returns: (bool) true if a DocumentVariable with the passed name is deleted otherwise false. Please note DocumentVariables considered to be in use cannot be deleted.
Variable_name (string) Name for variable 


:GetHeadPosition()

Returns: a (POSITION) variable to allow access to the head of the list of DocumentVariables in the list


:GetNext( POSITION pos)

Returns: (POSITION) the DocumentVariable at the current position AND a new value for position pointing to the next item in the list (or nil if at end of list)
pos (POSITION) current position in group 


Back.jpg

References

Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 10.0, published August 21, 2019. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information