Here is my code for picksf.lsp; my program to use the boundary command to read the square footage of a room....
The boundary is a one line command.... You are also picking a point, for the boundary (variable p1), so the same point should be usable for the offset command... I make the layers I want at the beginning of my code and set clayer to use them... You can kill the area, totaling, and text stuff... Maybe even kill the loop... and add the offset command....
Code:
(defun c:picksf()
(setq tot 0)
(setq p1 (getpoint "\nPick inside room:"))
(command "-layer" "n" "area-mask,area" "p" "n" "area-mask" "")
(while (/= p1 nil)
;do boundary, and read its area, then label sf and add to tot
(setvar "clayer" "area-mask")
(command "-boundary" p1 "")
(setvar "clayer" "area")
(command "area" "ob" "l")
(setq a1 (getvar "area"))
(setq tot (+ tot a1))
(command "-text" p1 "0" (strcat (rtos tot 2 2) " SF"))
(setq p1 (getpoint "\nPick inside room:"))
)
(setq p1 (getpoint "\nTotal Label location:"))
(princ (strcat "Total Area = " (rtos tot 2 2) " SF"))
(command "-text" p1 "0" (strcat (rtos tot 2 0) " SF") "")
(princ)
)