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
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
Ken
WT
"Tin Man" <sendspam...@yahoo.com> wrote in message
news:1117816550....@g49g2000cwa.googlegroups.com...
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
"Tin Man" <sendspam...@yahoo.com> wrote in message
news:1117821639.4...@g43g2000cwa.googlegroups.com...
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
WT
"Zander" <bka...@gmail.com> wrote in message
news:1118062456.5...@g14g2000cwa.googlegroups.com...
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.
(Remove ".no.spam" from my address)
__
"Wayne Tiffany" <wayne.tiff...@asi.com> wrote in message
news:16Yoe.5$Zj.5...@news.sisna.com...
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
"Seth Renigar" <srenigar...@emeraldtoolandmold.no.spam.com> wrote in
message news:qn2pe.11977$az3.1...@twister.southeast.rr.com...
Regards
John Layne