biluobinglun 发表于 2009-9-24 20:38:00

[求助]

Private Function gettitlebar() As AcadBlockReference
Dim blkref As AcadBlockReference
For Each blkref In ThisDrawing.modelspace
If StrComp(blkref.Name, "标题栏") = 0 Then
Set gettitlebar = blkref
Exit Function
End If
Next blkref
End Function
For Each blkref In ThisDrawing.modelspace这句总是类型不匹配 应该怎么改啊

mccad 发表于 2009-9-24 21:36:00

不能把blkref 定义成块引用,而应该是图元。

biluobinglun 发表于 2009-9-24 21:43:00

这是您书里的源代码,我运行的时候就给出类型不匹配的提示啊
页: [1]
查看完整版本: [求助]