×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Scaling in one direction only

Scaling in one direction only

Scaling in one direction only

(OP)
Is it possible to scale one in the x direction and not in the y direction?

RE: Scaling in one direction only

victroladoctor,

what do you want to scale?
You can convert objects into blocks.
blocks can be scaled with two different values.

Lothar

ADT 2004

RE: Scaling in one direction only

This works fairly well; essentially it creates a block, inserts it with a user defined scale factor, explodes the block and then purges. It explodes plines though. Thanks to an unknown author.

CODE

;;;SCALEAXIS.LSP

;--------------------------------------------------
; ERROR TRAPPING
;--------------------------------------------------

(defun errtrap (msg)
  (cond
    ((not msg))
    (
      (member msg '("Function cancelled" "quit / exit abort"))
      (command "undo" "")
    )
    (
      (princ (strcat "\nError: " msg))
      (command "undo" "")
    )
  );cond
);defun

;--------------------------------------------------
;  MAIN ROUTINE
;--------------------------------------------------

(defun c:scaleaxis (/ *error* *ss1 bspt ax mult refpt refdx newdx)

(command "._undo" "end" "._undo" "begin")
(setq *error* errtrap)

(setq ss1 (ssget))
(setq bspt (getpoint "\nSelect basepoint: "))
(initget "X Y Z")
(if
  (not
    (setq ax (getkword "\nSpecify axis to scale: <X> "))
  );not
  (setq ax "X")
);if

(if
  (not
    (setq mult (getreal "\nEnter scale factor or <Reference>: "))
  );not
  (progn
    (setq refpt1 (getpoint "\nSpecify reference length: "))
    (setq refdx (getdist refpt1 "\nSpecify second point: "))
    (setq newdx (getdist refpt1 "\nSpecify new length: "))
    (setq mult (/ newdx refdx))
  );progn
);if

(setvar "expert" 2)
(setvar "explmode" 1)
(command "._-block" "SCALETEMP" bspt ss1 "")
(command "._-insert" "SCALETEMP" ax mult bspt "0")
(command "._explode" "last" "")
(command "._-purge" "blocks" "SCALETEMP" "n")
(setvar "expert" 1)

(command "._undo" "end")

(princ)
(*error* nil)
)

____________________
Acad2006, Terramodel

RE: Scaling in one direction only

(OP)
The whole drawing was converted from a pdf and somehow the scaling was off. I tried to make the whole drawing a block but ACAD was asking for a parameter and it would not accept any answers I gave it. If you could explain how to scale a block in one direction, I would appreciate it.

The scaleaxis is a bit (depending on the scale) or a lot over my head> But nothing beats a failure but a try.

Thanks to both of you. Happy thanksgiving

RE: Scaling in one direction only

The scaling of a block can only be done after the drawing was made into a block.  Assuming that you have made a block, go to the insert pull down menu and select block, the insert block on the screen will ask for scale in the x,y,directions-just fill in the value, then OK and the block drawing with its new scale value will appear.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources