CADTutor: The best free help for AutoCAD on the web

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Go Back   AutoCAD Forums > AutoCAD > AutoLISP, VBA, the CUI & Customisation

Reply
 
Thread Tools
Old 1st Nov 2009, 06:49 pm   #1
Randolph
Full Member
 
Using: AutoCAD 2009
 
Join Date: Sep 2009
Posts: 86
Default Scale objects along 1 axis

I'm looking for a procedure to scale objects along 1 axis only.

The varia command doesn't work this way. It always scales along all 3 axis.

Workaround:


make objects block
delete objects
insert block
scale block in x,y- or z-direction only.

As I like to automate things , this appears a little like awkward.

Can anybody help? Thanx!
Randolph is offline   Reply With Quote
Old 1st Nov 2009, 08:39 pm   #2
lpseifert
Forum Deity
 
Using: Civil 3D 2009
 
Computer Details
 
Join Date: Sep 2006
Location: Pittsburgh, PA, USA
Posts: 2,566
Default

The lisp routine found here does what your workaround does
http://www.cadtutor.org/forum/showthread.php?t=23441
lpseifert is offline   Reply With Quote
Old 1st Nov 2009, 09:34 pm   #3
alanjt
Super Member
 
alanjt's Avatar
 
Using: Civil 3D 2009
 
Join Date: Apr 2008
Posts: 1,488
Default

Temporarily converting it to a block is probably the best method, since you can't stretch things like circles.

Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...
its pretty funny seeing two AutoCAD Gods give each other flak...
alanjt is offline   Reply With Quote
Old 1st Nov 2009, 10:32 pm   #4
Randolph
Full Member
 
Using: AutoCAD 2009
 
Join Date: Sep 2009
Posts: 86
Default

hi lp,

thanks. i read the code thru and i guess you're right, it seems to do exactly what i described. strange enough that you have to do such things to get a result, which is the easiest thing in any other cad application.
Randolph is offline   Reply With Quote
Old 2nd Nov 2009, 05:13 am   #5
alanjt
Super Member
 
alanjt's Avatar
 
Using: Civil 3D 2009
 
Join Date: Apr 2008
Posts: 1,488
Default

Kinda bored....

What about something like this:

XYZ.gif

Subroutine required: http://www.cadtutor.net/forum/showpo...9&postcount=42
Attached Files
File Type: lsp XYZ.LSP (2.3 KB, 17 views)

Last edited by alanjt : 4th Nov 2009 at 04:53 pm.

Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...
its pretty funny seeing two AutoCAD Gods give each other flak...
alanjt is offline   Reply With Quote
Old 2nd Nov 2009, 09:12 am   #6
Randolph
Full Member
 
Using: AutoCAD 2009
 
Join Date: Sep 2009
Posts: 86
Default

Hi Alan, thanks, but don't be too bored:

Code:
 
Befehl: xyz
Objekte wählen: 1 gefunden
Objekte wählen:
Specify base point:
Geometry factor to scale [X/Y/Z]: x
Error: no function definition: AT:INSERTBLOCK
However, the scaleaxis function didn't work either - didn't explode the block. If you scalaxis another object, the previously scaleaxised object will be changed to the second object, as the same block is beeing redefined. Strange enough, the block cannot be exploded manually, either.
Randolph is offline   Reply With Quote
Old 2nd Nov 2009, 10:00 am   #7
ica_cici
Full Member
 
Using: AutoCAD 2008
 
Join Date: Mar 2009
Posts: 37
Default

Try FIT.lsp

see at thread http://www.cadtutor.net/forum/showthread.php?t=40104

It solves my problem.

Last edited by ica_cici : 2nd Nov 2009 at 11:31 am.
ica_cici is offline   Reply With Quote
Old 3rd Nov 2009, 12:39 pm   #8
Randolph
Full Member
 
Using: AutoCAD 2009
 
Join Date: Sep 2009
Posts: 86
Default

Hi ica,

I'm rotating with work right now. I hope I can try FIT.lsp today or tomorrow.

PS: Alan,

I just tried your zerorotation, as I had to rotate 5 floors of plan. it worked quite well except for some rooms, and it also rotated my cars in the garage. still, it saved me a load of work! thanxalot!
Randolph is offline   Reply With Quote
Old 3rd Nov 2009, 12:46 pm   #9
Randolph
Full Member
 
Using: AutoCAD 2009
 
Join Date: Sep 2009
Posts: 86
Default

I just read the readme of fit.lsp by xordesign. it says:

"This tool scales any selection of 2D elements to fit a custom X/Y boundry"

I'm afraid I need to scale 3D elements. And either by a scale factor as well as with a reference. A pity that scaleaxis doesn't work properly.
Randolph is offline   Reply With Quote
Old 3rd Nov 2009, 02:06 pm   #10
alanjt
Super Member
 
alanjt's Avatar
 
Using: Civil 3D 2009
 
Join Date: Apr 2008
Posts: 1,488
Default

Quote:
Originally Posted by Randolph View Post
Hi Alan, thanks, but don't be too bored:

Code:
 
Befehl: xyz
Objekte wählen: 1 gefunden
Objekte wählen:
Specify base point:
Geometry factor to scale [X/Y/Z]: x
Error: no function definition: AT:INSERTBLOCK
However, the scaleaxis function didn't work either - didn't explode the block. If you scalaxis another object, the previously scaleaxised object will be changed to the second object, as the same block is beeing redefined. Strange enough, the block cannot be exploded manually, either.


Guess that might help.

http://www.cadtutor.net/forum/showpo...9&postcount=42

Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...
its pretty funny seeing two AutoCAD Gods give each other flak...
alanjt is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scale on one axis only TonyMS AutoCAD Beginners' Area 3 15th Oct 2008 08:26 pm
Setting x/y axis scale? therock005 AutoCAD Drawing Management & Output 8 12th Dec 2007 04:22 pm
Scale on one Axis? spittle AutoCAD Drawing Management & Output 6 5th Oct 2007 12:07 pm
How to I change the scale in only one axis? jps AutoCAD General 7 29th May 2007 10:59 am
How do I get all objects onto the same Z-axis plane? lmingll AutoCAD Drawing Management & Output 9 22nd Jun 2006 10:10 pm

Why Donate?


All times are GMT +1. The time now is 04:17 am.

RSS Feed for AutoCAD ForumsValid XHTML 1.0!Valid CSS!Creative Commons Licence