Jump to content

Macro for scaling object stopped working


martan1912

Recommended Posts

Hello,

I had 2 custom buttons on my toolbar for scaling certain objects between metric and imperial units, for some reason they don't work in version 2014.

 

To scale to metric I have this macro:

select;\scale;$M=$(if,$(=,$(getvar,pickfirst),0),previous;)\25.4

 

To scale to inches:

select;\scale;$M=$(if,$(=,$(getvar,pickfirst),0),previous;)\0.03937007874015748031496062992126

 

Does it have to be rewritten ? It used to work just perfect for what I need it for.

Thanks for help.

Edited by SLW210
added code tags.
Link to comment
Share on other sites

There is a space between the P and R in "Previous" and there is one more space after the semi colon behind the word "Previous".

 

 

I know, that's how it got pasted into the message window, I don't know why, but it is typed in correctly in Autocad. As I mentioned, it worked just fine in other versions.

Link to comment
Share on other sites

Honestly I haven't made them, I got them somewhere while back. If there is a simpler way to achieve the same, I'd appreciate your help. I just need this tool since I do a lot of CNC work and I have to use metric objects in my CAD, also going back and forth between units. It really helps with everyday work.

Link to comment
Share on other sites

^C^Cscale;\;\25.4;

That is to go from standard to metric. To make it go from metric to standard just change the number at the end. I can adjust it a bit to fit your needs if you would like. Just let me know if you need me to add anything. :)

If you add one more \ like so:

^C^Cscale;\\;\25.4;

You can window objects... OR if you want to scale everything then this:

^C^Cscale;all;\25.4;

Would be better.

Link to comment
Share on other sites

Thanks for your offer to help. Now , is this going to let me pick objects I want to scale first ? That's how it used to work. Click on the icon, select the objects and they got scaled.

I don't want to scale all objects in the drawing, just some of them, per my selection.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...