Gets or sets the query string.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public string QueryString { get; set; } |
Visual Basic |
---|
Public Property QueryString As String Get Set |
Visual C++ |
---|
public: property String^ QueryString { String^ get (); void set (String^ value); } |
Return Value
A string that selects points for a point group.
Remarks
Queries are made up of one or more expressions. An expression has three components:
- a property
- a comparison operator (> < >= <= =)
- 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:
- expressions in parentheses, with innermost expressions evaluated first
- NOT
- Comparisons
- AND
- OR
See the Civil 3D Developer's Guide for more information about writing query strings.
Examples

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);

1' _civildoc is the active CivilDocument instance. 2' 3Dim pointGroupId As ObjectId = _civildoc.PointGroups.Add("Example Point Group2") 4Dim pointGroup As PointGroup = TryCast(pointGroupId.GetObject(OpenMode.ForWrite), PointGroup) 5 6Dim customQuery As 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}" & vbLf, pointGroup.PointsCount)