DK for ActiveX | TatukGIS_XDK11.ITGIS_Shape.GetNumParts | Methods | Properties
Return the number of geometry parts in the shape.
// C# public int GetNumParts();
' VisualBasic Public Function GetNumParts() As Integer
// Oxygene public function GetNumParts : Integer;
| Type | Description |
|---|---|
| int Integer | Number of parts in the shape. Returns 0 for an empty shape. |
PURPOSE: Reports how many distinct geometry parts the shape contains, such as separate line segments, polygon rings, or disconnected multipart components.
BEHAVIOR: Returns the current part count maintained by the shape geometry. Multipart features return more than one part, while simple single-part shapes usually return one.
USAGE: Use this method before iterating part-by-part through multipart lines, polygons with holes, or other composite vector geometry.
CONSTRAINTS: Read-only value. Virtual method.