AllExperts > AutoCAD 
Search      
AutoCAD
Volunteer
Answers to thousands of questions
 Home · More AutoCAD Questions · Answer Library  · Encyclopedia ·
More AutoCAD Answers
Question Library

Ask a question about AutoCAD
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scott Cook
Expertise
I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!

Experience
Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com. PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.
 
   

You are here:  Experts > Computing/Technology > Computer-Aided Design > AutoCAD > macros

AutoCAD - macros


Expert: Scott Cook - 7/20/2007

Question
QUESTION: Scott,
I use acad 2007 and I am trying to set up a button on my custom toolbar that will scale all the entities on the paper space from metric to imperial. I've got a button set up using the scale all command but I still have to manually enter the scale factor 0.039370079. I have no experience with macros and can't seem to get it right. Any ideas how the macro would be written? Any help would be appreciated as I draw in metric frequently and then need to scale to imperial for cnc programming.

ANSWER: send me the macro you have. you are probably just missing an enter after your scale all;;
two semicolons should be after the select objects prompt.

---------- FOLLOW-UP ----------

QUESTION: Hi Scott,

Thanks for the quick response. I've pasted the macro I use below. As it's written now, I click on the scale all button, then I have to right click the mouse, then left click over the model space then type in the scale factor and enter. Ideally I would like to click on the scale all button and let the macro do all the work.
thanks again.

$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_scale,C^C^_scale all)

Answer
ditch all that for this:
^C^Cscale;all;;0,0;0.039370079

you might have to play around with it a bit. semicolons are enters. just match up what you would type at the command line to do it. using 0,0 as the basepoint will cause everything to shift relative to 0 - so you may or may not want that.

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.