TheSwamp

CAD Forums => CAD General => Topic started by: Fabricio28 on July 01, 2022, 02:43:58 PM

Title: Scale Objects
Post 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
Title: Re: Scale Objects
Post by: danAllen on July 01, 2022, 04:43:23 PM
Align command with scale option?
Title: Re: Scale Objects
Post by: Fabricio28 on July 04, 2022, 11:12:53 AM
Align command with scale option?
Dan
Awesome!! Thanks

Fabricio
Title: Re: Scale Objects
Post by: Biscuits on August 19, 2022, 08:06:36 AM
Found this one years ago and I have no idea who the credit goes to.


Code: [Select]
; 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")
)
Title: Re: Scale Objects
Post by: Crank on August 20, 2022, 02:16:30 AM
@ Biscuits:
Regen has some impact on big drawings. You better replace (command "regen") with
Code: [Select]
(entupd sb_ent)
(princ)
And you should localize your variables.