(defun c:bom ()
(if (= jona 1) (progn
  (INITGET "Chinese English")
   (setq file (getkword "\n<C>hinses or <E>nglish: "))
  (setq p (getpoint "\nMATERIAL TABLE INSERT PT: "))
  (setq bom (getstring "\nMATERIAL TABLE FILE <include .ext>: "))
    (COMMAND "INSERT" "BOM" P "1" "1" "0")
     (setq bom (open bom "r")) (setq test 0 num 1 line 1)
     (command "layer" "s" "dim" "")
(cond
 ((= file "English")
  (while (/= line nil)
    (setq p1 (list (+ (car p) 6) (+ (cadr p) 2.2)))
    (setq p2 (polar p1 0 8))
    (setq p3 (polar p2 0 57))
    (setq p4 (polar p3 0 57))
    (setq p5 (polar p4 0 51))
    (setq p6 (polar p5 0 25.5))
     (while (<= num 6)
       (setq line (read-line bom))
       (if (/= line nil) (progn
       (if (= num 1) (command "text" "c" p1 "2.5" "0" line))
       (if (= num 2) (command "text" p2 "2.5" "0" line))
       (if (= num 3) (command "text" p3 "2.5" "0" line))
       (if (= num 4) (command "text" p4 "2.5" "0" line))
       (if (= num 5) (command "text" p5 "2.5" "0" line))
       (if (= num 6) (command "text" "c" p6 "2.5" "0" line))
			 )
       )
       (setq num (1+ num))
     ) (setq num 1) (setq p (list (car p) (+ (cadr p) 8)))
       (setq test (1+ test))
   ) (close bom)
 )
;
 ((= file "Chinese")
   (command "style" "standard" "dayus" "" "" "" "" "" "")
  (while (/= line nil)
    (setq p1 (list (+ (car p) 6) (+ (cadr p) 2.2)))
    (setq p2 (polar p1 0 8))
    (setq p3 (polar p2 0 47))
    (setq p4 (polar p3 0 47))
    (setq p5 (polar p4 0 18.5))
    (setq p6 (polar p5 0 25.5))
     (while (<= num 6)
       (setq line (read-line bom))
       (if (/= line nil) (progn
       (if (= num 1) (command "text" "c" p1 "2.5" "0" (read line)))
       (if (= num 2) (command "text" p2 "2.5" "0" (read line)))
       (if (= num 3) (command "text" p3 "2.5" "0" (read line)))
       (if (= num 4) (command "text" p4 "2.5" "0" (read line)))
       (if (= num 5) (command "text" p5 "2.5" "0" (read line)))
       (if (= num 6) (command "text" "c" p6 "2.5" "0" (read line)))
			 )
       )
       (setq num (1+ num))
     ) (setq num 1) (setq p (list (car p) (+ (cadr p) 8)))
       (setq test (1+ test))
   ) (close bom)
   (command "style" "standard" "romans" "" "" "" "" "" "")
 )
)
;------draw tablet
     (command "layer" "s" "pline" "")
	(setq test (- test 1))
	(setq p (polar p (dtr 270) 8))
	(command "line" p (polar p (dtr 0) 212) "")
	(command "array" "l" "" "r" test "1" "-8" "0")
	(command "line" p (polar p (dtr 270) (* 8 test)) "")
	(command "copy" "l" "" "m" p
		 (polar p (dtr 0) 12)
		 (polar p (dtr 0) 68)
		 (polar p (dtr 0) 124)
		 (polar p (dtr 0) 154)
		 (polar p (dtr 0) 175)
		 (polar p (dtr 0) 187)
		 (polar p (dtr 0) 212)
		 ""
	)
)
))
