CustomPointGroupQueryQueryString Property

Gets or sets the query string.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public string QueryString { get; set; }

Return Value

String
A string that selects points for a point group.
Remarks

Queries are made up of one or more expressions. An expression has three components:

  1. a property
  2. a comparison operator (> < >= <= =)
  3. a value

Queries can also contain set operators: AND, OR, and NOT.

Multiple expressions can be combined using set operators, and expression precedence can be set with parentheses.

Ranges are defined using AND, rather than the hyphen used by StandardPointGroupQuery. For example: "PointNumber>=100 AND PointNumber<=200" for the range of points between 100-200.

The order of precedence in query evaluation is:

  1. expressions in parentheses, with innermost expressions evaluated first
  2. NOT
  3. Comparisons
  4. AND
  5. OR

See the Civil 3D Developer's Guide for more information about writing query strings.

Example
 1// _civildoc is the active CivilDocument instance.
 2// 
 3ObjectId pointGroupId = _civildoc.PointGroups.Add("Example Point Group2");
 4PointGroup pointGroup = pointGroupId.GetObject(OpenMode.ForWrite) as PointGroup;
 5
 6CustomPointGroupQuery customQuery = new CustomPointGroupQuery();
 7customQuery.QueryString = "(RawDescription='GR*') AND (PointElevation>=100 AND PointElevation<=300)";
 8pointGroup.SetQuery(customQuery);
 9pointGroup.Update();
10
11// Display the number of points matched:
12_editor.WriteMessage("# matched points: {0}\n",
13    pointGroup.PointsCount);
See Also