DBquery

Top  Previous  Next

Execute a query for properties of objects or elements

 

Voraussetzung

data must be loaded.

 

Syntax:       DBquery(<fields> FROM {<selexpr>} <fromexpr> {<elemCond>} {/NOQUOTE})

Parameter

<fields>

Attributes or pseudo-attributes of the objects and elements being searched for. A complete list of implemented pseudo-attributes can be found in the table reference. Multiple values are separated by commas.

<selexpr>

(optional) specifies on which objects the query is to be executed:

OPEN        Open Object

ALL        All Objects

(keine Angabe)        selection list

<fromexpr>

specifies on which objects/elements the query is executed. Possible are:

OBJECT

ELEMENT

TEXT

ATX

FTEXT

SYMBOL

STRING

RASTER

ATTRIB

SET

MEMBER

MASTER

POINTELEMENT

POINT

PLAN

SEGMENT

PTR_???        PTR_??? ist a pointer, like returned by DBquery($pointer ...).

<elemCond:>

(optional) restricts the selection according to certain criteria:

KEY <liste>

DKY <liste>

DKA <liste>

SYM <liste>

SEGMENT <number>

QTX   <name>        EQ <wert>

NE <wert>

LT <zahl>

GT <zahl>

LE <zahl>

GE <zahl>

LIKE <expression>

IS NULL

IS NOT NULL

Multiple conditions can be written one after the other.

/NOQUOTE

Returns values without quotes. Without the NOQUOTE parameter, the results are returned individually in quotes. This parameter can also be abbreviated to /NOQ or /noq.

 

Rückgabewert

Wert

Beschreibung

““

no attribute values available.

"any"

The corresponding attribute values are output.

 

Example

DBquery($numftxt FROM OPEN OBJECT)

Result:

"2"

DBquery($const.#P,$x,$y from open point /noq)

Result:

#P 3437515.669844 5381368.123192

DBquery($numSym,$sym.1.$pos.$x,$sym.1.$pos.$y,$sym.1.$angle FROM OPEN OBJECT     /NOQUOTE )

Result:

2 3463732.61 5585791.64 278.987

DBquery($num FROM SYMBOL)

Result:

"232"

"237"

"230"

s_sort(DBquery($num FROM SYMBOL))

Result:

"230"

"232"

"237"

DBquery($name from open object /noq)

Result:

VS_20kV_Kabel

DBquery(GID from open object /noq)

Result:

1-1-1-1-10

DBquery(KRK,GID,RNR from object)

Result:

"500" "1-1-1-1-2" "1"

"450" "1-1-1-4-15" "4"

"400" "1-1-1-2-2" "2"

DBquery($pointer from open object /noq)

Result:

PTR_25d33f4

DBquery($name from object QTX $name LIKE VS_* /noq)

Result:

VS_20kV_Kabel

VS_20kV_Freileitung

VS_20kV_Muffe_A

VS_20kV_Mast_E

VS_NSP_Kabel

VS_NSP_Muffe_HA_Abzw

VS_NSP_Muffe_E

VS_NSP_Muffe_HA_Abzw

VS_NSP_Muffe_HA_Abzw

DBquery($pointer from point QTX $link EQ 3 QTX $num GT 1 /noq)

Result:

PTR_25eb15c

PTR_25fbd84

PTR_25fbcac

PTR_25fbc1c

DBquery($pointer from all point)

Result:

""

(The return value is too long and is not displayed in the command window)

 

Remarks

Under Analysis | Generate Attribute Query, you'll find a dialog that helps you create a DBquery query.

If the return value is too long, the result won't be displayed in the command window, but it can still be assigned to a variable. (See the last example)

Siehe auch

Attr

Foreach

SQLquery

List of pseudo attributes