home *** CD-ROM | disk | FTP | other *** search
- ' This BasicCAD macro cycles through the entire drawing,
- ' and counts the # of circles on Layer 12
- '
- b = 0
- ' Loop through every object in the drawing
- ' sys(9) is the number of entities in the drawing
- for j = 1 to sys(9)
- ' Get the Attributes of the current item
- getattr j, type, select, laynum, group, red, green, blue
- ' if the Item is on Layer 12 then . . .
- if laynum = 12 then
- ' If the item is a circle
- if type = 16 then
- b = b + 1
- endif
- endif
- ' Done with that object, loop back to select the next one
- next
- ' Display Results
- Message "# of Circles on Layer 12: ", b
- ' finished with every object in drawing, end program
- end
-
-