Find blocks in drawing and plot them

Discussion in 'AutoCAD' started by Leveritt, May 7, 2004.

  1. Leveritt

    Leveritt Guest

    Does anyone have a lisp routine that will find blocks in a drawing and
    print each of them individually?

    Our standard procedure is to have only one drawing per project.
    Therefore, each drawing will have several borders which are each plotted
    by window. Is it possible to have a lisp find each border and print
    them without intervention on my part?

    Thanks for any help in advance,
    Harold
     
    Leveritt, May 7, 2004
    #1
  2. Leveritt

    ECCAD Guest

    Harold,
    I think you can do it. Create a Lisp program that checks for the border (blockname). When found, calculate the Window points for the plot - based on the insertion point of the border. Then, issue a (command "Plot" "W" P1 P2 ...) where P1 is a point just outside the border upper left corner, and P2 is a point just outside the boarer lower right. The insertion point for the border can be obtained from (cdr (assoc 10) border_entity), and P1 could be something like..
    (setq P1 (list (- (car IP) 0.10)(+ (cadr IP) 24.10)))
    where IP is the border insertion point. Loop for each border found. Give it a whirl.
    Bob
     
    ECCAD, May 8, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.