wary faraj Posted September 9, 2012 Posted September 9, 2012 Hi guys... please help me I want to scale a large number of objects, and after the scale they remain in their position.... please help... I really appreciate your help to me, and sorry because I am a beginner in Auto Lisp Quote
wary faraj Posted September 9, 2012 Author Posted September 9, 2012 What are these objects ? they are lines and some time Mtext thank you Quote
Tharwat Posted September 9, 2012 Posted September 9, 2012 they are lines and some time Mtextthank you (defun c:test (/ ss sc in sn) ;; Tharwat 09 . 09 . 2012 ;;; (if (and (setq sc (getdist "\n Specify scale factor :")) (setq ss (ssget "_:L" '((0 . "LINE,MTEXT")))) ) (progn (setvar 'cmdecho 0) (repeat (setq in (sslength ss)) (setq sn (ssname ss (setq in (1- in)))) (vl-cmdf "_.scale" sn "" (if (eq (cdr (assoc 0 (entget sn))) "LINE") (mapcar (function (lambda (p q) (/ (+ p q) 2.))) (cdr (assoc 10 (entget sn))) (cdr (assoc 11 (entget sn))) ) (cdr (assoc 10 (entget sn))) ) sc ) ) (setvar 'cmdecho 1) ) (princ) ) (princ) ) Quote
wary faraj Posted September 9, 2012 Author Posted September 9, 2012 Thank you very much Bro you are so great!!! I really appreciate your help thank you again. Quote
Lee Mac Posted September 9, 2012 Posted September 9, 2012 This may be of interest for the general case: http://www.cadtutor.net/forum/showthread.php?68761-Looking-for-a-LISP-which-SCALE-objects-with-its-own-center-point&p=470405&viewfull=1#post470405 Quote
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.