Here is an old routine that may give you some ideas.
It uses an existing line to offset but can be modified.
Fact is I use it to array many different objects.
;;; TrussOffset.lsp
;;;
;;; Author: Copyright© 2005 Charles Alan Butler
;;; Version: 1.0 May. 23, 2004
;;; Version: 1.1 Jul. 22, 2004
;;; Purpose: offset objects user offset distance to fill selected area
;;; Only works on X & Y directions.
;;; Will work with any objects
;;;
;;; [Prompts]
;;; Select objects
;;; Enter or select offset distance
;;; Pick start & end point of array distance, these picks only establish
;;; direction and total distance, not start & end points.
;;;
(defun c:trusso (/ *error* p1 p2 ss dist num tmp)
;;; error function & Routine Exit
(defun *error* (msg)
(if
(not
(member
msg
'("console break" "Function cancelled" "quit / exit abort" "")
)
)
(princ (strcat "\nError: " msg))
) ; if
(setvar "osmode" useros)
(setvar "CMDECHO" usercmd)
(princ)
) ;
;end error function
(setq usercmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(setq useros (getvar "osmode"))
(setvar "orthomode" 1)
(prompt "\nSelect objects to offset")
(setq ss (ssget))
(if ss
(progn
(if (null to_step); global var
(setq to_step 24)
(setq to_step (abs to_step))
)
(setq tmp (getdist (strcat "\nEnter or pick offset amount. <"(rtos to_step) "> ")))
(if tmp
(setq to_step tmp)
)
(setq p1 (getpoint "Pick Starting point"))
(if p1
(progn
(setq p2 (getpoint p1 "Pick End point"))
(if p2
(progn
(setq p1 (list (car p1)(cadr p1)) ;3d to 2d
p2 (list (car p2)(cadr p2))
dist (distance p1 p2)
num (fix (1+(/ dist to_step)))
ang (angle p1 p2)
)
(if (or (equal ang pi 0.2)
(equal ang (* pi 1.5) 0.2)
)
(setq to_step (- to_step)); reverse the direction
)
(setvar "osmode" 0)
(cond
((or (equal ang 0 0.2) ; Horrizontal
(equal ang pi 0.2)
)
(command "_.array" ss "" "R" "" num to_step)
)
((or (equal ang (/ pi 2) 0.2) ; Vertical
(equal ang (* pi 1.5) 0.2)
)
(command "_.array" ss "" "R" num "" to_step)
)
) ; end cond stmt
) ; end progn
) ; endif
) ; end progn
) ; endif
) ; end progn
) ; endif
;;;========== Exit Sequence ============
(*ERROR* "")
(princ); Exit quietly
) ; end defun
(prompt "\nOffset Object Loaded. Enter OOS to run.")
(princ)