- UID
- 46
- 积分
- 1317
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-9
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
选择集中的图元读取例子:
注意:读取后其,本身有的属性和方法都可用
程序不一定自己响应,要自己输入
看一下版主的有关 Variant的讨论!
Sub Example_Item()
' This example show two uses of the Item method.
' The first uses Item with an index counter to return an item in a collection.
' The second uses Item with a string to return an item in a collection.
' Iterate thru the model space collection,
' get all the items in the collection
' and store them in an array called newObjs
Dim count As Integer
count = ThisDrawing.ModelSpace.count
ReDim newObjs(count) As AcadEntity
Dim index As Integer
For index = 0 To count - 1
Set newObjs(index) = ThisDrawing.ModelSpace.Item(index)
Next
' Get a particular item, in this case a layer, based on name "0"
Dim layerObj As AcadLayer
Set layerObj = ThisDrawing.Layers.Item("0")
End Sub |
|