高手门如何用VB封装下面代码为dll 并调用 谢谢
Public Sub TestAddArc()Dim varCenter As Variant
Dim dblRadius As Double
Dim dblStart As Double
Dim dblEnd As Double
Dim objEnt As AcadArc
On Error Resume Next
'' get input from user
With ThisDrawing.Utility
varCenter = .GetPoint(, vbCr & "Pick the center point: ")
dblRadius = .GetDistance(varCenter, vbCr & "Enter the radius: ")
dblStart = .GetAngle(varCenter, vbCr & "Enter the start angle: ")
dblEnd = .GetAngle(varCenter, vbCr & "Enter the end angle: ")
End With
'' draw the arc
If ThisDrawing.ActiveSpace = acModelSpace Then
Set objEnt = ThisDrawing.ModelSpace.AddArc(varCenter, dblRadius, _
dblStart, dblEnd)
Else
Set objEnt = ThisDrawing.PaperSpace.AddArc(varCenter, dblRadius, dblStart, dblEnd)
End If
objEnt.Update
End Sub <CAD VBA二次开发教程>
<AutoCAD VBA开发精彩实例教程> 10.6使用DLL保护程序
华夏土地网:http://bbs.hxland.com/thread-7419677-1-1.html pmq 发表于 2015-2-14 21:30 static/image/common/back.gif
10.6使用DLL保护程序
华夏土地网:http://bbs.hxland.com/thread-7419677-1-1.html
D:\DLL\ERROR.png
@pmq 谢谢你的指导我试了一下, 提示错误见附图 。我的系统是win7 vb6.0 AUTOCAD2014 图没附上刚才
页:
[1]