明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1292|回复: 1

求教

[复制链接]
发表于 2004-8-15 18:23:00 | 显示全部楼层 |阅读模式
请大家帮我看看这多代码有什么问题,为什么说类型不匹配啊 Public Sub ext()
Dim pt(5) As Double
Dim objpline As Acad3DPolyline
pt(0) = 100
pt(1) = 200
pt(2) = 300
pt(3) = 100
pt(4) = 200
pt(5) = 800
Set objpline = ThisDrawing.ModelSpace.Add3DPoly(pt)
objpline.color = acGreen
Dim objlist(0) As AcadEntity
Dim ptcen(2) As Double
ptcen(0) = 100
ptcen(1) = 200
ptcen(2) = 300
Set objlist(0) = ThisDrawing.ModelSpace.AddCircle(ptcen, 50)
Dim objregion As Variant
Set objregion = ThisDrawing.ModelSpace.AddRegion(objlist)
Dim objsolid As Acad3DSolid
Set objsolid = ThisDrawing.ModelSpace.AddExtrudedSolidAlongPath(objregion(0), objpline)
ZoomExtents
End Sub
发表于 2004-8-15 18:37:00 | 显示全部楼层
Set objregion = ThisDrawing.ModelSpace.AddRegion(objlist)
改为
objregion = ThisDrawing.ModelSpace.AddRegion(objlist)
注意不是对象不能用Set
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-28 02:40 , Processed in 0.154485 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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