Count and Item Properties example
Sub Count_Example()
Dim ents As Object
Dim ent As AcadEntity
Dim ct As Long
Set ents = ActiveDocument.ModelSpace
ct = ents.count
MsgBox "No. of entities = " & ct
Set ent = ents.Item(ct - 1)
MsgBox "Color of this entity is now: " & ent.Color
ent.Color = 3
MsgBox "Color of this entity has been changed to: " & ent.Color
ent.Update
End Sub
Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV
are fully owned subsidiaries of Menhirs NV. Copyright ©
2001- Menhirs NV - All rights reserved. |