ポイント グループを使用する

ポイント グループが作成されたら、そのグループ内のすべてのポイントに対して 1 つの操作でアクションを実行できます。ポイントの標高、説明、スタイル、およびラベル スタイルを変更することができます。

// Check to see if a particular point exists in the PointGroup
ObjectId pointId = promptForEntity("Select a point", typeof(CogoPoint));
CogoPoint cogoPoint = pointId.GetObject(OpenMode.ForRead) as CogoPoint;

if (pointGroup.ContainsPoint(cogoPoint.PointNumber){
    _editor.WriteMessage("Point {0} is part of PointGroup {1}",
        cogoPoint.PointName, pointGroup.Name);
}

// Set the elevation of all points in the PointGroup to 100
pointGroup.ElevationOverride.FixedElevation=100;
pointGroup.ElevationOverride.ActiveOverrideType = PointGroupOverrideType.FixedValue;
pointGroup.IsElevationOverriden = true;

また、ポイント グループを使用して TIN サーフェスを定義または変更できます。TinSurface.PointGroupsDefinition プロパティは、ポイント グループのコレクションです。ポイント グループがコレクションに追加されると、そのグループ内のすべてのポイントが TIN サーフェスに追加されます。