(defun-q s::startup ()
(prompt "\nRunning  CoolDUCT STARTUP function... \n")
;(If (and (>= acadver 19.1)(/= (findtrustedfile "cduct.vlx") nil))
;(progn
(setq huda-trus-dir (getvar "TRUSTEDPATHS"))
(setq huda-trus-loca (vl-filename-directory (findfile "cduct.VLX")))
(if (= (wcmatch huda-trus-dir (strcat "*" huda-trus-loca "*")) nil)
(progn
(if (= huda-trus-dir "")
(setq huda-trus-dir huda-trus-loca)
(setq huda-trus-dir (strcat huda-trus-dir ";"  huda-trus-loca))
);if 
(setvar "TRUSTEDPATHS" huda-trus-dir)
);progn
);if
;);progn
;);if
;(setq acadver (atof (getvar "acadver")))
(setq acadlispsys (getvar "lispsys"))
(If (and (/= acadlispsys nil)(/= acadlispsys 0))
(progn
(alert (strcat "\nThe current value of the LISPSYS system variable is " (itoa acadlispsys)
"\n\n"
"\n\nCoolDUCT program is created by using visual lisp" 
"\n\n"
"\n\nTo be able to install or run CoolDUCT program"
"\n\n"
"\n\n*** LISPSYS system variable must be changed to 0 ***"
))
(setq syslisp21 (getstring (strcat "\nChange the current value of the LISPSYS system variable " (itoa acadlispsys)" to 0 ? Y/N <Y>: ")))
(if (or (= syslisp21 "") (= syslisp21 "Y"))
(progn
(setvar "lispsys" 0)
(alert (strcat "\n*** Please completely restart your AutoCAD program ***"
"\n\nTo install or run CoolDUCT program"
))
);progn
(progn
(alert (strcat "\n*** CoolDUCT program will not work ***" 
))
);progn
);if
);progn
(progn
(load "cduct.vlx" "\cduct.vlx not found.")
);progn
);if
); defun S::STARTUP



