创建对象
Sub Ch2_FindFirstEntity()
'
本例返回模型空间中的第一个图元
On Error Resume Next
Dim entity As AcadEntity
If ThisDrawing.ModelSpace.count <> 0 Then
Set entity = ThisDrawing.ModelSpace.Item(0)
MsgBox entity.ObjectName + _
" is the first entity in model space."
否则MsgBox "There are no objects in model space."
End If
End Sub
Sub Ch2_IterateLayer()
&#039;
本例遍历集合,并显示集合中所有图层的名称:
On Error Resume Next
Dim I As Integer
Dim msg As String
msg = ""
For I = 0 To ThisDrawing.Layers.count - 1
msg = msg + ThisDrawing. ...


雷达卡


京公网安备 11010802022788号







