Sets the Point Group query object.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
Remarks
Examples
CopyC#
1
2
3 ObjectId pointGroupId = _civildoc.PointGroups.Add("Example Point Group");
4 PointGroup pointGroup = pointGroupId.GetObject(OpenMode.ForWrite) as PointGroup;
5
6 StandardPointGroupQuery standardQuery = new StandardPointGroupQuery();
7
8
9 standardQuery.IncludeElevations = "100-200";
10 standardQuery.IncludeFullDescriptions = "BRK*";
11 standardQuery.IncludeNames = "GRND*";
12 standardQuery.IncludeNumbers = "1000,1050,1075,>2000";
13 standardQuery.IncludeRawDescriptions = "BRK*";
14
15
16 standardQuery.ExcludeElevations = ">300";
17 standardQuery.ExcludeFullDescriptions = "FLOW*";
18 standardQuery.ExcludeNames = "FLOW";
19 standardQuery.ExcludeNumbers = "<300";
20 standardQuery.ExcludeRawDescriptions = "TREES";
21
22
23 standardQuery.UseCaseSensitiveMatch = false;
24
25
26 pointGroup.SetQuery(standardQuery);
27
28
29 PointGroupChangeInfo pointGroupChange = pointGroup.GetPendingChanges();
30 _editor.WriteMessage("# Points to add: {0}\n# Points to remove: {1}\n",
31 pointGroupChange.PointsToAdd.Length, pointGroupChange.PointsToRemove.Length);
32
33
34 pointGroup.Update();
35
36
37 _editor.WriteMessage("# matched points: {0}\n",
38 pointGroup.PointsCount);
CopyVB.NET
1
2
3Dim pointGroupId As ObjectId = _civildoc.PointGroups.Add("Example Point Group")
4Dim pointGroup As PointGroup = TryCast(pointGroupId.GetObject(OpenMode.ForWrite), PointGroup)
5
6Dim standardQuery As New StandardPointGroupQuery()
7
8
9standardQuery.IncludeElevations = "100-200"
10standardQuery.IncludeFullDescriptions = "BRK*"
11standardQuery.IncludeNames = "GRND*"
12standardQuery.IncludeNumbers = "1000,1050,1075,>2000"
13standardQuery.IncludeRawDescriptions = "BRK*"
14
15
16standardQuery.ExcludeElevations = ">300"
17standardQuery.ExcludeFullDescriptions = "FLOW*"
18standardQuery.ExcludeNames = "FLOW"
19standardQuery.ExcludeNumbers = "<300"
20standardQuery.ExcludeRawDescriptions = "TREES"
21
22
23standardQuery.UseCaseSensitiveMatch = False
24
25
26pointGroup.SetQuery(standardQuery)
27
28
29Dim pointGroupChange As PointGroupChangeInfo = pointGroup.GetPendingChanges()
30_editor.WriteMessage("# Points to add: {0}" & vbLf & "# Points to remove: {1}" & vbLf, pointGroupChange.PointsToAdd.Length, pointGroupChange.PointsToRemove.Length)
31
32
33pointGroup.Update()
34
35
36_editor.WriteMessage("# matched points: {0}" & vbLf, pointGroup.PointsCount)
Exceptions
Exception | Condition |
---|
[!:Autodesk::Civil::DatabaseServices::PointGroupQueryInvalidPointGroupValueException] |
Thrown when the query object uses a point group that does not exist or refers
to the same point group where the query is being set.
|
[!:Autodesk::Civil::DatabaseServices::PointGroupParserError] |
Thrown when the query does not match the supported syntax of the query object.
|
System..::..ArgumentException |
Thrown when the current point group is the "_AllPoints" group, since its query
cannot be modified.
|
System..::..ArgumentNullException |
Thrown if the query object specified is null.
|
See Also