Trai Posted August 3, 2021 Posted August 3, 2021 (edited) IF SOME ONE HAVE GOOD IDEA BETTER MAYBE OTHER HOW TO DO IT Edited August 3, 2021 by Trai Quote
Steven P Posted August 3, 2021 Posted August 3, 2021 Outside of LISP, I saw something similar which was to make the objects into a block, the block can be scaled by axis, then explode the block. Might be able to do something similar with a LISP? 1 1 Quote
Trai Posted August 3, 2021 Author Posted August 3, 2021 42 minutes ago, Steven P said: Outside of LISP, I saw something similar which was to make the objects into a block, the block can be scaled by axis, then explode the block. Might be able to do something similar with a LISP? I know how to do it, but i don't want to convert to block then explode, in addition when you convert to block , it only import factor scale that can not reference as scale command. Using a lisp tool will saving time. Quote
tombu Posted August 3, 2021 Posted August 3, 2021 I've never seen anything but references like blocks and xrefs with different properties for x & y scale or seen it done in a lisp. Block could be purged in the lisp after exploding. I've often used this in older versions that would convert polylines into line segments I'd half to rejoin but in current versions polylines return as polylines. Seems like a no-brainer. 1 Quote
Trai Posted August 3, 2021 Author Posted August 3, 2021 7 minutes ago, tombu said: I've never seen anything but references like blocks and xrefs with different properties for x & y scale or seen it done in a lisp. Block could be purged in the lisp after exploding. I've often used this in older versions that would convert polylines into line segments I'd half to rejoin but in current versions polylines return as polylines. Seems like a no-brainer. i want to it as below image Quote
tombu Posted August 3, 2021 Posted August 3, 2021 3 minutes ago, Trai said: i want to it as below image What happened to the x & y options you asked for? Why not use the Scale command or grip menu? Quote
Trai Posted August 3, 2021 Author Posted August 3, 2021 1 minute ago, tombu said: What happened to the x & y options you asked for? Why not use the Scale command or grip menu? i want to scale only one direction because in autocad only scale x, y axis together Quote
BIGAL Posted August 3, 2021 Posted August 3, 2021 My $0.05 like others block and scale, explode. Quote
Trai Posted August 4, 2021 Author Posted August 4, 2021 this is code for reference: (DEFUN EXCUTE() (setq oldvalue (getvar "CMDECHO")) (setvar "CMDECHO" 0) (princ "select object: ") (setq ss (ssget)) (setq P0 (getpoint "\nSelect base point: ")) (initget 1 "X Y X S") (setq C (getkword "\nSelect axis [X,Y,Z,Scale]?<X/Y/Z/S> :")) (setq hs (getreal "import scale factor: ")) (DELBLOCK "vkc_temp") (CREATEBLOCK ss P0) (Command "-Insert" "vkc_temp" C hs P0 "") (setq dt (entlast)) (Command "Explode" dt) (setvar "CMDECHO" oldvalue) (princ) ) (DEFUN CREATEBLOCK(ss P) (command "-Block" "vkc_temp" P ss "") ) (DEFUN DELBLOCK (bname) (if (IsExistBlock bname) (Command "-Purge" "B" bname "Y" "Y") ) ) (DEFUN IsExistBlock(bname / kq) (setq kq Nil) (setq n (length LiBlk)) (setq i 0) (while (< i n) (if (= bname (nth i LiBlk)) (progn (setq i n) (setq kq T) ) ) (setq i (1+ i)) ) kq ) (DEFUN CREALIBLK (/ NL) (setq LiBlk (List)) (setq NL (tblnext "BLOCK" T)) (while NL (setq LiBlk (append LiBlk (list (cdr (assoc 2 NL))))) (setq NL (tblnext "BLOCK")) ) (setq LiBlk (Acad_strlsort LiBlk)) ) (DEFUN C:XSCALE() (CREALIBLK) (EXCUTE) ) (DEFUN C:SC1() (CREALIBLK) (EXCUTE) ) Everyone can add this feature for me.to replace asking "" import fator scale "" Quote
BIGAL Posted August 4, 2021 Posted August 4, 2021 A couple of suggestions if making a temp block once exploded then do the purge Block, also (Command "Explode" (entlast)) no need for dt. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.