chrishildebran Posted October 14, 2014 Share Posted October 14, 2014 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! ***|; Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 15, 2014 Share Posted October 15, 2014 DXF code 41 is X, 42 is Y, 43 is Z so you would just need to look at code above and replace maybe copy 3 times. Quote Link to comment Share on other sites More sharing options...
chrishildebran Posted October 15, 2014 Author Share Posted October 15, 2014 Thanks BIGAL, that worked like a charm! Ill read up on DXF codes too by the way. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 16, 2014 Share Posted October 16, 2014 (edited) I kept the old R12 manuals good for this sort of quick answer stuff search here pretty sure there is a guide to DXF codes as a pdf etc. http://www.autodesk.com/techpubs/autocad/acadr14/dxf/entities_section_al_u05_c.htm Edited October 16, 2014 by BIGAL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.