API Documentation > CorelDRAW > 2025-v26 > Polygon > IVGPolygon
Polygon.Type property
Gets or sets the type of polygon
Syntax:
Property Get Type() As cdrPolygonType
Property Let Type(ByVal Value As cdrPolygonType)
Remarks:
The Type property returns or specifies the type of polygon. This property returns a value of cdrPolygonType. The following code converts, to stars, all polygons that have more than four sides. [code] Sub Test() Dim s As Shape For Each s In ActivePage.Shapes If s.Type = cdrPolygonShape Then If s.Polygon.Type = cdrPolygon And s.Polygon.Sides > 4 Then s.Polygon.Type = cdrStar s.Polygon.Sharpness = 1 End If End If Next s End Sub [/code]