Offset half a dimension

Is there a way to automate dividing a length in half and offset the halved amount? I have the centerline of a room and in this instance, want the total offset amount to be 15'-2 1/2", resulting in two offset lengths of 91.25". Instead of manually converting feet/inches to decimal inches, dividing by two then offsetting, is there a way to speed this up?

Comments

  • (defun C:OffsetHalf ( / ) (command "cmdecho" "1" ".offset" (/ (getdist "\nTotal offset distance: ") 2.0) pause "_b" "") (princ))

    Copypaste into the command line, invoke by typing in the name, and see if this does the trick for you.

  • @David Winthrop said:
    .... Instead of manually converting feet/inches to decimal inches, dividing by two ....

    You could draw a 15'-2-1/2" long line and Offset to its midpoint, or Scale it down by a factor of 0.5, or Move it so its midpoint is on the centerline of the room.

  • @Anthony Apostolaros said:

    @David Winthrop said:
    .... Instead of manually converting feet/inches to decimal inches, dividing by two ....

    You could draw a 15'-2-1/2" long line and Offset to its midpoint, or Scale it down by a factor of 0.5, or Move it so its midpoint is on the centerline of the room.

    Typically what I do is offset a line 15'-2 1/2" apart, draw a line or use midpoint between two lines and move the midpoint of the new line onto the centerline.

  • David Winthrop
    edited September 2021

    @Knut Hohenberg said:
    (defun C:OffsetHalf ( / ) (command "cmdecho" "1" ".offset" (/ (getdist "\nTotal offset distance: ") 2.0) pause "_b" "") (princ))

    Copypaste into the command line, invoke by typing in the name, and see if this does the trick for you.

    This is perfect, thank you. It's now loaded into my on_start.lsp file, I shortened "offsethalf" to "oh" to make it a little faster to type.