(defun C:draw_provod_and_insert_blocks_arrows ( / block_name n_y t1 t2 a ar 1/m dxf2 dxf41 dxf42 dxf43 dxf50 sk ss); рисует провода ЛЭП и по желанию соединяет линией
(geo_tools-help "draw_provod_and_insert_blocks_arrows")
  (initget 1 )(setq block_name (getstring T "\nВведи имя блока: "))
  (initget 1 "Да Нет _Yes _No")(setq n_y (getkword "\nБудем соединять блоки линией? [Да/Нет]: "))
  (if (not (or (eq block_name nil) (eq n_y nil)))
    (progn
      (if
	(not (tblobjname "block" block_name))
	(load_annotative_bloks)
	)
      (initget)(setq t1(getpoint "\nУкажи начальную точку:"))
      (initget)(setq t2(getpoint t1 "\nУкажи следующую точку:"))
      (setq ss (ssadd))
      (while (not (eq t2 nil))
        (setq a (+ (/ pi 2) (angle t2 t1)))
        (setq ar (+ (/ pi 2) (angle t1 t2)))
        (setq dxf41 (vl-list* 41 1))
        (setq dxf42 (vl-list* 42 1))
        (setq dxf43 (vl-list* 43 1))
        (setq dxf2 (vl-list* 2 block_name))
        (setq dxf50 (vl-list* 50 a))
        (entmake (list '(0 . "INSERT") dxf2 (append '(10) t1) dxf41 dxf42 dxf43 dxf50))
	(ssadd (entlast) ss)
	(setq dxf41 (vl-list* 41 1))
        (setq dxf42 (vl-list* 42 1))
        (setq dxf43 (vl-list* 43 1))
        (setq dxf2 (vl-list* 2 block_name))
        (setq dxf50 (vl-list* 50 ar))
        (entmake (list '(0 . "INSERT") dxf2 (append '(10) t2) dxf41 dxf42 dxf43 dxf50))
	(ssadd (entlast) ss)
	(setvar "CMDECHO" 0)
	
	(vl-cmdf "-objectscale" ss "" "_Add" (getvar "CANNOSCALE") "")
	(command)
	(setvar "CMDECHO" 1)
	
	(ssdel (ssname ss 0) ss)
	(ssdel (ssname ss 0) ss)
;;;	(if
;;;	  (not (= (getvar "CANNOSCALEVALUE") 1))
;;;	  (progn
;;;	    (setq sk (getvar "CANNOSCALEVALUE"))
;;;	    (command "CANNOSCALE" "1:1000")
;;;	    (setq 1/m (rtos (* (/ 1 sk) 1000) 2 0))
;;;	    (setq 1/m (strcat "1:" 1/m ))
;;;	    (command "CANNOSCALE" 1/m)
;;;	    )
;;;	  (progn
;;;	    (command "CANNOSCALE" "1:500")
;;;	    (command "CANNOSCALE" "1:1000")
;;;	    )
;;;	  )
        (if (eq n_y "Yes")
	  (entmake (list '(0 . "LINE") (cons 6 block_name) (append '(10) t1) (append '(11) t2)))
	  )
	(setq t1 t2)
	(setq t2 nil)
	(initget)(setq t2(getpoint t1 "\nУкажи следующую точку:"))
	)
      )
    (princ "Не верные данные!")
    )
  (princ)
  )
