Sheef format scale macro?

Hi all,
I've realized I need a funky macro. I am wasting a lot of time resetting the sheet format scale of my drawings. Whenever I create a
3view drawing of a part SW guesses at a scale factor which is never close to what I want. I also don't always know what I want so then this pattern begins:
1: right click on sheet format 2: left click on properties 3: type in new scale 4: click ok 5: see new scale and return to step 1 if necessary
What I would like to do is make a macro that popped up a small dialogue with a spin box or something so that I could dynamically click 'up' or 'down' the sheet format scale until I'm happy.
What do you think?
Zander
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Are you asking for someone to write it for you or are you asking if it is a good idea. I think it is a good idea I deal with the same thing all the time. It isn't all that much to code it. This will get you started
Set swApp = Application.SldWorks
Set dwgdoc = swApp.ActiveDoc
Set Thissheet = dwgdoc.GetCurrentSheet Numerator = 1 Denominator = 2
ThisSheet.SetScale(Numerator,denominator,false,true) dwgdoc.Rebuild (swRebuildAll)
Corey
Zander wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I liked the idea so much, that I took the code that Corey started and wrote a complete macro for it. I don't have anywhere to post it but I can can email it to you if you want.
Ken
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I will put it on our user group site if you wish.
WT

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Sounds good to me. I'll email it to the email address at: http://kcswug.com /
Ken
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
http://kcswug.com/programs/macros/ScaleDrawingSheet.swp
Here you go. I played with it a bit and it's cool. However, I found that after I plopped the views onto the sheet, and then started the macro, I couldn't drag the views around to reposition them while still in the macro. I had to picture in my mind whether or not the new view scale would still be correct after moving them. Maybe something for your spare time. :-) Other than that, it was fun - thanks.
WT

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Wayne, Good idea. It's actually quite a simple change. I'll forward the updated macro to you. Thanks for posting it, Ken
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thanks you guys!
Most appreciated and it works great! Although the old version is still the posted one I think. Please email me the latest if you don't mind.
Zander
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ahhh, much better! The new one is there now - sorry for the delay.
WT

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Works great! I've been needing a macro like this for years.
The only problem I am having with it is with text that is locked to the sheet focus. Doing the old fashioned method of going to the sheet properties to change scale, when clicking OK, another dialog would pop-up with:
Do you want to... _ Scale the annotations' position _ Scale annotation's text height
For some unknown reason, "Scale the annotations' position" is always checked by default. I personally want it to be unchecked by default, or at least remember my preferences from the last time I did it. It doesn't though. Every time I adjust the scale I have to uncheck this option.
But, with the macro and this default behavior combined, it will always "Scale the annotations' position" when adjusting the scale in the macro. How can I turn off this default setting?
--
Seth Renigar
Emerald Tool and Mold Inc.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
http://kcswug.com/programs/macros/ScaleDrawingSheetAnnoText.swp
Amazing, isn't it, how a request from one person just clicks with someone else and they pick up the challenge and run with it. Per Seth's request, Ken has created a newer version of his macro that includes the annotation settings. Here is his explanation.
"I updated the original macro to act as he suggested. Then I also made a copy of the original and added a couple checkboxes to it to allow the user to change the values that Seth was talking about if they'd prefer that instead.
FYI, the way it remembers the user's previous settings was accomplished by writing a text file (SW-ScaleDrawingSheetPreviousSettings.dat) to the C:\Temp\ directory."
I posted both of them on our user group site. Good job, guys!
WT
message

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tin Man wrote:

Thanks, I have always been frustrated by the lack of this functionality. You've saved me a few gray hairs. Really like the annotations check box addition.
Regards
John Layne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.