Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing Views "Use Sheet Scale" API 3

Status
Not open for further replies.

cangevine

Industrial
May 14, 2004
19
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
 
Replies continue below

Recommended for you

Try this:
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
 
Updraft, I create a drawing template for each new project so I don't have to re-fill in all the header/property data. I can set the views I want in that template and set the scale, too.

--
Hardie "Crashj" Johnson
SW 2011 SP 4.0
HP Pavillion Elite HPE
W7 Pro, Nvidia Quaddro FX580

 
Updraft,
Thanks, that did the trick!

Chris
 
Updraft, I believe (unless I'm misunderstanding your post) that your tip is might be outdated. You actually don't need to have a part loaded in your drawing file to create the views in a template. Pre-defined view can be added without the need to load a part for this purpose. Settings can be assigned to it same as any other view. When you open a new drawing from a part, the model will automatically populate the predefined view and any projected views from it.

Matt Lorono, CSWP
Product Definition Specialist, DS SolidWorks Corp
Personal sites:
Lorono's SolidWorks Resources & SolidWorks Legion
 
Matt,

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
 
OK, just to be clear, Iso views are also populated when created via a variety of methods and any view can set to any scale on the template whether populated with a model or not.

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
 
Matt,

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor