找極點
根據選擇的List得到所選圖形中的最高點和最低點,返回一條線段Private Function GetMaxAndMinPoint(List As VISIList, Blist As VISIList) As VISISegment
Dim el As New VISIElement
Dim el1 As New VISIElement
Dim geo As New VISIGeo
Dim db As New VISIDatabase
Dim Elist As New VISIList
Dim SegmAs New VISISegment
Dim count As Long
count = List.count
Elist.Init 10, LTYPE_ELEM
For i = 1 To count
db.WorkDBKey = List.Item(i)
db.GetElement
Elist.AddItem db.WorkElement
Next i
el.Type = DB_POINT
el1.Type = DB_POINT
geo.OperationCode = VGEO_BOUNDINGBOX
geo.elementlist = Elist
geo.BodyList = Blist
geo.Execute
If (geo.LastError = V_NOERROR) Then
Set el = geo.result.Item(1)
Segm.P1.Put el.Data.x, el.Data.y, el.Data.z
Set el1 = geo.result.Item(2)
Segm.P2.Put el1.Data.x, el1.Data.y, el1.Data.z
End If
Set GetMaxAndMinPoint = Segm
End Function
VISIElement,VISIList是什么?
页:
[1]