RemoveGeometry Method

Removes a geometry with the specified index from the geometry collection of the shape, and returns the number of remaining geometries.

Applies to: Shape object

Syntax

[[Let] countRet =] object.RemoveGeometry ( index )

The RemoveGeometry method syntax has these parts:

Part Description
object

Required. An expression that returns a Shape object.

index Required. An expression that returns a Long value. The index of the geometry in the geometry collection of the shape.
countRet Optional. An Long type variable.

Remarks

If index is less than 1 or greater than the number of geometries of the shape, the RemoveGeometry method doesn't delete anything and returns the current number of geometries of the shape. To find out the number of geometries of the shape, use the GeometriesNum method.

 

See Also

AddGeometry method, GeometriesNum method, Geometry method, Geometry object