EKL Delete the Contents of a Geometrical Set

Print Friendly, PDF & Email

EKL Delete the Contents of a Geometrical Set

Setting Up the Action

To do this we will cerate an Action, that has three inputs. These will be an input Geometrical Set, an input Message to be displayed for Logging and an input Boolean to define if the input Message should be logged.

Action Body

First we’ll check to see if the Geometrical Set contains any features by getting the count of the children, using the Size method. if there are any children, we log the number of elements being deleted if the logging is turned on ( if the input Boolean is True), using the input Message. Then we’ll loop through each feature, deleting each one in turn.

/* Action created by me 1/24/2020 */

Let GeoSetFeature ( Feature )

If iGeoSet.Children->Size() > 0
{
	If iTracingOnOff == True{Trace( 3,iMessage, iGeoSet.Children->Size())}
    
	For GeoSetFeature inside iGeoSet.Children 
	{
		GeoSetFeature.Delete()
	}
}