- 积分
- 541
- 明经币
- 个
- 注册时间
- 2004-3-26
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2005-1-2 20:43:00
|
显示全部楼层
谢谢!我已经解决了
Public Function Fun点在指定区域内(ByVal ePnt As Variant, ByVal objPnt As AcadEntity) As Boolean Dim L As Integer, I As Integer, xPnt As Variant, sPnt(2) As Double, iPnt As Variant, xLine As AcadLine sPnt(0) = -99999: sPnt(1) = -99999 Set xLine = ThisDrawing.ModelSpace.AddLine(sPnt, ePnt) xPnt = objPnt.IntersectWith(xLine, acExtendNone) xLine.Delete: I = UBound(xPnt) I = Int(I / 3) + 1 L = I - Int(I / 2) * 2 If L = 0 Then Fun点在指定区域内 = False Else Fun点在指定区域内 = True End Function |
|