Jump to content

UCS object rotation


takeanosan

Recommended Posts

As the above title implies, I am working on a ucs lisp that will rotate my ucs based on object selected. However I am not sure how to ensure it rotates correctly when using lisp. (Ucs will rotate to nearest selected end when selected manually)

 

(defun c:cs ()
(command "ncopy" pause "" "0,0" "0,0")
(setq dummy (entlast))
(command "ucs" "ob" dummy "plan" "current")
(command "zoom" "o" dummy "")
(command "erase" dummy "")
(princ)
)

(defun c:cs1 ()
(command "ucs" "w" "plan" "current")
(princ)
)

 

Besides that how do I remember my last zoomed position to reset the ucs?

 

best regards

Edited by takeanosan
wrong title
Link to comment
Share on other sites

Maybe something like this:

 

(DEFUN C:ZU(/ lin point)

(setq lin (entsel "\nSelect a line: "))

(setq point (cadr lin))

(COMMAND "UCS" "OB" point "PLAN" "C" "ZOOM" "O" lin "")

(PRINC)

)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...