Re: baidarka tile printing from Cad with Lisp


Subject: Re: baidarka tile printing from Cad with Lisp
From: Paul Raymond (kayaker37@hotmail.com)
Date: Fri Dec 29 2000 - 10:03:48 EST


Here is a short lisp program that will break up any drawing automatically
into saved views from which you can then print out. You should still
manually add an alignment grid.

To use, set Intellicad to Advanced user level under Tools, Options. Then
under tools click on Load Lisp Application. Find and highlight tile.lsp and
press load. To use type tile at the command prompt.

Using "1830 paddle longer than original grid.dxf" as an example open the
drawing, and load tile.lsp. Type zoom, then "e" for extents. Then type tile,
which will prompt you for a point. Type "int" (for intersection) and click
on the intersection of the lower left corner. You are prompted for a second
point. Type "int" and select the intersection of the upper right corner. You
are prompted for tile width. Try 10 for landscape mode. You are promped for
tile height. Try 7. Set up your printer for landscape mode, set scale 1 to 1
and print out saved views.

Cut and paste this and save as tile.lsp
Beware of line wrap causing the program not to function when you paste,
especially the area between the "while" and "close f". These should be
nicely indented, so if a line is all the way to the left, go to the end of
the previous line and press delete to bring back. Note there are some " "
that need the space in between.

;==============================================================
;Program for printing large drawings on a laser printer
;By Ilgiz R. Baitimetov, Bashkiriya, Sterlitamak
;Fido: 2:5011/206.0 E-mail mtezil@str.bashnet.ru
;minor changes Dec 28 2000 to break large drawings into saved views
;in order to print from IntelliCAD 2000 by kayaker37
;==============================================================
(defun c:tile( / f)
(command "setvar" "cmdecho" 0)
(command "setvar" "cmddia" 0)
(terpri)
(princ "Tile window:")
(terpri)
(setq $pt01 (getpoint "\nFirst point :")) ;first point
(setq $pt02 (getcorner $pt01 "\nSecond point :")) ;second point
(setq nomer 0)
(initget 7)
(setq dlinax (getint "\nEnter tile width: "))
;(setq dlinax 10)
(setq dlinay (getint "\nEnter tile height: "))
;(setq dlinay 7)
(initget 6)
;(setq Scale (getreal "\nScale <1>:"))
(if (not scale) (setq scale 1))
(IF (< (car $pt01) (car $pt02))
   (setq $bufxn (car $pt01) $bufxk (car $pt02))
   (setq $bufxn (car $pt02) $bufxk (car $pt01))
)
(IF (< (cadr $pt01) (cadr $pt02))
   (setq $bufyn (cadr $pt01) $bufyk (cadr $pt02))
   (setq $bufyn (cadr $pt02) $bufyk (cadr $pt01))
)
(setq $bufy2 (- $bufyk 2) $bufx2 (- $bufxk 2))
(setq f (open "tile.scr" "w"))

;=================================
(while (/= $bufy2 $bufyk)
    (setq $bufxn0 $bufxn $bufx2 (+ $bufxn0 dlinax))
    (setq $bufy1 $bufyn $bufy2 (setq $bufyn (+ $bufyn dlinay)))
      (if (> $bufyn $bufyk) (setq $bufy2 $bufyk))
         (while (/= $bufx2 $bufxk)
           (setq $bufx1 $bufxn0 $bufx2 (setq $bufxn0 (+ $bufxn0 dlinax)))
           (setq nomer (+ 1 nomer))
           (if (> $bufxn0 $bufxk) (setq $bufx2 $bufxk))
           (setq ssss (strcat "view w " (itoa nomer) " " (rtos $bufx1 2) ","
(rtos $bufy1 2) " " (rtos $bufx2 2) "," (rtos $bufy2 2) " "))
           (write-line ssss f)
         )
)
(close f)
;====================================
(princ)
(command "script" "tile")
)
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

-
Baidarka Mailing List - All postings copyright the author and not to be
reproduced outside Baidarka or Baidarka archives without author's permission
Submissions: baidarka@lists.intelenet.net
Subscriptions: baidarka-request@lists.intelenet.net
Searchable archive: http://rtpnet.org/robroy/baidarka



This archive was generated by hypermail 2b27 : Mon Jan 01 2001 - 01:00:03 EST