- 积分
- 2943
- 明经币
- 个
- 注册时间
- 2003-11-3
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2003-11-13 18:18:00
|
显示全部楼层
问题已然存在,只是做别的命令时没关系,但如果是设置的命令就会出错,应该是这里还要改。 要把i也设过。
Dim i As Integer
Dim NewLayerName As String
Dim j As Integer
Dim NewLayerColor As Integer
For j = LBound(LayerSet, 2) To UBound(LayerSet, 2)
If UCase(CommandName) Like LayerSet(0, j) Then
NewLayerName = LayerSet(1, j)
NewLayerColor = CVar(LayerSet(2, j))
CreateLayer NewLayerName, NewLayerColor
If ThisDrawing.ModelSpace.Count > EntCount Then
For i = EntCount To ThisDrawing.ModelSpace.Count - 1
Set NewEnt = ThisDrawing.ModelSpace.Item(i)
NewEnt.Layer = NewLayerName
Next
End If
Exit For
End If
Next |
|