Here's a routine I wrote to do the end view of dimensional lumber.
I'm sure it can be improved on, but basically it draws a rectangle with an "X" in it on the correct layers (at our office) with your input. You need to put in the length and width.
Code:
;;;;STUD.LSP, BY TED GOULET 2003
;;;;(7-8-03): Added the following functions:
;;;; Turn off running osnaps within routine
;;;; Thawed the necessary layers
;;;; Returned to current layer when done
;;;;***********************************************************************
;;;;Draws an end view of dimensional lumber
;;;;***********************************************************************
(defun C:std (/ p1 p2 p3 p4 LR1 LR2 osm la)
(setq strt_point (getpoint "Select start Point"))(terpri)
(setq len (getdist "How wide is your stud?"))(terpri)
(setq wid (getdist "How high is your stud?"))(terpri)
(setq Xp1 (car strt_point))
(setq yp1 (cadr strt_point))
(setq p1 (list xp1 yp1 0))
(setq xp2 (+ xp1 len))
(setq yp2 yp1)
(setq p2 (list xp2 yp2 0))
(setq xp3 xp2)
(setq yp3 (+ yp2 wid))
(setq osm (getvar "osmode"))
(setq la (getvar "clayer"))
(setq p3 (list xp3 yp3 0))
(setq p4 (list xp1 yp3 0))
(SETQ LR1 (TBLSEARCH "LAYER" "S-DETL-0003"))
(SETQ LR2 (TBLSEARCH "LAYER" "S-DETL-0001"))
(IF (= LR1 NIL)
(command "layer" "make" "S-DETL-0003" "color" "3" "" ""))
(IF (= LR2 NIL)
(command "layer" "make" "S-DETL-0001" "color" "1" "" ""))
(setvar "osmode" 16384)
(command "layer" "t" "S-DETL-0003" "S" "S-DETL-0003" "" "")
(command "pline" p1 p2 p3 p4 "c")
(command "layer" "t" "S-DETL-0001" "S" "S-DETL-0001" "" "")
(command "LINE" p1 p3 "")
(command "LINE" p2 p4 "")
(setvar "osmode" osm)
(setvar "clayer" la)
(princ)
)
(princ "STUD loaded. ")
(princ "command: STD ")
(princ)
I thought it would be good to share, it has allot of potential.