Here is my "offset3dpoly":
;;Routine to offset 3Dpolylines
;;Jeff Mishler, April 2005
(defun c:offset3d (/ coords doc idx newcoords newpoly obj offdist offs space ss tmp tmpcoords)
(setq doc (vla-get-activedocument (vlax-get-acad-object))
space (if (= (getvar "cvport") 1)
(vla-get-paperspace doc)
(vla-get-modelspace doc)
)
offdist (getdist "\nOffset distance, (negative to left, positive to right): ")
)
(while (setq ss (ssget ":S" '((0 . "POLYLINE")(-4 . "&=")(70 . 8))))
(setq obj (vlax-ename->vla-object (ssname ss 0))
coords (vlax-get obj 'coordinates)
)
(setq tmp (vlax-invoke space 'addpolyline coords)
offs (vlax-invoke tmp 'offset offdist)
)
(setq tmpcoords (vlax-get (car offs) 'coordinates)
idx 0
newcoords nil)
(if (= (length coords) (length tmpcoords))
(progn
(repeat (length coords)
(if (= (rem idx 3) 2)
(setq newcoords (append newcoords (list (nth idx coords))))
(setq newcoords (append newcoords (list (nth idx tmpcoords))))
)
(setq idx (1+ idx))
)
(setq newpoly (vlax-invoke space 'add3dpoly newcoords))
(vla-put-layer newpoly (vla-get-layer obj))
(vla-put-color newpoly (vla-get-color obj))
(vla-put-linetype newpoly (vla-get-linetype obj))
)
(princ "\n....Unable to offset that 3dPoly.")
)
(vla-delete tmp)
(vla-delete (car offs))
)
(princ)
)