;------------------------------------------------------------------------;
; ALU-KOMPONENTEN - HFS_MOD.LSP                                          ;
;------------------------------------------------------------------------;
; AW 14.06.97 / 15.8.98 / 20.9.06                                        ;
;------------------------------------------------------------------------;
(defun Dbox (/ Dat)
  (setq Dat (load_dialog (strcat lw "/acadsst/ils2100/ils_verb_str.DCL")))
  (if (not (new_dialog "ils_verb_str" 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 "ils2100(29412013)")
  )
  (if (= m_DWG_NAME "1") 
    (slide_image 0 0 breite hoehe "ils2100(29412009)")
  )
  (if (= m_DWG_NAME "2") 
    (slide_image 0 0 breite hoehe "ils2100(29414007)")
  )
  (if (= m_DWG_NAME "3") 
    (slide_image 0 0 breite hoehe "ils2100(29414008)")
  )
  (if (= m_DWG_NAME "4") 
    (slide_image 0 0 breite hoehe "ils2100(29422035)")
  )
  (if (= m_DWG_NAME "5") 
    (slide_image 0 0 breite hoehe "ils2100(29422029)")
  )
  (if (= m_DWG_NAME "6") 
    (slide_image 0 0 breite hoehe "ils2100(29422028)")
  )
  (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 "829412013")
  )
  (if (= m_DWG_NAME "1") 
    (setq BL_NAME "829412009")
  )
  (if (= m_DWG_NAME "2") 
    (setq BL_NAME "829414007")
  )
  (if (= m_DWG_NAME "3") 
    (setq BL_NAME "829414008")
  )
  (if (= m_DWG_NAME "4") 
    (setq BL_NAME "829422035")
  )
  (if (= m_DWG_NAME "5") 
    (setq BL_NAME "829422029")
  )
  (if (= m_DWG_NAME "6") 
    (setq BL_NAME "829422028")
  )

  (command "_layer" "_m" "ILS-COMPONENTS" "_c" "4" "" "")
  (setq P0  (getpoint "\nPick insert point: "))
  (bl-name P0) ;--> Block-Name definieren -> Rckgabe: element-name        
  (setq BL_NAME (strcat lw "/acadsst/ils2100/" BL_NAME))
  (command "_insert" BL_NAME P0 "" "" pause)
	(attribute-aendern "" "" "" "" "" "ZZZZZZZZZ" "" "" "" "")		   
)

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