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

Lisp - Insert block and match scale to another block

1 REPLY 1
SOLVED
Reply
Message 1 of 2
matttheman
715 Views, 1 Reply

Lisp - Insert block and match scale to another block

Hi there,

 

Need a little help,

I require a LISP that will insert a new block and that new blocks scale matches the x,y,z scale of a block that will already be in the drawing.

A little help will be greatly appreciated.

 

Thanks You

Matt 

1 REPLY 1
Message 2 of 2
Ajilal.Vijayan
in reply to: matttheman

Hi Matt,

Welcome to this forum.

 

Try with this one

(defun c:mtchblk (/ mblk mx my mz);command name MTCHBLK
(setq mblk (entget (car (entsel "Select the Block to match :"))))
(setq
mx (cdr (assoc 41 mblk))
my (cdr (assoc 42 mblk))
mz (cdr (assoc 43 mblk))
);setq
(command "-insert" "myblock" "x" mx "y" my "z" mz PAUSE 0)
(princ)
);defun

 

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

Post to forums  

Autodesk Design & Make Report

”Boost