复制代码
Public Sub GetVertexs()
If StartAcad Then
Dim vlax As cVLAX
Dim ent As AcadEntity, p As Variant, arrVertexs As Variant, i As Integer
Dim xdt As Variant, xdv As Variant
Dim Vertexs() As TVertex
Set vlax = New cVLAX
vlax.Initialize Application
On Error Resume Next
ThisDrawing.Utility.GetEntity ent, p, "请选择多段线对象:"
If Err.Number 0 Then Exit Sub
On Error GoTo 0
arrVertexs = vlax.GetVertexs(ent.Handle)
If IsEmpty(arrVertexs) = False Then
ReDim Vertexs(UBound(arrVertexs))
For i = 0 To UBound(arrVertexs)
Set ent = arrVertexs(i)
Debug.Print ent.ObjectName & "-->" & ent.Handle
ent.GetXData "", Vertexs(i).xDataType, Vertexs(i).xDataValue
Next i
Else
MsgBox "请选择有节点对象的多段线:"
Exit Sub
End If
Set vlax = Nothing
Debug.Assert False '停在这里可以查本地窗口的Vertexs变量值,调试完成此行注释掉
End If
End Sub
这一段怎么放到 vb6.0里运行??? Dim vlax As cVLAX 声明未定义?vb6.0已后期绑定CAD了! 怎么把这一段代码, 放到vb6.0里运行???
请教高手