cad二次开发
Dim AcadApp As AcadApplication
Dim CarObj As AcadSolid
Function Car(x)
Dim Pt1(0 To 2), Pt2(0 To 2), Pt3(0 To 2), Pt4(0 To 2) As Double
Pt1(0) = x(0) - 0.25: Pt1(1) = x(1) + 0.25: Pt1(2) = 0
Pt2(0) = x(0) + 0.25: Pt2(1) = x(1) + 0.25: Pt2(2) = 0
Pt3(0) = x(0) - 0.25: Pt3(1) = x(1) - 0.25: Pt3(2) = 0
Pt4(0) = x(0) + 0.25: Pt4(1) = x(1) - 0.25: Pt4(2) = 0
Set CarObj = AcadApp.ActiveDocument.ModelSpace.AddSolid(Pt1, Pt2, Pt3, Pt4)运行的时候这里提示无效的过程调用或参数,应该怎么改?
CarObj.Color = acBlue
End Function