;------------------------------------------------------------------------;
; ALU-KOMPONENTEN - HFS_MOD.LSP                                          ;
;------------------------------------------------------------------------;
; AW 14.06.97 / 15.8.98                                                  ;
; 16.08.98 - 2-WAY MODUL eingebaut                                       ;
; 06.11.98 - HP-SORT II eingebaut                                        ;
;------------------------------------------------------------------------;
(defun Dbox (/ Dat)
  (setq Dat (load_dialog (strcat lw "/acadsst/hfs/HFS_MOD.DCL")))
  (if (not (new_dialog "HFS_MOD" Dat)) (exit))
  (set_tile "DWG_NAME" m_DWG_NAME); Blockname
  (mode_tile "anzeige" 0)
  (SetDia)
  (ACTION_TILE "DWG_NAME" "(zeig_dia)")
  (action_tile "accept" "(SetPara) (done_dialog)")
  (action_tile "cancel" "(exit) (done_dialog)")
  (start_dialog)
  (unload_dialog Dat)
)

(defun SetDia()
  (setq breite (dimx_tile "anzeige"))
  (setq hoehe  (dimy_tile "anzeige"))
  (start_image "anzeige")
  (FILL_IMAGE 0 0 breite hoehe -18)
  (if (= m_DWG_NAME "0") 
    (slide_image 0 0 breite hoehe "hfs(kmlight)")
  )
  (if (= m_DWG_NAME "1") 
    (slide_image 0 0 breite hoehe "hfs(km3000)")
  )
  (if (= m_DWG_NAME "2") 
    (slide_image 0 0 breite hoehe "hfs(km5000)")
  )
  (if (= m_DWG_NAME "3") 
    (slide_image 0 0 breite hoehe "hfs(hochl)")
  )
  (if (= m_DWG_NAME "4") 
    (slide_image 0 0 breite hoehe "hfs(hfsmod02)")
  )
  (if (= m_DWG_NAME "5") 
    (slide_image 0 0 breite hoehe "hfs(hochltup)")
  )
  (if (= m_DWG_NAME "6") 
    (slide_image 0 0 breite hoehe "hfs(hfsmod01)")
  )
  (end_image)
)

(defun zeig_dia()
  (setq m_DWG_NAME (get_tile "DWG_NAME"))
  (SetDia)
)

(defun setpara()
  (setq m_DWG_NAME (get_tile "DWG_NAME"))
)

(defun datain ()  
  (setq dummy nil)
)

(defun geometrie()
  (if (= m_DWG_NAME "0") 
    (setq BL_NAME "kmlight")
  )
  (if (= m_DWG_NAME "1") 
    (setq BL_NAME "km3000")
  )
  (if (= m_DWG_NAME "2") 
    (setq BL_NAME "km5000")
  )
  (if (= m_DWG_NAME "3") 
    (setq BL_NAME "hochl")
  )
  (if (= m_DWG_NAME "4") 
    (setq BL_NAME "hfsmod02")
  )
  (if (= m_DWG_NAME "5") 
    (setq BL_NAME "hochltup")
  )
  (if (= m_DWG_NAME "6") 
    (setq BL_NAME "hfsmod01")
  )
  (command "_layer" "_m" "H-2" "_c" "2" "" "")
  (setq P0  (getpoint "\nPick insert point: "))
  (setq BL_NAME (strcat lw "/acadsst/hfs/" BL_NAME))
  (command "_insert" BL_NAME P0 "" "" "0")
)

;------------------------------------------------------------------------------
(defun c:HFS_MOD ( / DWG_NAME BL_NAME P0) 
  (setvar "limcheck" 0)
  (setvar "CMDECHO" 0)
  (setvar "BLIPMODE" 0)
  (setq EINZEL 0) ; fuer EINZEL=0 Baugruppen / EINZEL=1 fuer APB
  (prompt "**** HFS MODULS *******")
  (prompt "")
  (if (null m_DWG_NAME)(setq m_DWG_NAME "0")); Anfangssymbolname 
  (Dbox)
  (prompt "")
  (datain)
  (geometrie)
)
