;;-------------------------------------------------------------------------------
;;LINE
;;-------------------------------------------------------------------------------
(defun c:line
(/ cmdsave
) ;;(princ "\nShouldn't you be using PLINE?")
)
c:line
;;-------------------------------------------------------------------------------
(defun c:line
() (c:cline
)) ;;-------------------------------------------------------------------------------
;; CLine - Continue line
;;
;; This procedure is ment to be a replacement for the line command.
;; Although it uses the defualt line command for its core opperation
;; it changes the current layer to that of an entity selected.
;; If an object is not detected, the current layer is used.
;;
;; UPDATE: See revisions. I removed the selection of an xref.
;;
;; By: John Kaul
;; Date: 05.14.06
;;
;; Revison log: 0.1
;; 0.2 -- Removed xrefs from becoming ``objects''.
;; 0.3 -- Cleaned up a variable left declaired.
;; 0.4 -- Fixed a major boo-boo when I changed
;; to a diff error trap. (04.30.07)
(/
;; variables
lay x
;; procedures...
vl-put-activelayer getpointobj vl-put-objlayercurrent awesh0t
)
(
;; get the point from the user.
(princ "\nYou did not select a point, please try again. ") )
x
)
)
;; if we've came this far in the routine...
;; set up error handler.
;;
;; NOTE: Leave as seperate proced for now.
olderr nil
)
)
*error* awesh0t
)
;; and some other routines we will need.
(defun vl
-put
-activelayer
(name
/ x
) ;; (setq obj (getpointobj pnt))
(name
)
)
)
)
(defun getpointobj
(pt
/ obj pt
) ;; disable xref objects from the list of items.
;; if we get any further objects to eliminate, redo
;; entire lisp.
)
;; otherwise just create an object from picked point.
)
)
)
obj
)
(defun vl
-put
-objlayercurrent
(obj
) )
;; Now that we have support procedures set up, we can now get on with the work.
(vl
-put
-objlayercurrent
(setq obj
(getpointobj x
))) ;;LINE UPDATED AND REVISED BY ROBBO@theswamp.org
)
(awesh0t nil)
)
;;-------------------------------------------------------------------------------
;;POLYLINE
;;-------------------------------------------------------------------------------
(defun c:pline
(/ cmdsave
) ;;(princ "\nUse CPLINE to continue polyline")
)
c:pline
;;-------------------------------------------------------------------------------
(defun c:polyline
() (c:pline2
)) (defun c:pline
() (c:pline2
)) (defun c:pl
() (c:pline2
)) (defun c:_pline
() (c:pline2
)) ;;-------------------------------------------------------------------------------
(/ lay x vl-put-activelayer getpointobj vl-put-objlayercurrent awesh0t
)
(
(princ "\nYou did not select a point, please try again. ") )
x
)
)
olderr nil
)
)
*error* awesh0t
)
(defun vl
-put
-activelayer
(name
/ x
) ;; (setq obj (getpointobj pnt))
(name
)
)
)
)
(defun getpointobj
(pt
/ obj pt
) )
)
)
)
obj
)
(defun vl
-put
-objlayercurrent
(obj
) )
(vl
-put
-objlayercurrent
(setq obj
(getpointobj x
))) )
(awesh0t nil)
)
;;-------------------------------------------------------------------------------