Class: QgsEsriArcadeConverter

Converts an Esri Arcade script to a QgsExpression.

Added in version 4.4.

List of all members, including inherited members

Constructor

__init__

Enums

Result

Results of converting the Arcade script.

Methods

errorMessage

Returns the descriptive error message, if an error was obtained while converting the script.

expression

Returns the QGIS expression equivalent of the Arcade script, if conversion was successful.

result

Returns the result of converting the script.

class qgis.core.QgsEsriArcadeConverter[source]

Bases: object

__init__(script: str | None)

Constructor for QgsEsriArcadeConverter for converting the specified script.

Parameters:

script (str|None)

__init__(a0: QgsEsriArcadeConverter)
Parameters:

a0 (QgsEsriArcadeConverter)

class Result(*values)

Bases: Enum

Results of converting the Arcade script.

  • Success: Script was successfully converted

  • ParserError: Script could not be parsed

  • InvalidScriptMultiStatements: Scripts containing multiple statements cannot be converted

  • InvalidScriptIncompatible: Script is incompatible with conversion to a QGIS expression

  • UnknownError: An unknown error occurred while converting the script

InvalidScriptIncompatible = 3
InvalidScriptMultiStatements = 2
ParserError = 1
Success = 0
UnknownError = 4
errorMessage(self) → str[source]

Returns the descriptive error message, if an error was obtained while converting the script.

See also

result()

Return type:

str

expression(self) → str[source]

Returns the QGIS expression equivalent of the Arcade script, if conversion was successful.

Return type:

str

result(self) → QgsEsriArcadeConverter.Result[source]

Returns the result of converting the script.

If the conversion was not successful, a descriptive error can be retrieved by errorMessage().

See also

errorMessage()

Return type:

QgsEsriArcadeConverter.Result