home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p024 / 4.img / SUPPORT1.LIB / ACADR12.LSP < prev   
Encoding:
Text File  |  1993-02-16  |  12.0 KB  |  458 lines

  1. ;;;   ACADR12.LSP
  2. ;;;   ¬⌐┼v (C) 1992  Autodesk ñ╜Ñq
  3. ;;;
  4. ;;;   Ñ╗│n┼ΘºK╢O¿╤▒z╢iªµÑ⌠ª≤Ñ╬│~╗▌¿D¬║½■¿⌐íB¡╫º∩ñ╬╡oªµ, ª²¼O░╚╜╨┐φ┤`ñU¡z
  5. ;;;   ¡∞½h :
  6. ;;;
  7. ;;;   1)  ñWªC¬║¬⌐┼v│qºi░╚╗▌ÑX▓{ªb¿Cñ@Ñ≈½■¿⌐∙╪íC
  8. ;;;   2)  ¼█├÷¬║╗í⌐·ñσÑ≤ñ]Ñ▓╢╖⌐·╕ⁿ¬⌐┼v│qºiñ╬Ñ╗╢╡│\Ñi│qºiíC
  9. ;;;
  10. ;;;   Ñ╗│n┼Θ╢╚┤ú¿╤º@¼░└│Ñ╬ñW¬║░╤ª╥, ª╙Ñ╝┴n⌐·⌐╬┴⌠ºtÑ⌠ª≤½O├╥; ╣∩⌐≤Ñ⌠ª≤»S«φ
  11. ;;;   Ñ╬│~ñº╛A║┘⌐╩, ÑHñ╬░╙╖~╛P░Γ⌐╥┴⌠ºtÑX¿π¬║½O├╥, ªbª╣ñ@╖ºñ⌐ÑHº_╗{íC
  12. ;;;
  13.  
  14. ;;;=== General Utility Functions ===
  15.  
  16. (defun *merr* (msg)
  17.   (setq *error* m:err m:err nil)
  18.   (princ)
  19. )
  20.  
  21. (defun *merrmsg* (msg)
  22.   (princ msg)
  23.   (setq *error* m:err m:err nil)
  24.   (princ)
  25. )
  26.  
  27. ;;;=== AME and Region Modeler Functions ===
  28.  
  29. (defun ai_setup (len area lu mass vol)
  30.   (setq m:err *error* *error* *merrmsg*)
  31.   (ai_loadame)
  32.   (if (not (not SOLUNION))
  33.     (progn
  34.       (sollength len)
  35.       (solareau area)
  36.       (setvar "lunits" lu)
  37.       (princ "\níu¬°½╫ív│µª∞│]¼░íu")(princ len)(princ "ív; ")
  38.       (princ "íu¡▒┐nív│µª∞│]¼░íu")(princ area)(princ "ívíC\n")
  39.        (if (not (not SOLBOX))
  40.          (progn
  41.             (solmass mass)    ;don't ask for regions
  42.             (solvolume vol)   ;don't ask for regions
  43.             (princ "íu╜Φ╢qív│µª∞│]¼░íu")(princ mass)(princ "ív; ")
  44.             (princ "íu┼Θ┐nív│µª∞│]¼░íu")(princ vol)(princ "ívíC\n")
  45.          )
  46.        )
  47.       (c:soldisplay)
  48.       (c:solwdens)
  49.     )
  50.   )
  51.   (setq *error* m:err m:err nil)
  52.   (princ)
  53. )
  54.  
  55. (defun ai_upgvar ()
  56.   (setq m:err *error* *error* *merrmsg*)
  57.   (ai_loadame)
  58.   (if (not (not SOLUNION))
  59.     (progn
  60.      (solhangle 45)
  61.      (solhpat "U")
  62.      (solsolidify 3)
  63.      (princ "\n┼▄╝╞º≤╖s; ¬½┼Θ▒Nª█░╩╢iªµíu┬αñ╞╝╥½¼ívíC")
  64.     )
  65.   )
  66.   (setq *error* m:err m:err nil)
  67.   (princ)
  68. )
  69.  
  70. (defun ai_upgprec ()
  71.   (setq m:err *error* *error* *merrmsg*)
  72.   (ai_loadame)
  73.   (if (not (not SOLUNION))
  74.     (progn
  75.       (solupgrade 1)
  76.       (solpurge "bfile")
  77.       (princ "\níuAME R1 ¬⌐ívñº╣Ω┼Θ▒N│Q┬α┤½¼░íu¡┐║δ½╫ívíC")
  78.     )
  79.   )
  80.   (setq *error* m:err m:err nil)
  81.   (princ)
  82. )
  83.  
  84. (defun ai_scrcomp ()
  85.   (setq m:err *error* *error* *merrmsg*)
  86.   (ai_loadame)
  87.   (if (not (not SOLUNION))
  88.     (progn
  89.       (solamecomp "ame1")
  90.       (princ "\níuScript ¼█«e⌐╩ív│]¼░ AME R1 ¬⌐íC")
  91.     )
  92.   )
  93.   (setq *error* m:err m:err nil)
  94.   (princ)
  95. )
  96.  
  97. (defun ai_loadame ()
  98.   (setq m:err *error* *error* *merrmsg*)
  99.   (if (not SOLUNION)
  100.     (if (or (findfile "region.exp") (findfile "region"))
  101.       (_autoxload "region")
  102.       (_autoxload "ame")
  103.     )
  104.   )
  105.   (setq *error* m:err m:err nil)
  106.   (princ)
  107. )
  108.  
  109. (defun ai_unloadame ()
  110.   (setq m:err *error* *error* *merrmsg*)
  111.   (if (xunload "ame" nil)
  112.     (progn
  113.       (ai_aloadame)
  114.       (princ "\nAME ñw─└⌐±íC\n")
  115.     )
  116.   )
  117.   (if (xunload "region" nil)
  118.     (progn
  119.       (autoxload "region" '("solidify" "solint" "solsub" "solunion" "solarea"
  120.                             "solmove" "solchp" "solsep" "sollist" "solmassp"
  121.                             "sollength" "solvar" "solmesh" "solwire" "solfeat"
  122.                             "solwdens" "solucs" "solpurge" "ddsolvar"
  123.                             "ddsolmassp" "solamever" "solareau" "solaxcol"
  124.                             "soldelent" "soldisplay" "solhangle" "solhpat"
  125.                             "solhsize" "sollength" "solpagelen" "solrender"
  126.                             "solservmsg" "solsolidify" "solmatcurr")
  127.       )
  128.       (if (or (findfile "ame.exp") (findfile "ame"))
  129.         (ai_amegrey " ")
  130.       )
  131.       (princ "\n¡▒░∞ (Region) ñw─└⌐± íC\n")
  132.     )
  133.   )
  134.   (menucmd "S=X")
  135.   (menucmd "S=S")
  136.   (setq *error* m:err m:err nil)
  137.   (princ)
  138. )
  139.  
  140. (defun ai_select (/ isloaded)
  141.   (setq m:err *error* *error* *merrmsg*)
  142.   (if (and
  143.         (or (findfile "ame.exp") (findfile "ame"))
  144.         (or (findfile "region.exp") (findfile "region"))
  145.       )
  146.     (progn
  147.       (princ "\n⌐|Ñ╝╕ⁿñJíu╢∞½¼╡{ªíív; ")
  148.       (princ "AME ñ╬ Region ╢∞½¼╡{ªí¼╥╛AÑ╬íC")
  149.       (initget "Ame Region" )
  150.       (setq isloaded (getkword "\nª█░╩╕ⁿñJ R¡▒░∞/<AME>: "))
  151.       (if (= isloaded "Region")
  152.         (setq app "region")
  153.         (setq app "ame")
  154.       )
  155.     )
  156.   )
  157.   (setq *error* m:err m:err nil)
  158.   (princ)
  159. )
  160.  
  161. (defun ai_amegrey (action)
  162.   (foreach a '(1 2 4 13 15 16 27 28 33 35 36 44 45 47 50 51)
  163.     (menucmd (strcat "P9." (itoa a) "=" action))
  164.   )
  165. )
  166.  
  167. (defun ai_aloadame (/ exist_reg)
  168.  (if (null c:solunion)
  169.   (progn
  170.   (setq m:err *error* *error* *merrmsg*)
  171.   (if (or (findfile "region.exp") (findfile "region"))
  172.     (progn
  173.       (setq exist_reg "yes")
  174.       (autoxload "region" '("solidify" "solint" "solsub" "solunion" "solarea"
  175.                             "solmove" "solchp" "solsep" "sollist" "solmassp"
  176.                             "sollength" "solvar" "solmesh" "solwire" "solfeat"
  177.                             "solwdens" "solucs" "solpurge" "ddsolvar"
  178.                             "ddsolmassp" "solamever" "solareau" "solaxcol"
  179.                             "soldelent" "soldisplay" "solhangle" "solhpat"
  180.                             "solhsize" "sollength" "solpagelen" "solrender"
  181.                             "solservmsg" "solsolidify" "solmatcurr")
  182.       )
  183.       (autoxload "ame" '("solbox" "solcone" "solcyl" "solsphere" "soltorus"
  184.                          "solwedge" "solext" "solrev" "solcham" "solfill"
  185.                          "solcut" "solinterf" "soldecomp" "solsubdiv"
  186.                          "solmass" "solvolume" "solsect" "solprof"
  187.                          "solmat" "solin" "solout" "ddsolmat" "solamecomp"
  188.                          "solmass" "solsectype" "solupgrade" "solvolume")
  189.       )
  190.     )
  191.     (autoxload "ame" '("solbox" "solcone" "solcyl" "solsphere" "soltorus"
  192.                        "solwedge" "solext" "solrev" "solidify" "solint"
  193.                        "solsub" "solunion" "solcham" "solfill" "solcut"
  194.                        "solmove" "solchp" "solsep" "sollist" "solmassp"
  195.                        "solarea" "solinterf" "soldecomp" "solsubdiv"
  196.                        "sollength" "solmass" "solvar" "solvolume" "solmesh"
  197.                        "solwire" "solfeat" "solsect" "solprof" "solwdens"
  198.                        "solmat" "solucs" "solin" "solout" "solpurge"
  199.                        "ddsolvar" "ddsolmassp" "ddsolmat" "solamecomp"
  200.                        "solamever" "solareau" "solaxcol" "soldelent"
  201.                        "soldisplay" "solhangle" "solhpat" "solhsize"
  202.                        "sollength" "solmass" "solmatcurr" "solpagelen"
  203.                        "solrender" "solsectype" "solservmsg" "solsolidify"
  204.                        "solupgrade" "solvolume" )
  205.     )
  206.   )
  207.   (if (and
  208.         (null (or (findfile "ame.exp") (findfile "ame")))
  209.         (= exist_reg "yes")
  210.       )
  211.     (ai_amegrey "~")
  212.   )
  213.   (setq *error* m:err m:err nil)
  214.   )
  215.  )
  216.  (princ)
  217. )
  218.  
  219. ;;;=== AVE Render Functions ===
  220.  
  221. (defun ai_loadaverendr ()
  222.   (if (null c:render)
  223.     (autoxload "averendr" '("render" "light" "scene" "finish" "rpref"
  224.                             "stats" "replay" "saveimg" "rconfig")
  225.     )
  226.   )
  227.   (princ)
  228. )
  229.  
  230. (defun c:ai_unloadave ()
  231.   (princ "\n")
  232.   (if (xunload "averendr" nil)
  233.     (progn
  234.       (princ "\nRender ▒m▓{╡{ªíñw─└⌐±íC\n")
  235.       (ai_loadaverendr)
  236.     )
  237.   )
  238.   (menucmd "S=X")
  239.   (menucmd "S=S")
  240.   (princ)
  241. )
  242.  
  243. ;;;=== ASE Functions ===
  244.  
  245. (defun ai_asegrey (action)
  246.   (foreach a '(11 13 14 16 17 19 20 21 23 24 26 27 28 29 30 31 32 33
  247.                34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 51)
  248.     (menucmd (strcat "P1." (itoa a) "=" action))
  249.   )
  250.   (if (= action "~")
  251.     (progn
  252.       (setq ai_aseinit_yet nil)
  253.       (menucmd "P1.10= ")
  254.     )
  255.     (menucmd "P1.10=~")
  256.   )
  257. )
  258.  
  259. (defun ai_aseinit_chk ()
  260.   (menucmd "S=X")
  261.   (if ai_aseinit_yet
  262.     (menucmd "S=ASE")
  263.     (menucmd "S=ASEINIT0")
  264.   )
  265.   (princ)
  266. )
  267.  
  268. (defun ai_aseinit ()
  269.   (setq m:err *error* *error* *merrmsg*)
  270.   (if (= nil c:aseinit)
  271.     (progn
  272.       (princ "\nAutoCAD SQL Extension")
  273.       (if (and (or (/= nil (findfile "ase"))
  274.                    (/= nil (findfile "ase.exp"))
  275.                    (/= nil (findfile "ase.exe"))
  276.                )
  277.                (/= nil (findfile "ase.lsp"))
  278.           )
  279.         (progn
  280.           (xload "ase")
  281.           (load "ase.lsp")
  282.           (ai_asegrey " ")
  283.           (menucmd "S=X")
  284.           (menucmd "S=ASE")
  285.           (setq ai_aseinit_yet T)
  286.           (princ " í╨ ñw╕ⁿñJíC")
  287.           (c:aseinit)
  288.         )
  289.         (progn
  290.           (princ "  Ñ╝╕ⁿñJíC")
  291.           (princ "\nªb½ⁿ⌐w¬║íu╖j┤M╕⌠«|Ñ╪┐²ívñUºΣñú¿∞ ASE└╔«╫; ")
  292.           (princ "\n╜╨└╦¼díuSQL ⌐╡ª∙╡{ªíív¬║½÷╕╦▒íº╬ñº½ßªA└|╕╒íC")
  293.         )
  294.       )
  295.     )
  296.     (progn
  297.       (ai_asegrey " ")
  298.       (menucmd "S=X")
  299.       (menucmd "S=ASE")
  300.       (if (not ai_aseinit_yet)
  301.         (progn
  302.           (if (findfile "ase.lsp")
  303.             (load "ase.lsp")
  304.             (princ "\nºΣñú¿∞íuASE.LSPív;íuQuickív½ⁿÑOñú╛AÑ╬íC")
  305.           )
  306.           (c:aseinit)
  307.         )
  308.       )
  309.       (setq ai_aseinit_yet T)
  310.     )
  311.   )
  312.   (setq *error* m:err m:err nil)
  313.   (princ)
  314. )
  315.  
  316. (defun ai_aseterm ()
  317.   (setq m:err *error* *error* *merrmsg*)
  318.   (if (= ase_errno 0)
  319.     (progn
  320.       (xunload "ase")
  321.       (ai_asegrey "~")
  322.       (menucmd "S=X")
  323.       (menucmd "S=S")
  324.       (princ "\nAutoCAD SQL Extension ñw─└⌐±íC")
  325.     )
  326.   )
  327.   (setq *error* m:err m:err nil)
  328.   (princ)
  329. )
  330.  
  331. ;;; ===== AutoLoad =====
  332.  
  333. (defun _autoqload (quoi app cmdliste / qapp symnam)
  334.   (setq qapp (strcat "\"" app "\""))
  335.   (mapcar
  336.    '(lambda (cmd / nom_cmd)
  337.       (progn
  338.         (setq nom_cmd (strcat "C:" cmd))
  339.         (if (not (eval (read nom_cmd)))
  340.             (eval
  341.              (read (strcat
  342.                     "(defun " nom_cmd "( / rtn)"
  343.                     "(setq m:err *error* *error* *merrmsg*)"
  344.                     "(if (ai_ffile " qapp ")"
  345.                     "(progn (princ \"\n▒╥⌐l...\")"
  346.                     "(_auto" quoi "load " qapp ") (setq rtn (" nom_cmd ")))"
  347.                     "(ai_nofile " qapp "))"
  348.                     "(setq *error* m:err m:err nil)"
  349.                     "rtn)"
  350.                     ))))))
  351.    cmdliste)
  352.   nil
  353. )
  354.  
  355. (defun autoload (app cmdliste)
  356.   (_autoqload "" app cmdliste)
  357. )
  358.  
  359. (defun autoxload (app cmdliste)
  360.   (_autoqload "x" app cmdliste)
  361. )
  362.  
  363. (defun _autoload (app)
  364. ; (princ "ª█░╩:(╕ⁿñJ ") (princ app) (princ ")") (terpri)
  365.   (load app)
  366. )
  367.  
  368. (defun _autoxload (app)
  369. ; (princ "ª█░╩:(╕ⁿñJ ") (princ app) (princ ")") (terpri)
  370.   (if (= app "region") (ai_select))
  371.   (xload app)
  372.   (if (= app "region") (ai_amegrey "~"))
  373. )
  374.  
  375. (defun ai_ffile (app)
  376.   (or (findfile (strcat app ".lsp"))
  377.       (findfile (strcat app ".exp"))
  378.       (findfile (strcat app ".exe"))
  379.       (findfile app)
  380.   )
  381. )
  382.  
  383. (defun ai_nofile (filename)
  384.   (princ
  385.     (strcat "\n└╔«╫í╨"
  386.             filename
  387.             "(.lsp/.exp/.exe) ªbíu╖j┤M╕⌠«|Ñ╪┐²ívñUºΣñú¿∞íC"
  388.     )
  389.   )
  390.   (princ "\n└╦¼díuSupportív└╔«╫¬║½÷╕╦▒íº╬ñº½ßªA└|╕╒íC")
  391.   (princ)
  392. )
  393.  
  394.  
  395. ;;;===== AutoLoad LISP Applications =====
  396.  
  397. (autoload "appload" '("appload"))
  398.  
  399. (autoload "filter" '("filter"))
  400.  
  401. (autoload "dline" '("dline" "dl"))
  402.  
  403. (autoload "3d" '("3d" "ai_box" "ai_pyramid" "ai_wedge" "ai_dome"
  404.                  "ai_mesh" "ai_sphere" "ai_cone" "ai_torus" "ai_dish")
  405. )
  406.  
  407. (autoload "ddinsert" '("ddinsert"))
  408.  
  409. (autoload "asctext" '("asctext"))
  410.  
  411. (autoload "ddattdef" '("ddattdef"))
  412.  
  413. (autoload "ddattext" '("ddattext"))
  414.  
  415. (autoload "3darray" '("3darray"))
  416.  
  417. (autoload "ddmodify" '("ddmodify"))
  418.  
  419. (autoload "ddchprop" '("ddchprop"))
  420.  
  421. (autoload "ddview" '("ddview"))
  422.  
  423. (autoload "ddvpoint" '("ddvpoint"))
  424.  
  425. (autoload "mvsetup" '("mvsetup"))
  426.  
  427. (autoload "ddosnap" '("ddosnap"))
  428.  
  429. (autoload "ddptype" '("ddptype"))
  430.  
  431. (autoload "dducsp" '("dducsp"))
  432.  
  433. (autoload "ddunits" '("ddunits"))
  434.  
  435. (autoload "ddgrips" '("ddgrips"))
  436.  
  437. (autoload "ddselect" '("ddselect"))
  438.  
  439. (autoload "ddrename" '("ddrename"))
  440.  
  441. (autoload "rman_dcl" '("rmmenu"))
  442.  
  443. (autoload "ddsolprm" '("ddsolprm"))
  444.  
  445. (autoload "plud" '("plud"))
  446.  
  447. ;;;===== AutoXLoad ADS Applications =====
  448.  
  449. (autoxload "rasterin" '("gifin" "pcxin" "riaspect" "ribackg"
  450.                         "riedge" "rigamut" "rigrey" "rithresh" "tiffin")
  451. )
  452.  
  453. (autoxload "geomcal" '("cal"))
  454.  
  455. (autoxload "geom3d" '("mirror3d" "rotate3d" "align"))
  456.  
  457. (princ)
  458.