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

Through the scala command with lisp

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
marcelogarcia3251
521 Views, 5 Replies

Through the scala command with lisp

hello, I'm trying to create a lisp for the scale command that works is as follows.

(command "_scale" "0.0" "100.100" "" "0.0" 2 "")

within the lisp is already defined the selection area and the base point for the scale and the scale factor.

 

Thank you

5 REPLIES 5
Message 2 of 6
hmsilva
in reply to: marcelogarcia3251


@marcelogarcia3251 wrote:

hello, I'm trying to create a lisp for the scale command that works is as follows.

(command "_scale" "0.0" "100.100" "" "0.0" 2 "")

within the lisp is already defined the selection area and the base point for the scale and the scale factor.


Hi Marcelo,

let's see if I understood correctly,

 

Are you trying to scale previously selected objects, without using the command SCALE?

 

Henrique

EESignature

Message 3 of 6
p_mcknight
in reply to: hmsilva

I don't think so. I  looks like the first two items give a selection window. It should be (command ".scale" "window" '(0 0) '(100 100) ...

Message 4 of 6
hmsilva
in reply to: p_mcknight


@p_mcknight wrote:

I don't think so. I  looks like the first two items give a selection window. It should be (command ".scale" "window" '(0 0) '(100 100) ...


Hi p_mcknight,
rereading the OP, I think you might be right.

 

@marcelogarcia3251 

If your goal is to select and scale objects with the SCALE command, is advisable to ensure that are selected objects, before use the SCALE command, and with graphic selection methods, we have to ensure that the area to select is visible on the screen when we make the selection, if the objects are not visible on screen, will not be selected.
As a demo:

(setq pt1 '(0. 0.)
      pt2 '(100. 100.)
)
(command "_.zoom" "_W" pt1 pt2)
(if (setq ss (ssget "_W" pt1 pt2))
  (command "_.scale" ss "" "_NON" pt1 2 "")
)
(command "_.zoom" "_P")

 

Hope that helps

Henrique

EESignature

Message 5 of 6
marcelogarcia3251
in reply to: hmsilva

thanks hmsilva, was exactly what I needed
Message 6 of 6
hmsilva
in reply to: marcelogarcia3251

You're welcome, Marcelo,
but all credits belong to p_mcknight.

 

Henrique

EESignature

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

Post to forums  

Autodesk Design & Make Report

”Boost