• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

scale block definition

  • Thread starter Thread starter 77marco77
  • Start date Start date

77marco77

Guest
Good morning.
I would like to climb definition more blocks without having to enter the editor for each (the definition not the reference).
I found this code lisp:
Code:
(defun c:sbd ; = scale block definitions
  (/ ss sf n)
  (command "_.layer" "_thaw" "*" "_unlock" "*" "_on" "*" "")
  (if
    (and
      (setq ss (ssget '((0 . "insert"))))
      (setq sf (getreal "\nscale factor: "))
    ); and
    (repeat (setq n (sslength ss)); then
      (command
        "_.-bedit" (cdr (assoc 2 (entget (ssname ss (setq n (1- n))))))
        "_.scale" "_all" "" "0,0" sf
        "_.bclose" "_save"
      )
    ); repeat
  ); if
  (command "_.layerp")
  (princ)
); defun
who: and do what I need but not everything I need.. .

you can change the code so that in definition of the block is only the "sign" and not the attributes? i.e. smaller "simbolo" but size unchanged attributes?
thanks in advance for suggestions and help!
 
Code:
(defun c:sbd2 ; = scale block definitions
  (/ ss sf n index gru gru1)
  (command "_.layer" "_thaw" "*" "_unlock" "*" "_on" "*" "")
  (if
    (and
      (setq ss (ssget '((0 . "insert"))))
      (setq sf (getreal "\nscale factor: "))
    ); and
    (repeat (setq n (sslength ss)); then
      (command "_.-bedit" (cdr (assoc 2 (entget (ssname ss (setq n (1- n)))))))
      (setq gru (ssget "x"))
      (setq gru1 (ssadd))
      (repeat (setq index (sslength gru))
       (setq ent (ssname gru (setq index (1- index))))
       (if (not (= (cdr (assoc 0 (entget ent))) "attdef"))
        (ssadd ent gru1)
       )
      )
      (command "_.scale" gru1 "" "0,0" sf "_.bclose" "_save")
    ); repeat
  ); if
  (command "_.layerp")
  (princ)
); defun
 
Last edited:

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top