Message 1 of 11
VBA and attributed blocks II

Not applicable
01-06-2006
09:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi again! (continuation of my ealier post 'VBA and attributed blocks' - - - I need to start with a clean sheet!!!)
I have an unknown number of RoomData blocks within a drawing.
Each one is uniquely identified by a ROOMNUM attribute (e.g. 001 thru 999).
But, the blocks may not necessarily be identified consequitively. e.g total count of 8 blocks,
numbered 001, 002, 003, 004, 007, 008, 009, 010. (numbers 005, 006 missing).
Each block is also grouped within different buildings and this is identified by a
BLOCKNAME attribute (e.g. 01 thru 99).
Eack block also has an AREA attribute (e.g. 45.0)
The aim of the game is to be able to:
i) count the total number of RoomData blocks **DONE**
ii) find the highest value of the ROOMNUM attribute
iii) find, if any, the missing ROOMNUM attributes in the sequence
(as in the above example this would be 005 & 006)
iv) sum all the AREA attributes. **DONE**
v) count the number of RoomData blocks per BLOCKNAME attribute.
(e.g. 001, 002, 003, 004 have BLOCKNAME value of 01 and
007, 008, 009, 010 have BLOCKNAME value of 02)
vi) sum the AREA attributes per BLOCKNAME attribute.
(e.g sum of AREA values for 001, 002, 003, 004 and
sum of AREA values for 007, 008, 009, 010)
The most important bit I need to sort out is summing the Area attributes per BLOCKNAME (vi).
Thanks very much to all those who replied to my previous thread and look forward to hearing from you!
Many thanks,
Dom
I have an unknown number of RoomData blocks within a drawing.
Each one is uniquely identified by a ROOMNUM attribute (e.g. 001 thru 999).
But, the blocks may not necessarily be identified consequitively. e.g total count of 8 blocks,
numbered 001, 002, 003, 004, 007, 008, 009, 010. (numbers 005, 006 missing).
Each block is also grouped within different buildings and this is identified by a
BLOCKNAME attribute (e.g. 01 thru 99).
Eack block also has an AREA attribute (e.g. 45.0)
The aim of the game is to be able to:
i) count the total number of RoomData blocks **DONE**
ii) find the highest value of the ROOMNUM attribute
iii) find, if any, the missing ROOMNUM attributes in the sequence
(as in the above example this would be 005 & 006)
iv) sum all the AREA attributes. **DONE**
v) count the number of RoomData blocks per BLOCKNAME attribute.
(e.g. 001, 002, 003, 004 have BLOCKNAME value of 01 and
007, 008, 009, 010 have BLOCKNAME value of 02)
vi) sum the AREA attributes per BLOCKNAME attribute.
(e.g sum of AREA values for 001, 002, 003, 004 and
sum of AREA values for 007, 008, 009, 010)
The most important bit I need to sort out is summing the Area attributes per BLOCKNAME (vi).
Thanks very much to all those who replied to my previous thread and look forward to hearing from you!
Many thanks,
Dom