home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 February / Chip_2001-02_cd1.bin / sharewar / geotools / geotools_1p24s.exe / _SETUP.1 / gt_load.lsp < prev    next >
Encoding:
Lisp/Scheme  |  1999-10-19  |  2.1 KB  |  85 lines

  1. ;; ! ***************************************************************************
  2. ;; ! GT_Load
  3. ;; ! ***************************************************************************
  4. ;; ! Function : Load the GeoTools software program and the menu
  5. ;; ! Argument : None
  6. ;; ! Return   : None
  7. ;; ! Updated  : June 11, 1999
  8.  
  9. (defun C:GT_Load( / kwd )
  10. (initget "Yes No")
  11. (setq kwd (getkword "\nDo you wish to load GeoTools program and menu? <Yes>:"))
  12. (if (not kwd) (setq kwd "Yes"))
  13. (if (= kwd "Yes")
  14.     (GT_Load)
  15. )
  16. (prin1)
  17. )
  18.  
  19. (defun GT_Load( / AcadVer )
  20. (if (wcmatch (getvar "ACADVER") "15*")    ; AutoCAD 2000
  21. (progn
  22.     (if (findfile "GeoT.VLX")
  23.         (load "GeoT.VLX")
  24.         (alert "Cannot find GeoTools executable file GeoT.VLX. Please check you installation.")
  25.     )
  26. )
  27. (progn
  28.     (if (not (member "geot.arx" (arx)))
  29.     (progn
  30.         (arxload "geot")
  31.         (if (boundp 'c:R)
  32.             (c:R)
  33.         )
  34.     )
  35.     (alert "GeoTools program is already loaded and running.")
  36.     )
  37. ))
  38. )
  39.  
  40. ;; ! ***************************************************************************
  41. ;; ! GT_UnLoad
  42. ;; ! ***************************************************************************
  43. ;; ! Function : UnLoad the GeoTools software program and the menu
  44. ;; ! Argument : None
  45. ;; ! Return   : None
  46. ;; ! Updated  : June 11, 1999
  47.  
  48. (defun C:GT_UnLoad( / kwd )
  49. (initget "Yes No")
  50. (setq kwd (getkword "\nDo you wish to unload the GeoTools program and menu? <No>:"))
  51. (if (not kwd) (setq kwd "No"))
  52. (if (= kwd "Yes")
  53.     (GT_UnLoad)
  54. )
  55. (prin1)
  56. )
  57.  
  58. (defun GT_UnLoad( / AcadVer )
  59. (if (wcmatch (getvar "ACADVER") "15*")    ; AutoCAD 2000
  60. (progn
  61.     (princ "\nGeoTools in AutoCAD 2000 cannot be unloaded.")
  62. )
  63. (progn
  64.     (if (member "geot.arx" (arx))
  65.     (progn
  66.         (if (arxunload "geot")
  67.             (alert "GeoTools program unloaded successfully.")
  68.             (alert "GeoTools program could NOT be unloaded successfully.")
  69.         )
  70.     )
  71.     (alert "GeoTools program has not been loaded.")
  72.     )
  73. ))
  74.  
  75. (if (menugroup "GeoT")
  76. (progn
  77.     (command "._MenuUnLoad" "GeoT")
  78.     (alert "GeoTools menu unloaded successfully.")
  79. ))
  80. )
  81.  
  82. (princ "\nType GT_LOAD   to load   GeoTools.")
  83. (princ "\nType GT_UNLOAD to unload GeoTools.")
  84. (prin1)
  85.