PDA

View Full Version : Lisp for scaling multiple blocks (symbol)


Tolgak
2004-12-09, 12:14 AM
We are trying to come up with a lisp routine that scales up about 50+ dwg at once. These files are all used as symbols in other plan sets. So far we were able to scale the structure. But we keep loosing the insertion point orientation. Is there a way to write this lisp to scale these blocks with their insertion points are base points for scaling.? In other words is there a way to make the scaling base point same as the insertion point of the block when lisp runs Thorough these multiple files? Thank you..

miff
2004-12-09, 03:01 AM
You don't show the lisp, but try changing the point for the Scale base point to (getvar "insbase")

kennet.sjoberg
2004-12-09, 08:24 AM
Hi Tolgak, the best thing from the beginning is to have the base point at 0,0,0 in all library block, but if not, here may be one solution for You :

(defun c:BaseScale ( ScaleFactor / )
(command "._scale" "all" "" (getvar "INSBASE" ) ScaleFactor )
(princ)
)

Usage:
Command: (c:BaseScale ScaleFactor )
Command: (c:BaseScale 10 )

: ) Happy Computing !

kennet

Tolgak
2004-12-09, 09:37 PM
Thank you Kennet I'll give it a try. I appreciate it