Drawing Views "Use Sheet Scale" API
Drawing Views "Use Sheet Scale" API
(OP)
I'm trying to write a simple macro that will put the three standard views on a drawing. I have found many threads that discuss this topic. I've also found a few macros to do this. I'm pretty sure the code should include:
swApp.SetUserPreferenceToggle swAutomaticScaling3ViewDrawings, True
bViews = swDrawing.Create3rdAngleViews2(swFileName)
The problem is that the inserted drawing views scale to fit, but the drawing sheet scale stays at 1:1. I have other macros that I use that require the Views to "Use Sheet Scale."
I also tried: "Set myView = Part.CreateDrawViewFromModelView3(Model)" and got the same result. The only way they seem to match up is if I use the "DropDrawingViewFromPalette2" method. This seems like a cumbersome way to go about it.
Is there something I'm missing? Thanks.
Chris
swApp.SetUserPreferenceToggle swAutomaticScaling3ViewDrawings, True
bViews = swDrawing.Create3rdAngleViews2(swFileName)
The problem is that the inserted drawing views scale to fit, but the drawing sheet scale stays at 1:1. I have other macros that I use that require the Views to "Use Sheet Scale."
I also tried: "Set myView = Part.CreateDrawViewFromModelView3(Model)" and got the same result. The only way they seem to match up is if I use the "DropDrawingViewFromPalette2" method. This seems like a cumbersome way to go about it.
Is there something I'm missing? Thanks.
Chris






RE: Drawing Views "Use Sheet Scale" API
Create a drawing with a part, preferably one that does not fit best at 1:1 scale. Make sure the views are using the sheet scale. Now save this as your drawing template.
To test it, open a new part and create a drawing using this new template. Check the scales to verify they are behaving as you wish.
Drawing templates are so easy to create. I have seen a lot of folks spend a lot of effort making their drawings work with their one default template when they can easily simplify their lives by making a specific template for a situation. We have different templates for standard working drawings (which include an isometric view), a six-view layout for machining setup and planning, sheet metal, and assemblies with both exploded and non-exploded views. A lot of these templates are preloaded with standard notes relevant to that situation in addition to the particular view arrangements. It has really reduced our effort and made our drawings more consistent.
- - -Updraft
RE: Drawing Views "Use Sheet Scale" API
--
Hardie "Crashj" Johnson
SW 2011 SP 4.0
HP Pavillion Elite HPE
W7 Pro, Nvidia Quaddro FX580
RE: Drawing Views "Use Sheet Scale" API
Thanks, that did the trick!
Chris
RE: Drawing Views "Use Sheet Scale" API
Matt Lorono, CSWP
Product Definition Specialist, DS SolidWorks Corp
Personal sites:
Lorono's SolidWorks Resources & SolidWorks Legion
RE: Drawing Views "Use Sheet Scale" API
You are correct in what the pre-defined standard view insertion does, but what we do is to go ahead and make an example drawing with ALL the views we usually show for that drawing type. Typically, our working drawing has the standard three views at the sheet scale plus an isometric view. The isometric is not tied to the sheet scale, usually it is half that and is located in the upper right of the sheet. So this is all saved in our drawing template. Most of our assembly drawings have an isometric view of the assembly, actually two of the same - one is exploded with balloons and the other unexploded, so this is saved as an assembly drawing template. Similarly, we make the other drawing templates from examples particular to their needs, such as the six views and notes for a machining setup drawing, etc.
We just found that it was very, very easy to make drawing templates to represent the majority of our needs by creating a sample drawing with the desired views and notes and saving it as a template.
- - -Updraft
RE: Drawing Views "Use Sheet Scale" API
Have you had success with pre-populated balloons on the template?
Matt Lorono, CSWP
Product Definition Specialist, DS SolidWorks Corp
Personal sites:
Lorono's SolidWorks Resources & SolidWorks Legion
RE: Drawing Views "Use Sheet Scale" API
For our assembly drawings I basically just get the two views and notes, no balloons and no BOM, but that is just fine for us.
- - -Updraft