TheSwamp
CAD Forums => CAD General => Topic started by: Fabricio28 on July 01, 2022, 02:43:58 PM
-
Hi friends
I have two blocks and I'd like to make B just like A.
Is there any autocad command to do that? Maybe scale by reference points.
Example file attached.
Thanks
-
Align command with scale option?
-
Align command with scale option?
Dan
Awesome!! Thanks
Fabricio
-
Found this one years ago and I have no idea who the credit goes to.
; Match scale of one block to another
(defun c:mbl ()
(setq fb (entget (car (entsel "\nSelect Block reference: ")))
fb41 (assoc 41 fb)
fb42 (assoc 42 fb)
)
(setq sb (entget (car (entsel "\nSelect target Block: ")))
sb41 (assoc 41 sb)
sb42 (assoc 42 sb)
)
(setq sb_ent (subst fb41 sb41 sb))
(entmod sb_ent)
(setq sb sb_ent)
(setq sb_ent (subst fb42 sb42 sb))
(entmod sb_ent)
(command "regen")
)
-
@ Biscuits:
Regen has some impact on big drawings. You better replace (command "regen") with (entupd sb_ent)
(princ)
And you should localize your variables.