本帖最后由 efan2000 于 2014-3-18 16:00 编辑
- Dim track As Integer
- track = 1
- Dim t As Integer
- Dim result As ResultBuffer = New ResultBuffer
- Dim r As Integer
- While track <> 0
- r = mcnetarx.GlobalFunctions.AcedGrRead(track, t, result)
- If r <> 5100 Then
- Exit While
- End If
- If t = 3 Then
- track = 0End If
- If t <> 5 Then
- Exit While
- End If
- End While
t=3是点击鼠标右键时返回的类型
t=5是返回鼠标位置的类型- Dim tvs() As TypedValue = result.AsArray()
- If tvs(0).TypeCode = 5009 Then
- Dim p As Point3d = tvs(0).Value
- e.WriteMessage(p.X & ", " & p.Y & ", " & p.Z)
- End If
如果类型码是5009,即RT3DPOINT,就是点的坐标值了。
调用库地址
|