DocumentVariableList: Difference between revisions

From SDK
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:


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






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




Line 22: Line 22:
===:SetDocumentVariable( string variable_name, double value)===
===: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.
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''
Variable_name (string) Name for variable  
::''Value (double) value of the variable''
Value (double) value of the variable  






===:DocumentVariable True(string variable_name)===
===: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.
'''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''
Variable_name (string) Name for variable  




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




===:GetNext( POSITION pos)===
===: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)
'''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''
pos (POSITION) current position in group  
 


[[File:Back.jpg|right|50px|link=Vectric Lua Interface for Gadgets]]
[[File:Back.jpg|right|50px|link=Vectric Lua Interface for Gadgets]]
==References==
==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 [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information]
'''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 [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information]

Revision as of 18:57, 1 May 2024

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