Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

match block scale

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
3163 Views, 8 Replies

match block scale

Anonymous
Not applicable
Anyone knows something to match scale from one block to another?
0 Likes

match block scale

Anyone knows something to match scale from one block to another?
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
extract group codes 41, 42 & 43 then subst it to the target block.... simple and easy

41 x scale factor
42 y scale factor
43 z scale factor
0 Likes

extract group codes 41, 42 & 43 then subst it to the target block.... simple and easy

41 x scale factor
42 y scale factor
43 z scale factor
Message 3 of 9
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
(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")
)

try this one, feel free to modify it to suit your needs
glad to help a newbie.... i'm one as well , not really... c",)

(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")
)

try this one, feel free to modify it to suit your needs
glad to help a newbie.... i'm one as well , not really... c",)
Message 4 of 9
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
That's IT. Thanks very much!
0 Likes

That's IT. Thanks very much!
Message 5 of 9
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

Can be improved to work with dynamic blocks and attributes?

0 Likes

Can be improved to work with dynamic blocks and attributes?

Message 6 of 9
gennaro
in reply to: Anonymous

gennaro
Participant
Participant

Impressive! This has been very handy. Could you please add a prompt such as "enter MBL" to run lisp. Thanks!

0 Likes

Impressive! This has been very handy. Could you please add a prompt such as "enter MBL" to run lisp. Thanks!

Message 7 of 9
Kent1Cooper
in reply to: gennaro

Kent1Cooper
Consultant
Consultant

@gennaro wrote:

.... Could you please add a prompt such as "enter MBL" to run lisp. Thanks!


Just add a line at the end:

(prompt "\nEnter MBL to Match BLock scales.")

Kent Cooper, AIA


@gennaro wrote:

.... Could you please add a prompt such as "enter MBL" to run lisp. Thanks!


Just add a line at the end:

(prompt "\nEnter MBL to Match BLock scales.")

Kent Cooper, AIA
Message 8 of 9
gennaro
in reply to: Kent1Cooper

gennaro
Participant
Participant

Awesome! That works! Much appreciated.

0 Likes

Awesome! That works! Much appreciated.

Message 9 of 9
paliwal222
in reply to: Anonymous

paliwal222
Advocate
Advocate

sir,

its,

perfect, and work very well.

sir,

its,

perfect, and work very well.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report