明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1464|回复: 3

请教这段代码中的问题

[复制链接]
发表于 2004-5-10 17:24:00 | 显示全部楼层 |阅读模式
Dim d As Double
Dim l As Double
Dim lineent1 As AcadLine
Dim lineent2 As AcadLine
Dim l1 As AcadLine
Dim l2 As AcadLine
For i = 0 To vliness.Count - 2
For Each lineent1 In allentss
If (lineent1.StartPoint(0) = intPointarr(i) Or lineent1.EndPoint(0) = intPointarr(i)) And lineent1.StartPoint(1) = lineent1.EndPoint(1) And lineent1.StartPoint(1) < Centeryy Then
Set l1 = lineent1
End If
Next 'type mismatch ????
For Each lineent2 In allentss
If (lineent2.StartPoint(0) = intPointarr(i) Or lineent2.EndPoint(0) = intPointarr(i)) And lineent2.StartPoint(1) = lineent2.EndPoint(1) And lineent2.StartPoint(1) > Centeryy Then
Set l2 = lineent2
End If
Next
d = Sqr((l1.StartPoint(0) - l1.EndPoint(0)) ^ 2 + (l1.StartPoint(1) - l1.EndPoint(1)) ^ 2)
l = Abs((l1.StartPoint(1) - Centeryy) * 2)
Next
发表于 2004-5-10 18:38:00 | 显示全部楼层
把问题提出来啊,不然还得麻烦别人从头看到尾,不好意思吧?
 楼主| 发表于 2004-5-10 20:20:00 | 显示全部楼层
红色部分啊 运行到这里提示 type mismatch
发表于 2004-5-10 23:13:00 | 显示全部楼层
allentss是什么东东?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-28 06:31 , Processed in 0.143361 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表