VS:GetElementValue: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
(add spaces for readability)
 
Line 8: Line 8:


The elementPath variable can be the explicit path, or you can use index notation to reference elements which all have the same xml tag:
The elementPath variable can be the explicit path, or you can use index notation to reference elements which all have the same xml tag:
result:= GetElementValue(hXML,'/geo/cloud/vector[2]/x',str1);
result := GetElementValue(hXML, '/geo/cloud/vector[2]/', str1);
</desc>
</desc>



Latest revision as of 04:41, 14 June 2016

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

Description

Returns the value of the element corresponding to the specified element name. The parameter elementPath is specified as a path of element names. The return value is the error code (0 for no error, or non-0 if it failed). See InitXML for a list of the error codes.

The elementPath variable can be the explicit path, or you can use index notation to reference elements which all have the same xml tag:

result := GetElementValue(hXML, '/geo/cloud/vector[2]/', str1);
FUNCTION GetElementValue(
XMLHandle :LONGINT;
elementPath :STRING;
VAR value :STRING) :INTEGER;
def vs.GetElementValue(XMLHandle, elementPath):
    return (INTEGER, value)

Parameters

XMLHandle LONGINT
elementPath STRING
value STRING Output parameter.

Version

Availability: from All Versions

This is drop-in function.