wholin 发表于 2006-8-16 17:11:00

看看下面的阵列所选文本的代码错在那里?

Dim TextSSet As AcadSelectionSet
            
      ThisDrawing.Utility.Prompt vbCr & "选择单行文字:"
      TextSSet.SelectOnScreen
      
      Dim RetVal As Variant
      RetVal = TextSSet.ArrayRectangular(4, 4, 1, 10, 10, 1)
运行后报什么:运行时错误'91',对象变量或with块变量未设置.

wyj7485 发表于 2006-8-16 18:41:00

On Error Resume Next
Dim TextSSet As AcadSelectionSet
            
      ThisDrawing.Utility.Prompt vbCr & "选择单行文字:"
ThisDrawing.SelectionSets.Item("TextSSet ").Delete
Set TextSSet = ThisDrawing.SelectionSets.Add("TextSSet ")

      TextSSet.SelectOnScreen
      
      Dim RetVal As Variant
      RetVal = TextSSet.ArrayRectangular(4, 4, 1, 10, 10, 1)

雪山飞狐_lzh 发表于 2006-8-17 10:07:00

选择集没有ArrayRectangular方法!
页: [1]
查看完整版本: 看看下面的阵列所选文本的代码错在那里?