I'm using Autocad 2002 and I'm looking for a routine (preferably lisp) in which I can select all titleblocks within a drawing and automate the creation of separately named views by obtaining the border boundaries of each block. The title blocks are created in model space, are not always scaled the same, are each a block itself made of polylines, and are in one of the 4 cardinal directions (0, 90, 180, 270 degrees). I would like the routine to automatically name the first title block view "1" then repeat to allow the selection of the next titleblock to automatically name it "2". This process should repeat until all title blocks have been selected. It has been suggested I calculate the viewpoint corners based off the insert point of the titleblock and just add the appropriate amount to the insert point's X and Y values. Or try getting the bounding box info of the block via Visual Lisp. The block name for the 1st view is called x-refbtitle1 and all other blocks are named x-refbtitle2 . All titleblocks use attributes which include page numbers. For page numbers on titleblock1 we use the tag "pg1"; for all other ttile blocks we use "pg" as the tag. I'm looking to get away from the manual selections required for such a task. In short each title block will have it's own view and be named in order (1, 2, 3, ETC.) without the repetition of manually creating named views accordingly.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
## Platform
windows XP