Makro rysujące kwadrat z polilinii przez punkty w 2D
Public Sub kwadrat_polilinia()
Dim kwadrat_polilinia As ZwcadPolyline
Dim points(0 To 14) As Double
points(0) = 0: points(1) = 0: points(2) = 0
points(3) = 0: points(4) = 50: points(5) = 0
points(6) = 50: points(7) = 50: points(8) = 0
points(9) = 50: points(10) = 0: points(11) = 0
points(12) = 0: points(13) = 0: points(14) = 0
Set kwadrat_polilinia = ThisDocument.ModelSpace.AddPolyline(points)
kwadrat_polilinia.Update
kwadrat_polilinia.Color = zcMagenta
End Sub