-
Re: Sheet scale macro doesn't rebuild in 2015
JOHN GEORGE Dec 20, 2014 2:00 PM (in response to Brian Mears)Brian,
I looked thru the API examples and modified your macro
I don't know exactly what's wrong, but it is working with my 2015 drawing
Hope this helps
-
ScaleDrawingSheet.swp.zip 16.5 KB
-
-
Re: Sheet scale macro doesn't rebuild in 2015
Brian Mears Jan 8, 2015 8:14 PM (in response to Brian Mears)... and suddenly it works. No idea why. Problem mysteriously solved.
-
Re: Sheet scale macro doesn't rebuild in 2015
Brian Mears Feb 23, 2015 8:10 AM (in response to Brian Mears)This weekend I finally installed 2015 at work and this problem is NOT fixed. It's still occurring. John's modification above does work. Instead of using
swDrawingDoc.Rebuild (swRebuildAll)
he used
swDrawingDoc.ForceRebuild3 True
Two issues:
- A minor issue - it seems slower, as if it's a more complete rebuild. Is this the only way to do this now, or is there another way that just redraws the part geometry? I happened across this while researching: (2015 SOLIDWORKS API Help - swRebuildOptions_e Enumeration) & it looks like the old code was using "swRebuildAll) which might explain the speed difference.
- On one computer, this new code generates the error "A serious error occurred during macro playback. Perhaps the macro was not played in the correct context. The system could be in an unstable state now". And it is unstable - it crashes shortly afterwards. I found this (A serious error occurred on open macro file. The system could be in an unstable state now. | MySolidWorks ) but there's no resolution.
Any insight on this would be appreciated, whether it's a better way to code this, or a way to fix the stability error.
Thanks!
Brian
-
Re: Sheet scale macro doesn't rebuild in 2015
Tapani Sjoman Feb 25, 2015 8:34 AM (in response to Brian Mears)Tested this macro and had some problems with commas/dots in input fields.
Added then conversion to double, CDbl(), for Form inputs. After that runned fine for me (SW2014).
Tested also with additional button (Run) while it was a little hasty with manual input. Attached both versions.
-
ScaleDrawingSheet_2.zip 18.4 KB
-
ScaleDrawingSheet_1.zip 16.1 KB
-
-
Re: Sheet scale macro doesn't rebuild in 2015
Jonathan Larson Jun 1, 2015 8:45 AM (in response to Brian Mears)I've noticed that it's much slower too. I would be interested in a fix to this macro. I used the sheet scale macro almost every time I make a drawing.
-
Re: Sheet scale macro doesn't rebuild in 2015
Dale Slotman Jun 1, 2015 8:52 AM (in response to Jonathan Larson)I was just struck by the fact that so many of us use a macro for something as simple as changing a drawing's scale. If anyone from Solidworks is reading this, please take this as a hint that changing the drawing scale should be made easier. I'm always kinda excited when Solidworks decides to make one of my macros "obsolete" by making the task the macro did just as easy as the macro itself.
Dale
-
Re: Sheet scale macro doesn't rebuild in 2015
Matt Martens Jun 1, 2015 9:57 AM (in response to Dale Slotman)I addressed this fact in another forum thread a while back and also submitted an SPR at the time. When I saw this post I decided to look up the SPR and check the status.
It seems the Beta version of 2016 is addressing a simpler way of changing the sheet scale. Hopefully, Dale's statement applies in this case.
I'm always kinda excited when Solidworks decides to make one of my macros "obsolete" by making the task the macro did just as easy as the macro itself.
-
Re: Sheet scale macro doesn't rebuild in 2015
Deepak Gupta Jun 1, 2015 12:51 PM (in response to Dale Slotman)SW2016 might have the scale change on the fly (right bottom corner) as shown at SWW2015.
-
-
-