Frequently asked question

What's new for developers in ArcPad 7.0 SP1?

Last Published: April 25, 2020

Answer

ArcPad 7.0 Service Pack 1, available through the link in Related Information, below, adds three new features for customizing ArcPad:

1. RecordSet::Find has been enhanced to support attribute indexes for much faster searches. To take advantage of this support, use the syntax described below:

The find expression in Recordset::Find will now look for the sequence "//" and everything after it will be treated as the index criteria. For example,

Recordset.Find("[TREETYPE] = 8 // CITY = 'Redlands' ");

is an example of a query that will find trees with a type 8 that also are in Redlands. The " CITY = 'Redlands' " part is used for the fast attribute indexed search, while the expression "[TREETYPE] = 8" is processed by the (slower) scripting engine for further refinement.

Existing Recordset::Find expressions can be tuned to take advantage of this. For example:

Recordset.Find( "LEFT([RDNAME],4) = ""Main"" AND [RDTYPE] = ""RD"" " )

can be modified to use an attribute index on RDNAME:

Recordset.Find( "LEFT([RDNAME],4) = ""Main"" AND [RDTYPE] = ""RD"" // RDNAME LIKE 'Main*' ")

Some example expressions in this indexing language:

"// NAME = 'Stephen Quan'"

"// NAME LIKE 'Steph*'"

"// NAME LIKE 'St?ph?n*'"

"// NAME = 'Stephen' AND AGE = 35"

"// NAME = 'Stephen' AND NOT (GENDER = 'F')"

"// NAME = 'Stephen' OR NAME = 'Elvin'"

"// WHEN = '20062203'"

"// CHECKED = 'T'"

The rules of the language are:

a. Column names are specified as: NAME or "NAME".

b. The multi-character wildcard in LIKE expressions is either * or %.

c. The single character wildcard in LIKE expressions is ?.

d. String expressions are enclosed by single quotes. For example, 'somestring'. Double quotes refer to columns.

e. String searches are case insensitive. For example, NAME = "Stephen" will also return "stephen" and "STEPHEN".

f. Numerical expressions are supplied without quotes. For example, 3.14159.

g. Date expressions are an 8 character quoted string. For example, '20060420' represents April 20, 2006.

h. Logical expressions are quoted strings starting with 'T', 'Y', '1' representing true, false otherwise.

i. Use boolean operators such as AND, OR and NOT to combine expressions.

j. The precedence rule is AND, followed by OR, followed by NOT. For example, A AND B OR C AND D is the same as (A AND B) OR (C AND D).

k. Use ( and ) to alter the order of precedence. For example, ((A AND B) OR C) AND D.

2. Map::Properties supports an additional property -- "SuspendDraw"

Name: SuspendDraw

Description: Specifies whether map redrawing is disabled or enabled. When set to True, the user interface continues to work but the map view is no longer refreshed. When set to False, the map is refreshed and drawing is restored. The default is True.

Return Type: Boolean

Read-only or read/write: Read/write

Additional Notes: This property allows users to suspend drawing before starting an editing operating; new feature capture; or other action that would ordinarily trigger a refresh, and then restore drawing. For example, it supports a scenario where the user makes multiple edits with only a single redraw occurring at the end.

Here's a VBS example that modifies the first attribute of the first feature in the first layer (no error checking - i.e. assumes the shapefile layer exists and the first attribute is a text type):

Map.Properties("SuspendDraw") = True
Map.Layers(1).Editable = True
Dim pRS
Set pRS = Map.Layers(1).Records
pRS.MoveFirst
pRS.Fields(1).Value = "CHANGED"
pRS.Update
Set pRS = Nothing
Map.Layers(1).Editable = False
Map.Properties("SuspendDraw") = False

3. Layer::Properties supports an additional property -- "ShowProgressDialogs"

Name: ShowProgressDialogs

Description: Determines whether the Building Spatial Index and Building Attribute Index dialogs are displayed when these actions occur; the default is True.

Return Type: Boolean

Read-only or read/write: Read/write

Article ID:000008681

Software:
  • ArcPad Prev
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic