Help with semi-auto UCS LISP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am brand new to creating LISPs so please forgive any bad practices and basic coding skills.
I am trying to create a LISP to semi-automate creating UCSs for drawing building elevations.
I want to create a line across the face of a building, Create a circle with elevation above the first point on the line, and then define the UCS origin as the first point on the line. X axis as the second point on the line and the XY as the circle above the line.
The code basically woks except the view becomes mirrored. I.E What I want to be the top face of the drawing is the bottom face.
I would also love to be able to select the center point of the circle automatically but I can't figure that out at all and its not TOO important. It would also be great to delete these lines after the UCS is created but again I have no idea and it doesn't matter too much.
Any help would be much appreciated. The code can be seen below. Thanks.
(defun c:ucswiz(/ pt1 pt2)
(command "ucsfollow" "1" "")
(command "ucs" "delete" "elev")
(setq pt1(getpoint "\n Select the first point for elevation"))
(setq pt2(getpoint "\n Select the second point for elevation"))
(command "line" pt1 pt2 "")
(command "circle" pt1 "10")
(command "_.change" pause "" "P" "E" 10 "")
(command "ucs" pt1 pt2 pause)
(command "ucs" "save" "Elev" "")
(princ)
)