Jump to content

Please help I want to scale many objects in one time


Recommended Posts

Posted

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

Posted
What are these objects ?

they are lines and some time Mtext

thank you

Posted
they are lines and some time Mtext

thank 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)
)

Posted

Thank you very much Bro you are so great!!!

I really appreciate your help thank you again.

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