ssget function and the scale command

Discussion in 'AutoCAD' started by rseyda, Dec 23, 2003.

  1. rseyda

    rseyda Guest

    I have a lisp that uses the ssget function to select objects that I want to scale up or down. I will eventually add a line to then move what was just scaled. Here is my code (warning - I tend to oversimplify my code).

    (defun c:scd ( / xfrom xto xinsert xdetail xretrieve sf)
    (setq xdetail (ssget))
    (setq xfrom (getint "\nCurrent scale factor: "))
    (setq xto (getint "\nNew scale factor: "))
    (if (> xfrom xto)(setq sf (/ xfrom xto))(setq sf (/ xto xfrom)))
    (setq xretrieve (getpoint "\nScale from box : "))
    (setq xinsert (getpoint "\nScale to box : "))
    (command "scale" xdetail xretrieve sf)
    )

    For some reason everything works until it gets to the scale command then it craps out. Can anyone tell me what is wrong?

    Thanks,
     
    rseyda, Dec 23, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.