Drill and Tap (~Part 3)

This entry is part 4 of 4 in the series Hole Callouts

I previously discussed threaded hole callouts in the context of SolidWorks and its calloutformat.txt files (Part 1 and Part 2). As mentioned before, there is a tendency for some to callout threaded holes with too much information. Often, the thread callouts include the drill size. As argued before, including the drill size usually over-defines the threaded hole because the specifications of the thread itself identify the drill size. It also attempts to specify manufacturing processes, which is not allowed by ASME Y14.5M-1994. In fact, including the drill size within a thread callout may actually provide incorrect specification in many cases.

This is particularly true in the case of threads that are in blind holes. These are usually made with forming taps (roll taps). The diameter of the drilled hole for a roll tapped thread is bigger than it is for a cut thread. For example, for a 10-32 roll tap, the drill size is .1762, while a 10-32 cut thread drill size is .159. Once formed or cut, the specification for the ID of the thread is .156 to .164.

On drawings where customary units (inch) are used, the number of decimals places in the dimension usually determines the tolerance for that dimension. Stating a drill size as a decimal dimension applies the standard drawing tolerances to that dimension unless some general note is added.  This means that the tolerance for the drill callout likely differs with that required by the thread.  So, if the drill size is called out, drawing may be providing the wrong information to the machine shop.

Hole Callouts: Why is THRU sometimes THRU ALL?

This entry is part 3 of 4 in the series Hole Callouts

Question: On a drawing, when adding a callout to a simple through hole or thread, SOLIDWORKS will sometimes add “THRU” and other times add “THRU ALL”.  Why does SolidWorks sometimes add “THRU ALL” in such cases, even though the hole is obviously just “THRU”  (“THRU ALL” being through multiple features and “THRU” being through just one feature.)

Two words: Design Intent.  SOLIDWORKS has powerful modelling tools that allow the user to establish design intent.  In the case of through holes and threads, this design intent is created by the user’s choice on how to make that hole through (its End Condition).

Notice, if a hole is added to a model where the end condition is blind, but the depth of that blind hole cuts through the part, the hole callout on the drawing will show stated depth and not the fact that the hole is through.  Here, the design intent is that the hole shall be cut to a particular depth regardless of the fact that the hole ends up being through the part.

By instinct, many of us pick “Through All” as our end condition for a hole.  However, SOLIDWORKS interprets this as the user’s design intent to make the hole through every feature, so the drawing’s hole callout is “THRU ALL” even though there is only one feature being drilled through.  To capture design intent of “THRU”, the end condition of the hole must be “Up to Next”. This tells SOLIDWORKS the design intent is that hole is only through the immediate feature regardless of how many features it may intercept.

For threads, both end conditions may be set to “Up to Next” for the design intent to be fully captured so that both bore and thread are called-out as “THRU” on the drawing.  A side note, thread callouts may still show depth, even if “Up to Next” is selected.  Be mindful of this.

If drawings already exist with non-modified hole callouts, simply updating the model will usually update the drawing callouts.

Book Review: SolidWorks 2008 API

SolidWorks 2008 API Programming & Automation is recent self-published book by Luke Malpass, founder of AngelSix.  (You will not find his book on Amazon.)  Mr. Malpass wrote this book to fill an apparent gap in guide books about SolidWorks API.  The last book that I know of written specifically on this topic was Automating SolidWorks 2006 using Macros by Mike Spens, published way back in 2005.  Like that book, Mr. Malpass’ new book is spiral bound.

Mr. Malpass states in his introduction that he wrote his book to share his “ways of thinking and programming and hopefully to enlighten at least one other person’s day.”  Much of the book is written in this same friendly manner.  At times, the book is not written in a way that some would consider professional.  Yet, he gets his points across clearly.  The book is accessibly readable by experienced and novice programmers alike. 

The first chapter is correctly labelled “The Basics”.  The first section gets right into the task at hand. The lesson teaches how to make and use recorded macros.  The book next jumps right into writing macros from scratch.  It takes a step by step approach that reveals what code is necessary.  It explains each line in Mr. Malpass’ ever present friendly style. 

As one reads through the book, they will find code examples being built and explained piece by piece in both C# and VBA.  These macros are real world examples that the reader may find immediately useful.  Instructions are so clear that many will be able to apply the demonstrated code in their own macros.

One good example of this is found in the first chapter.  Right near the beginning of the book, Mr. Malpass provides instructions on how to make a macro that save each drawing sheet as an individual DXF File automatically.  This example is great because this question actually comes up a lot in the online message forums.

Many more important topics are extensively covered.  These include working with selected objects, implementation of Property Manager Pages, traversing through each type of document, Custom Property Manager, working with drawings, use of forms, and how to create and use Add-ins (something of special interest to many).  Additionally, all macro examples within the book are included in completed form on a CD. 

Of course, the book covers both C# and VBA code examples.  However, it also often talks extensively about VB.NET.  I found the instructions regarding VB.NET to be distracting, especially since few VB.NET examples appear in the book except for one section written specifically for it.  Granted, VB.NET and VBA are very similar.  However, in my opinion, differences are enough to warrant specific examples for each language.  It should be noted that some VB.NET examples are provided on the CD.  It seems to me that this book may have been better served if it focused on VB.NET and VBA instead of C# and VBA.  C# may have been better handled within its own book.  This would’ve allowed for more room in the book for more specific examples on even more topics, such as more information on how to read and utilize data from external files or methods specifically addressing the handling of BOM’s. 

One minor point of concern I found is within statement of ownership by the author.  It’s a boiler plate “all rights reserved” statement that limits reproduction or distribution without written permission of the publisher.   As this applies to the book itself, I stand by such statements.  However, in my view, it is not practical to place such limitations on code examples.  Doing so kind of defeats the purpose of the book.  That is not to say an author should not hold control over their works, but that if an author chooses to provide examples on how to do something, limitations should not be placed on the examples themselves.   (SolidWorks Corp makes a statement in their API Help that grants permission for the unlimited use of their examples.)

That aside, my opinion is that this book is great for anyone with programming exposure and who wishes to learn how to apply that experience directly to SolidWorks.  It is not meant for the person that has never attempted to program, unless that person is a brave soul willing to dive right in to the process.  I believe this book will be useful for people from novices to those of advanced programming skill.  It may also be a good reference guide to professionally trained expert programmers for SolidWorks specific programming possibilities and requirements.  I recommend this book.

Disclaimer:  This review is unsolicited by the book’s author.  It is based on use of product that I purchased at full price.  I receive no compensation for referrals.

If you are interested in SolidWorks 2008 API Programming & Automation, it may be purchased here: AngelSix.com.

Setting up and using SolidWorks Revision Tables faster

I am sometimes surprized by the limited the adoption of the SolidWorks Revision Table.  This is a powerful tool for drawings within SolidWorks.  The Revision Table allows the user to create a drawing template with an easily updateable revision block already included.  The user doesn’t have to use a potentially unstable Excel inserted OLE.  They also do not need a drawn revision block that requires significant labor in order to update and maintain.

The SolidWorks Revision Table is easy to insert in SolidWorks 2008.  With a drawing open, just go to Insert pulldown>Tables>Revision Table.  Within the Revision Table Pane, pick the appropriate revision template.  Choose any desired options for the table. Choose OK.  The Revision Table will automatically appear in upper right corner.  Save the drawing template for future use.  (See Help for instructions to place the Revision Table at other locations on the drawing.  Also, more steps are required in 2007 and prior; but, they are intuitive to follow and provide more on-screen control over the table’s location.)

Custom Revision Tables can be created to suit the companies specific needs.  Right click on the table to use the RMB menu to access functions that provide methods to modify the table.  When modifications are complete, use the RMB menu Save As option to save the new table as a table template for future use.

To add a revision, simply right click on the Revision Table.  Choose Revisions>Add Revision.  A new revision row will appear with the next revision inserted.  Simply double click any field to add or modify its value.  LMB click outside of the table to set the edits.

Of course, there is a simpler way to add revisions to the Revision Table!  I’ve created a macro that provides a form which allows the quick addition of revisions to the Revision Table.  It’s called RevBlockControl.  It is much faster than directly creating and entering all the rows and values.  It has been recently updated, so if you already use this macro, please consider using the latest version.

RevBlockControl Form

Sample image of the macro form

To use the macro, place it in the macros folder under the SolidWorks folder.  If it doesn’t exist, create it.  Within SolidWorks, assign a custom key stroke to the macro and/or create a toolbar icon location for it.

It can be used for a variety of revision table set-ups, including standard recommended ASME types.  It is limited to 5 columns, though it is customizable without editing the code or a complex .ini file.  If editing the code is desired, everything is spelled out with descriptions for easy of use.  In fact, the code can be quickly edited to allow the macro to drive the drawing’s “Revision” custom property.  Additionally, there is a small .ini included in this current version.  It is simply a list of initials used by the Rev By field.  Edit it with NOTEPAD to add and delete names that will automatically appear within the Rev By field.

Even without the RevBlockControl macro, the easy of use of the SolidWorks Revision Table is well worth the few minutes of effort to set it up on a template.  With the RevBlockControl macro, adding revisions to a Revision Table is so fast that it is almost effortless when compared to other type of revision blocks.

Users, Choosers, and PDM-less Losers

It’s a fairly common topic on most of the SW fora: “How do I move/manage/protect my files?”.  I suppose someone needs to say it, just as a formality; it doesn’t take very long before someone replies, “You should get a PDM system!”

 Can I get a “Well, Duh!” from the congregation? [Amen, Hallelujah].

The fact is, the vast majority of the SW community are users, not choosers.  They work away in the arena provided by their employer: slow network, weak workstation, outdated software, leaky ceiling and bad coffee.  Users may have loud voices, but usually very little say in what they get to use.  They almost certainly don’t get to decide whether to install and use a PDM system, making the first salvo of well-meaning advice hollow. For whatever reason, management will not allow PDM implementation.

File Management Survival Skills

As CAD skills go, file management tends to get short shrift.  New users-in-training are preoccupied with more pressing issues like changing colors and constraining sketches.  They are in a hurry to get useful so that Sir Boss doesn’t second-guess his hiring decisions.  Especially true for small-to-medium sized businesses, where cost of CAD comes out of Sir Boss’ pocket.

At work, it gets worse.  Projects and priorities appear and change daily.  Many projects get idled or abandoned, and the SW files get scattered across a half-dozen network drives and “My Documents” folders.  Multiple files exist of some parts, leaving no one certain what truly belongs.  Parts get accidentally changed by ham-fisted noobs or over-eager bosses.  In many places, there is no formal ECN process or designated storage area for released files.

Get the picture?  I’ve seen it four times over in the last two years while doing contract work.

Case Study: A Client Awakens

There is hope for some.  My current assignment is at a metal fabrication place with three SW users, plus myself.  The engineering manager saw the mounting file management crisis and tasked me to address it.  PDM was out of the question, as there was no money or support from parent company.  We had to find another way.

The result was a system of protected folders acting as a vault for CAD files and a library for other documents.  The folders are protected using windows security and are owned by a “phantom” user, so that no individual can inadvertently change files under his own login.  So far, it works.  Not as good as PDM, but OK.

What was encouraging was that the manager saw the value of his CAD data.  CAD data is valuable information.  Design data does not come cheap.  Software, hardware, users, training, etc. are all pricey.  Even more costly are the mistakes that can result from mishandled or lost data.  Design data needs careful guardianship.

File Management Survival Skills

File management is a skill set that is no less important than sketching.  There are things every user should know how to do (or at least know can be done).  If you can not do any of these things, you should not be satisfied with your file management skills:

  • Move files to a new folder
  • Create copies of files for work or backup
  • Copy entire assemblies
  • Replace components in an assembly
  • Reconnect “lost” components to an assembly
  • What is a file’s “internal ID” and why it is important
  • Understand how SW finds components and references
  • Use your operating system to protect files and folders

Not a complete list, but enough to get one thinking.