求教
请大家帮我看看这多代码有什么问题,为什么说类型不匹配啊Public Sub ext()<BR>Dim pt(5) As Double<BR>Dim objpline As Acad3DPolyline<BR> pt(0) = 100<BR> pt(1) = 200<BR> pt(2) = 300<BR> pt(3) = 100<BR> pt(4) = 200<BR> pt(5) = 800<BR> Set objpline = ThisDrawing.ModelSpace.Add3DPoly(pt)<BR> objpline.color = acGreen<BR>Dim objlist(0) As AcadEntity<BR>Dim ptcen(2) As Double<BR> ptcen(0) = 100<BR> ptcen(1) = 200<BR> ptcen(2) = 300<BR> Set objlist(0) = ThisDrawing.ModelSpace.AddCircle(ptcen, 50)<BR>Dim objregion As Variant<BR> Set objregion = ThisDrawing.ModelSpace.AddRegion(objlist)<BR>Dim objsolid As Acad3DSolid<BR> Set objsolid = ThisDrawing.ModelSpace.AddExtrudedSolidAlongPath(objregion(0), objpline)<BR>ZoomExtents
<BR>End Sub<BR>?
Set objregion = ThisDrawing.ModelSpace.AddRegion(objlist)<BR>改为<BR>objregion = ThisDrawing.ModelSpace.AddRegion(objlist)<BR>注意不是对象不能用Set
页:
[1]