Dla ZWCAD+ konieczne jest kilka zmian:
1. Zmienione zostały typy obiektów np: ZwcadEntity na ZcadEntity itd
2. ThisDocument zmieniono na ThisDrawing
3. Stałe określające typy obiektów: zcLWPolyline na zcPolylineLight
Public Sub si()
Dim pole, pole1 As Double
Dim i, m As Integer
Dim sel As ZcadSelectionSet
Dim SelEntity As ZcadEntity
Dim kwadrat As ZcadLWPolyline
Dim fild As ZcadText
Dim ip
Dim slajd As String
On Error Resume Next
Set sel = ThisDrawing.SelectionSets.Item("ss")
If Not (sel Is Nothing) Then sel.Delete
On Error GoTo 0
Set sel = ThisDrawing.SelectionSets.Add("ss")
sel.SelectOnScreen
m = sel.Count
For i = 0 To m - 1
Set SelEntity = sel.Item(i)
If SelEntity.EntityType = zcPolylineLight Then
Set kwadrat = SelEntity
pole1 = kwadrat.Area
Else
pole1 = 0
End If
pole = pole + pole1
slajd = ThisDrawing.Utility.RealToString(pole, zcDecimal, 2)
Next
MsgBox slajd
ip = ThisDrawing.Utility.GetPoint(, "Wstaw")
ip(1) = ip(1) + 0.1
Set fild = ThisDrawing.ModelSpace.AddText(slajd, ip, 0.2)
ThisDrawing.Regen (zcActiveViewport)
End Sub
Proszę jeszcze o podanie vernum programu, który Pan używa.