wei209 发表于 2005-10-7 22:29:00

ELEVATION值加常数

Dim acadDoc As AcadDocument
Set acadDoc = acadApp.ActiveDocument
On Error Resume Next
Dim entity As AcadObject
Dim i As Integer
Dim j As Integer
Dim rr As Integer
rr = Text1.Text
If acadDoc.ModelSpace.Count0 Then
i = acadDoc.ModelSpace.Count
For j = 0 To i - 1
    Set entity = acadDoc.ModelSpace.Item(j)
    If entity.Layer = "DGX" Or entity.Layer = "dgx" Then
      entity.Elevation = entity.Elevation + rr
      entity.Update
    End If
Next j
Else
MsgBox "在模型空间中没有对象存在。"
End If
MsgBox "完成"
End Sub
问题:1.反映太慢没有LISP快
   2.不知道处理到第几根线了
想法:请高手加上点,让处理线时有个进度条显示!

mccad 发表于 2005-10-9 06:41:00

使用选择集可以相对快点。
进度条可以使用对话框的形式,选择集的数量为100%,循环过程中按数量计算到多少了。
页: [1]
查看完整版本: ELEVATION值加常数