Thanks a lot.
so if i want to make use of collectionlike objects, i have to use,as you
said,
XRecord,xdata,dictionary,group , or , database ,
is that so,
best regards
"Paul Richardson" wrote in message
news:5189008@discussion.autodesk.com...
no a Collection is not saved with the drawing. An XRecord
is saved in the drawing, or you an use an external flat file or
database.
--
gl - Paul
"youngman" wrote in message
news:5188916@discussion.autodesk.com...
but how to use a collection,
if it is save as a part of a drawing and will be got ever since
thanks
"Paul Richardson" wrote in message
news:5188242@discussion.autodesk.com...
Here is a Collection sample. Check out a Scripting.Dictionary also.
To add the layers in the drawing just iterate ThisDrawing.Layers
similar to the way I did the Layouts.
[code]
Sub stub()
Dim coll As New Collection
Dim layout As AcadLayout
Dim ent As AcadEntity
'add all entities in all layouts to a collection
For Each layout In ThisDrawing.Layouts
For Each ent In layout.Block
coll.Add ent, ent.Handle
Next ent
Next layout
Dim entBlock As AcadBlock
'print all entities in the collection
'and the block they reside in
For Each ent In coll
Set entBlock = ThisDrawing.ObjectIdToObject(ent.OwnerID)
Debug.Print ent.ObjectName & " " & entBlock.Name
Next ent
End Sub
[/code]
--
gl - Paul
wrote in message news:5188195@discussion.autodesk.com...
I want to build a collection based on drawing's objects, but of several
types (circles, lines, polyline....) and layers.