cad二次开发

along7599 along7599 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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
...全文
评论 5
收藏 已收藏
分享
返回顶部
along7599
VBA 2,506 成员 10,830 内容