Jump to content

macro to scale selected object at point of selection


Recommended Posts

Posted

i had a macro that did this in the past and lost it and cant find a list of special charachters for diesel. Can you point me in the right direction for a list or write it

Posted

When you say "point of Selection" there are many ways to do this, the easiest would probably be to use the two returns from entsel.

 

(setq ent (entsel "\nSelect Object: "))

 

Returns something like:

 

(<Entity123> (12.5 43.1 0.0))

 

Hence you now have an Entity and a Point to work with :)

Posted

now how would i encorporate that into a macro?

 

 
^C^C_scale o (setq ent (entsel "\nSelect Object: ")) 0.5

Posted

Personally, I would write a LISP and call it from a macro - much tidier imo.

Posted

heres my stab at the lisp. Is there a way to make it so the point a click to select object is also the point to scale at? or maybe that if i select an object by clicking on it not by a window it scales at that point and if i use a window it scales where the window started at

(defun c:half (\A)
(setvar A(getobj "\nselect object to be scaled")
(command "._scale" "o" "A" 

Posted

If you follow the advice I provided in post #2, the answers are all there. :)

Posted

so i use ent to enter the object but how do i enter the point, i see your return shows a point but not sure how to get that into the code.

Posted

still want to know how to finish this in lisp but

 

^C^C._scale \ @ 0.5;

scale at selected point

 
^C^C._select;\._scale;_p;;@;0.5;

scale from start of window

 

found it from an old post i made

Posted

in Lisp:

 

(defun c:half (/ ent)
 (if (setq ent (entsel "\nSelect Object: "))
   (command "_.scale" (car ent) "" (cadr ent) 0.5))
 (princ))

Posted

still trying to understand car and cadr, thanks lee

Posted
still trying to understand car and cadr, thanks lee

 

No problem. I'm trying to feed people clues instead of just replying with the solution straight off :)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...