- 积分
- 438
- 明经币
- 个
- 注册时间
- 2008-5-20
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
在vb6.0 里的代码为如下:
Public Function shanghai (ByVal doccument As AcadDocument, ByVal ptSt As Variant, ByVal ptEn As Variant) As AcadLine
Set shanghai = Document.ModelSpace.AddLine(ptSt, ptEn)
End Function
生成dll后(工程名为STX1,类模块名为SUZHOU1)
在AutoCADvba中的代码为:
Public shimadongxi As New STX1.SUZHOU1
Sub line()
Dim pt1(0 To 2) As Double
Dim pt2(0 To 2) As Double
Dim objline As AcadLine
pt1(0) = 10
pt1(1) = 10
pt1(2) = 0
pt2(0) = 150
pt2(1) = 100
pt2(2) = 0
Set objline = shimadongxi.shanghai(ThisDrawing, pt1, pt2)
End Sub
报错如下:compile error Expected: (
|
|