Jump to content

Change LISP to effect Y or Z axis


chrishildebran

Recommended Posts

Morning Lee, on 1/13/2012 you created a LISP routine which help enormously. I'm wondering if i could trouble you to show me what needs to change in the code below to apply the LISP to the Y & Z axis of a block too.

 

I poked around on this page: http://www.lee-mac.com/ssget.html but could not put together the logic.

 

 

 

;01/13/2012 this routine was written by Lee Mac on behalf of a request by Chris Hildebran
;
;OBJECTIVE***
;The purpose of this routine is to find blocks with a negative "x" scale, invert the
; scale and rotate 180 degrees from the original rotation value

(defun c:blkscalrot  (/ e i s)
 (if (setq s (ssget "_X" '((0 . "INSERT") (-4 . "<") (41 . 0.0))))
   (repeat (setq i (sslength s))
     (setq e (entget (ssname s (setq i (1- i))))
           e (subst (cons 41 (abs (cdr (assoc 41 e)))) (assoc 41 e) e)
           e (subst (cons 50 (+ pi (cdr (assoc 50 e)))) (assoc 50 e) e)) ;_ end of setq
     (entmod e)) ;_ end of repeat
   ) ;_ end of if
 (princ)) ;_ end of defun
;|«Visual LISP© Format Options»
(72 2 40 0 T "end of " 60 9 0 0 nil nil nil nil T)
;*** DO NOT add text below the comment! ***|;

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...