Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Macro Help

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
Charles_Shade
721 Views, 11 Replies

Macro Help

I'm looking to SCALE an object by .75

 

From the Command Line:

scale

<Enter>

Make Selection (Pause)

<Enter>

1

<Enter>

.75

<Enter>

 

How this looks in the Command window:

Command: SCALE
Select objects: 1 found
Select objects:
Specify base point: 1
Specify scale factor or [Copy/Reference]: .75
Command:

 

The above works without issue

 

Macro: (crashes)

^C^C_scale;\;1;.75

 

How this looks in the Command window:

Command:
Command: _scale

(The object is allowed to be selected here but does not show as such in Command window)
Specify base point: 1
Invalid point.

 

Who sees or knows why this breaks?

I've tried other combinations but cannot get it to run.

11 REPLIES 11
Message 2 of 12
bgingerich
in reply to: Charles_Shade

I'm a little surprised at you, charles.Smiley Surprised

 

Scale is asking for a point x,y but your only giving it x.  Try replacing 1; with 1,0; in your macro.  Not sure when running the SCALE command it assumes y=0 but in the macro it doesn't...

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
Message 3 of 12
AcadAdamLT
in reply to: bgingerich

Your very much correct, when running it macro it requires both x & y, why it doesn't react the same as command I think is because you need to have all the possible variables with, macro's can't make "assumptions", commands can..

 

Signature, sincerely... //Adam
AutoCad LT 2016
Give Kudos where credit is due, Mark "accepted as solution" if the post solved your question.
Message 4 of 12
Charles_Shade
in reply to: bgingerich

Not quite it.

 

Here is the Macro from the last 5 years:

*^C^C_select;\ _scale;_previous;;1;.75

 

It breaks in LT 2013. Worked well before.

I do admit I do not recall why it worked.

 

Message 5 of 12
bgingerich
in reply to: Charles_Shade

I cannot get your macro to work in LT 2010.   This is what the command line returns:

Command:
Command:
Command: _select
Select objects: 1 found
Select objects:
Command:  SELECT
Select objects: _scale
*Invalid selection*
Expects a point or 
Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Add/Remove/Multiple/P
revious/Undo/AUto/SIngle
Select objects: _previous
1 found
Select objects:
Command: 1
Unknown command "1".  Press F1 for help.
Command: .75 Unknown command "75".  Press F1 for help.
Command:
Command:
Command: _select

After further testing, I found out your macro had a space between the end of SELECT and beginning of SCALE that caused problems.  Not sure why your macro worked at all either!?

Does this give you what you're looking for:

*^C^C_select;\_scale;_previous;;1,0;.75
─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
Message 6 of 12
Charles_Shade
in reply to: bgingerich

The space must have popped up in the Copy/Paste

Still no joy with what you posted. I had tried that as well after your thoughts on the coords.

 

Original:

*^C^C_select;\_scale;_previous;;1;.75

 

Just tried it in the LT 2012 Seat on the old OS and it worked fine.

Click the Macro Button, Choose the entity, Right Click, Done!

 

It could be something in how CAD is setup from old to new but this is the only glitch I have had moving up to LT 2013

Message 7 of 12
bgingerich
in reply to: Charles_Shade

That's really weird!  Your original worked for me even though it "shouldn't."

 

Curious.  Since no dice with making it a coordinate in LT 2013, do any other of your custom macros use the "_previous" option to select an object?  Does it work to just use put just the scale command in the macro like this:

*^C^C_scale;\;1,0;.75

 Or is there some reason for invoking the SELECT command that I'm not aware of?

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
Message 8 of 12
pendean
in reply to: Charles_Shade

They probably 'fixed it' LOL

Message 9 of 12
Charles_Shade
in reply to: bgingerich

I'll try on Monday or the next time I go to use it and think about it.

Appreciate the kicks in the head to think other ways.

 

I'm sure somebody had to figure out how to fix a glitch somewhere.

Message 10 of 12
steven-g
in reply to: Charles_Shade

Using 2013 LT Win 7 Pro

 

^C^C_scale;\;\;.75

May be a better option, putting in a base point of 1,0 made objects shift position as well

 

Steve

Message 11 of 12
Charles_Shade
in reply to: steven-g

The shifting is what happened her as well.

I'll give that a try but I do miss my two-click option.

Message 12 of 12
Charles_Shade
in reply to: steven-g

Taking out the semi-colon (Enter) after the second backslash (Pause) got this working in two clicks here.

 

^C^C_scale;\;\.75

 

The second user selection for the Base Point is an Enter in AutoCAD design so the Enter Command is not needed in the Macro.

 

The Asterisk works as well and just needs Escape to quit the Macro as is usual:

*^C^C_scale;\;\;.75

 

Thanks for the help.

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

Post to forums  

Autodesk Design & Make Report

”Boost