New type of SaveAsPDF macro

SolidWorks is able to save drawings and current model views as a PDF format file.  SaveAsPDF with Folder SelectionThere’s been a lot of macros written over the years that cut the process of saving as PDF down to as few steps as possible. One of the long standing requests for this type of macro (and many similar types of macros) is to allow the user to pick the save location. Just uploaded is a macro (SaveAsPDF with Folder Selection) that does just this, and simplifies the location selection process for default folders. This new macro also uses more modern API techniques to save the file (using modelext::saveas instead of model::saveas4).

This macro does many things that previous macros haven’t.  While allowing the user to establish a default save location folder, it also provides automatic alternative choices when the default is not available.  Yet, even with all of these, the user can still override automated selection and pick a new location.  It does all of this without the use of VB6 forms.

As with other macros that do similar tasks, this will work best when assigned to a keyboard shortcut or a toolbar icon.   Also, as with all SolidWorks macros, there is a chance it will not work “out-of-the-box”.  This is normally due to the fact that SolidWorks updates core reference libraries with each release.  If errors are encountered, simply re-reference to the libraries that are available to allow the macro to function.  More information about that is available in this previous article.

SolidWorks Spelling Check (who’s using it?)

I recently conducted a small poll on SolidWorks Yahoo! Group asking who was using SolidWorks Spelling Check.  To my surprize, almost half (so far) have never even hear of Spelling Check.

Spelling Check Poll

Only 21% of respondents use Spelling Check regularly.  I guess the next question is, “Why aren’t more people using this seemingly obvious tool in SolidWorks?”  Is there a good answer for that?  From my own experience, I use Lenny’s CommonNotes, which means most of my general notes are pre-fabbed.  Since the bulk of the text appears in the general notes, there isn’t much text left in the body of the drawing where misspellings can hide.  So, out of a lack for necessity, I’m in the “Yes, sometimes” category.

Here’s the kicker.  For the Spelling Check to work, Microsoft Word has to be installed since SolidWorks piggybacks the Microsoft spell checker.

This brings me to another point.  Why does this tool have a weird name?  We all know this function is a spell checker.  So, why is it referred to as “Spelling Check” in SolidWorks?  This seems to be a rather odd quirk.

(To access Spelling Check, open a drawing and goto Tools pulldown>Spelling….)

Using Empty Views (Part 2: Creation)

In this article I’m going to cover how to create an Empty View, and the ugly hack for making it a desired size.  In Part 2, I will cover how to use Empty Views for quick zooming and bookmarks in PDFs.

Creating Empty Views

Creating Empty Views is easy.  With a drawing open, goto Insert pulldown>Drawing View>Empty.

Add empty view to drawing

SolidWorks will then ask for a location on the drawing for the Empty View. Simply LMB click at the desired location.  In the example below, I’ve placed the Empty View in what might seem to be an very unusual location (covering the Revision Block table).  I’ll cover why in Part 2 of this article.

Pick location on drawing

Ugly Hack

To get the Empty View to stretch across the full length of the Revision Block table, we’ll need to employ an ugly hack.  Within the new Empty View, draw a line that starts from the corner of the border. Terminate the other end at the vertex of the table at other end.  The endpoints of this line will not attach to these two vertices, but will drop on top of them when the line is created.

Pick location on drawing

The result is an Empty View sized as required. The way to hide the line in this hack is to place it directly over another line (in this case, the Drawing Border).  (A RMB click on the line and choosing the Hide function will not work.  The view will resize back to its default shape.)

Pick location on drawing

Now RMB click on the view and choose the Lock View option.  This will keep the view in place (preventing it from accidentally shifting around).

Making the Empty View useful

To make this new Empty View useful, rename it in the FeatureManager.Renaming the Empty ViewRenamed Empty View

This will allow for easier identification when it comes time to use this (and any other Empty Views).  Part 2 will explain more about this and the reason for these additional steps.

View two drawing sheets at same time

Here’s a quick tip to view both sheets of two-sheet drawing at the same time.  (This works best if no other documents are open.)

  1. Open the multi-sheet drawing and have it active. 
  2. Goto Window pulldown>New Window.  A second window of the same drawing will pop up on screen.
  3. Goto Window pulldown again, and select Tile Horizontally or Tile Vertically.  Both windows of the drawing will tile.
  4. Within each window, select the desired sheet tab.

This will allow for the viewing of multiple sheets of the same drawing at the same time.  (Unfortunately, this tip does not allow for the viewing of different configurations for parts or assemblies at the same time.)

SolidWorks Spell Checker (or Spelling Check)

SolidWorks’ Spelling Check can be fairly useful when proofreading a drawing.  It’s not extremely powerful, but it is as functional as one might expect from a manually initiated spell checker.  For those who didn’t even know that SolidWorks has a spell checker, it’s available under Tools pulldown>Spelling….  (I don’t know the SW version where it was introduced.)  To improve its usefulness, it may be a good idea to add more words to your Spelling Check dictionary file(s).  There’s several main ways to add words to the Spelling Check.

Method 1

The most obvious method is to add your new word to an annotation note in a drawing, then run Spelling Check.  When it identifies your new word as a misspelling, simply click the Add button (this isn’t the most efficient way to add multiple words).  This method will add words to your swdictionary.dic file located in the SolidWorks folder under C:\…\lang\english.

Method 2

If you wish to update the Spelling Check with a bit more control (adding and deleting words), start the Spelling Check and choose the More Options… button.  On the Spelling Options window, choose Dictionaries button.  Stay with me, there’s more.  Highlight “swengineering” then choose the Edit button.  Finally!  OK, now that you’ve made it here, add and delete words one at a time as you please.  This method will edit your swengineering.dic file (same location as the swdictionary.dic file).  Funny thing is that even though you are editing the swengineering.dic file with hundreds of words, you cannot delete any already existing words.  You can only delete the words you add to it.  It is also funny that this method edits the swengineering.dic file, while the main screen of the Spelling Check edits the swdictionary.dic file.

Hmmm…hey SolidWorks Corp, why are there two different dictionary files?

Method 3

In my opinion, the easiest way to add words to Spelling Check in bulk is by editing your swdictionary.dic file directly with Notepad.  With the file open, add one new word per line.  Use all capital letters.  Capital letters are not a requirement.  It will simply keep the dictionary listings consistent within the file, especially if other words are added later by using the Spelling Check.

Networking

As with other similar types of SolidWorks resource files, the swdictinoary.dic and swengineering.dic files can be located on a network drive for standardization across an enterprize.  Presumably, these files should be in the same folder.  To set the file location, goto Tools pulldown>Options…>File Locations and select Spelling Folder.  New dictionary files can also be added within Spelling Check’s Dictionary window.

Enhancement Request

One function I would like to see added to the Spelling Check is the ability to add to automatic replacements for common misspellings of user words that are added to the dictionary files.  For example, if I add the word Loctite and someone spells it as Locktite, SolidWorks currently doesn’t know to suggest Loctite as the correct spelling.