home *** CD-ROM | disk | FTP | other *** search
- ;;; EP.lsp ¬⌐Ñ╗ 1.0
- ;;; (C) ¬⌐┼v 1988-1992 Autodesk ñ╜Ñq
- ;;;
- ;;; Ñ╗╡{ªíñwÑ╤ Autodesk ñ╜Ñq╡∙ÑU¬⌐┼v, ╢╚⌐≤ñU¡z▒í¬pñUÑi▒┬╗P▒zíu│\ÑiívíC
- ;;; ╗╒ñUñú▒oÑHÑ⌠ª≤º╬ªí╡oªµ⌐╬ÑX¬⌐ª╣╡{ªí¬║íu¡∞⌐l╜Xív; ª²ñ╣│\▒zªb»S⌐w¡lÑ═
- ;;; ¬║ñuº@ñW╡▓ªXª╣╡{ªí¬║íuÑ╪¬║╜Xív¿╧Ñ╬íCª│├÷│o├■¡lÑ═ñuº@¬║▒°Ñ≤ªpñU:
- ;;;
- ;;; ( i) │]¡pñW╗Pñuº@ñW¼╥»┬║Θ░w╣∩ Autodesk ñ╜Ñq¬║▓ú½~íC
- ;;; (ii) ╕ⁿª│íu¬⌐┼v (C) 1988-1992 Autodesk ñ╜Ñqív¬║¬⌐┼v│qºiíC
- ;;;
- ;;;
- ;;;
- ;;; AUTODESKñ╜Ñq┤ú¿╤ª╣╡{ªí╢╚¿╤º@íu├■ªⁿív¬║░╤ª╥, ª╙ÑBñú▒╞░úª│Ñ⌠ª≤┐∙╗~¬║
- ;;; Ñi»αíCAUTODESKñ╜Ñq»Sª╣º_╗{Ñ⌠ª≤»S⌐wÑ╬│~ñº╛A║┘⌐╩, ÑHñ╬░╙╖~╛P░Γ⌐╥┴⌠ºt
- ;;; ÑX¿π¬║½O├╥íCAUTODESKñ╜ÑqªP«╔ÑτñúÑX¿πª╣╡{ªí░⌡ªµ«╔ñ@⌐wñú╖|íuññ┬_ív⌐╬
- ;;; íuº╣Ñ■╡L╗~ív¬║½O├╥íC
- ;;;
- ;;;
- ;;; By Troy Davis / revised by Steve McCall
- ;;; Autodesk, Inc. May 1, 1990
- ;;;---------------------------------------------------------------------------
- ;;; DESCRIPTION
- ;;;
- ;;; EP.LSP (Enter Point) -- prompts the user for coordinate point entries;
- ;;; makes it easy to distinguish between WCS or UCS Absolute or
- ;;; Relative - or Cartesian, Cylindrical or Spherical entries.
- ;;; (Quick, what is "@*123<45,67" ???). You can also reset the
- ;;; "lastpoint" system variable for Relative entries.
- ;;;
- ;;; After this Lisp function is loaded <(load "ep")>, it can be
- ;;; used anytime AutoCAD requires a point. Just enter "(ep)"
- ;;; at the point prompt.
- ;;;
- ;;; You will then be prompted:
- ;;;
- ;;; Exit/World/Absolute to UCS origin/Set lastpoint/<Relative to lastpoint>:
- ;;;
- ;;; Enter a letter: e, w, a, s, or r<default>, and follow the
- ;;; prompts. "w" (World) also allows Absolute or Relative.
- ;;;
- ;;; The function then assembles the proper point entry, which is
- ;;; given to the AutoCAD prompt and echoed to the screen so you can
- ;;; see how that point would be specified.
- ;;;
- ;;; You can enter "E" (Exit) at any time to return to normal point
- ;;; entry; cancelling the function will also cancel the parent
- ;;; command. All variables are local. This function cannot be
- ;;; used to respond to an AutoLISP prompt.
- ;;;
- ;;;---------------------------------------------------------------------------
-
-
- (defun myerr (msg)
- (if (/= msg "Function cancelled")
- (princ (strcat "\n┐∙╗~: " msg))
- )
- (setq *error* olderr)
- (princ)
- )
- (defun ep ( / fp1 fp2 fp3 fp4 fp5 fp6 fp7 fp8 fp9 fp10)
- (setq olderr *error*
- *error* myerr
- )
- (while
- (not
- (=
- (progn
- (initget "Exit World Absolute Set Relative")
- (setq fp1 (getkword (strcat
- "\nE░hÑX/WÑ@¼╔/A╡┤╣∩ (UCS¡∞┬I)/"
- "S│]íu│╠½ßñ@┬Iív/<R¼█╣∩íu│╠½ßñ@┬Iív>: ")))
- )
- "Exit"
- )
- )
- (if (= fp1 "Set")
- (setvar "LASTPOINT" (getpoint "R░╤ª╥┬I: "))
- (progn
- (setq fp10 "UCS")
- (if (= fp1 "World")
- (progn
- (initget "Absolute Relative")
- (setq fp10 "WCS"
- fp2 (getkword
- "A╡┤╣∩ (WCS ¡∞┬I)/<R¼█╣∩íu│╠½ßñ@┬Iív>: ")
- )
- (if (= fp2 "Absolute")
- (setq fp3 "*" fp4 (trans (list 0.0 0.0 0.0) 0 1))
- (setq fp3 "@*" fp4 (getvar "lastpoint"))
- )
- )
- (if (= fp1 "Absolute")
- (setq fp3 "" fp4 (list 0.0 0.0 0.0))
- (setq fp3 "@" fp4 (getvar "lastpoint"))
- )
- )
- (initget "Xyz Spherical Cylindrical")
- (setq fp5 (getkword "Xyz/C╢Ω¼W«y╝╨/<S╢Ω▓y«y╝╨>: "))
- (initget 1)
- (if (= fp5 "Cylindrical")
- (progn
- (setq fp6 (getdist fp4 "┐ΘñJ XY Ñ¡¡▒ñW¬║╢Z┬≈: "))
- (initget 1) (setq fp7 (getangle fp4 "┐ΘñJ╗PíuX ╢bív¬║º¿¿ñ: "))
- (initget 1) (setq fp8 (getdist fp4 "┐ΘñJ¬uíuZ ╢bív¬║ª∞▓╛: "))
- (setq fp9 (strcat fp3 (rtos fp6) "<" (angtos fp7) "," (rtos fp8)))
- )
- (if (= fp5 "Xyz")
- (progn
- (setq fp6 (getdist (strcat
- "┐ΘñJ¬u " fp10 " ñºíuX ╢bív¬║ª∞▓╛: ")))
- (initget 1) (setq fp7 (getdist (strcat
- "┐ΘñJ¬u " fp10 " ñºíuY ╢bív¬║ª∞▓╛: ")))
- (initget 1) (setq fp8 (getdist (strcat
- "┐ΘñJ¬u " fp10 " ñºíuZ ╢bív¬║ª∞▓╛: ")))
- (setq fp9 (strcat fp3 (rtos fp6) ","
- (rtos fp7) "," (rtos fp8)))
- )
- (progn
- (setq fp6 (getdist fp4 "┐ΘñJ 3D ╢Z┬≈: "))
- (initget 1) (setq fp7 (getangle fp4 "┐ΘñJ╗PíuX ╢bív¬║º¿¿ñ: "))
- (initget 1) (setq fp8 (getangle fp4
- "┐ΘñJÑ╤íuXY Ñ¡¡▒ív╢q░_¬║Ñ⌡¿ñ: "))
- (setq fp9 (strcat fp3 (rtos fp6) "<" (angtos fp7) "<"
- (angtos fp8)))
- )
- )
- )
- (command fp9)
- )
- )
- )
- (setq *error* olderr)
- (princ)
- )
- (princ "\n\tíuEpívñw╕ⁿñJ; ╗▌┐ΘñJ┬Iª∞«╔╜╨ÑH (ep) ▒╥░╩½ⁿÑOíC")
- (princ)