VS:GetElementValue

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.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.