bossda 发表于 2004-11-22 16:31:00

此lisp语句用vba怎样实现,谢谢啊!

(defun c:G7 ()<BR>       (sslength (ssget       '((0 . "TEXT")(62 . 1)(1 . "7"))))<BR>)

mccad 发表于 2004-11-22 21:27:00

Sub G7()
       Dim varType(2) As Integer
       Dim VarData(2) As Variant
       varType(0) = 0: varType(1) = 62: varType(2) = 1
       VarData(0) = "TEXT": VarData(1) = 1: VarData(2) = "7"
       On Error Resume Next
       Dim SSet As AcadSelectionSet
       ThisDrawing.SelectionSets("mccad").Delete
       Set SSet = ThisDrawing.SelectionSets.Add("mccad")
       SSet.SelectOnScreen varType, VarData
       Dim Num As Long
       Num = SSet.Count
End Sub
页: [1]
查看完整版本: 此lisp语句用vba怎样实现,谢谢啊!