This story has a small history. It began more than a year ago when I downloaded a macro from the Comp.Cad.SolidWorks newsgroup named ‘Iso-View’. Mike Wilson was the author of this macro and it created the 4 front isometric views. I used the routine constantly and ended up extending it to create all 8 isometric views. This was more than good enough until I read Don Rummell’s ‘More Shortcuts’ article in Solid Digital Digest (Vol. III Issue 10). In that article, Don explained how he had assigned the standard view commands to the numerical keypad using the flattened cube analogy. This looked like a winning idea except that too many of the keys were unused. The Iso-View macro provided a solution for using those keys. The next day I had 8 small macros assigned to the numerical keypad, as well as the other commands Don had recommended.
After using the macros for two weeks, I was satisfied with them. I wrote a short follow-up article and submitted it to Solid Solutions and the rest of the SAA board members. The very next day , Wayne Tiffany found a problem that had always been in the ‘Iso-Views’ macro and I had never noticed. The ‘Iso-Views’ macro functioned in a drawing as well as in a model. Unfortunately, when it was executed in a drawing, some very interesting things occurred. I informed Wayne that this would be an easy fix and he responded, almost casually, that we might be able to use it to our advantage. Remembering a commercial package (for AutoCAD) that created dozens of views in a drawing, I added those macros. Then I added macros for fast panning and toggling the Feature Manager open and closed.
That would have been the end of the story except that I had problems finding the methods to make some of this new functionality work. After spending many hours searching the SolidWorks API help file (while using a great deal of profanity) I asked for help on the Comp.Cad.SolidWorks newsgroup. Markus Melvin, Arlin Sandbulte, and Stefan Berlitz provided effective answers – Thanks guys.
Figure 1 shows the flattened cube analogy showing a hinged box folded up on the left and unfolded on the right.
The top line plus the number shows which key is used. They are: Num, Ctrl+Num, or both. The bottom line shows the standard view that will be displayed in a Part or an Assembly. In a Drawing, the view functions do not operate (or make much sense) so each macro has different functionality there. They will be explained later.
Please note that the Front (Num 5) view and the Rear (Ctrl+Num 5) view have unique keys, while the others are duplicated.
Figures 2, 3, & 4 show the Keypad in a more conventional manner. Figure 2 (Top) shows the keypad in its normal state. Figure 3 (Center) shows it with the Control key depressed and Figure 4 (Bottom) shows it with the Alt key depressed.
In Figures 2 & 3, the bottom line on keys 1, 3, 7, & 9 gives the name of the Isometric view that these macros will create. The naming convention used for this is: T/B (Top/Bottom) L/R (Left/Right) F/R (Front/Rear) -Iso. Please note: the Front Isometric views are created by the Num keys while the Rear Isometric views are created by the Ctrl+Num keys. Each of these macros will delete any view that uses their name and then recreate it so that the view has the correct zoom value.
The two macros assigned to the Num0 key in Figure 2 and the Ctrl+Num0 key in Figure 3 are not actually required. They have been included for consistency, but the SolidWorks commands could be just as easily used.
The Num Period key toggles the Feature Manager open and closed.
The Ctrl+Num Period key will create/update all 8 Isometric views at once.
Figure 4 shows the Alt+Num keys. These keys simply do a Pan in the direction indicated. Unlike the Num keys and the Ctrl+Num keys, the macros assigned to that Alt+Num keys 1 thru 9 do the same thing in a Model and a Drawing.
The Alt+Num Period key is the reverse of the Ctrl+Num Period key - it will delete all 8 of the named Isometric views.
The Alt+Num 0 key shows that everything has a limit. In this case, I was reaching my limit - I couldn’t think of any more view related function to fill the gap, so I am leaving that chore up to you.
Now, let us take a look at what happens in a drawing.
Figure 5 & 6 shows the 9 Quadrants that the Num keys and Ctrl+Num keys represent.
As you can see, there is a great deal of overlap between the quadrants. I am constantly zooming out and then zooming back in a different location. The Title, ECO, and Notes areas get visited a lot, so having an instant ‘Zoom to Area’ makes sense. The rest of the quadrants were included for consistency. These macros do not create or save any Named views, although it would be easy to accomplish this, they simply Zoom to the indicated area at ¼ the size of the Drawing.
Table A is a listing of the macros and a brief description of their usage. It is included to make it easier to make the keyboard assignments.
(click chart for printable version of below chart)
Some fast notes on the macros.
Every one of these routines contain a test that makes sure that SolidWorks actually has a Model or a Drawing open before it can function. Pressing any key without a file open will generate an error message that you may or may not want. Changing the line shown in Figure 7 in each of the macros will eliminate this.
All of the Alt+Num macros 1 thru 4 and 6 thru 9 do a fast Pan. I couldn’t remember if a Pan moved the window in the direction indicated, or if it moved the part displayed in the window. I set these macros up to do the first, and that looked wrong. I reversed them all, and it still looked wrong. At present, hitting the Alt+Num 1 key moves the object displayed in the direction indicated (down and left). If this looks wrong to you, simply reverse the key assignments so that 1=9, 2=8, 3=7, etc. These macros also contain a ‘For Next’ loop to control the distance the pan moves the object. The ‘Loop’ variable is currently set at 2. Increasing this value will cause it to move further, while reducing it to 1 will reduce the move to the minimum.
I am sure that some people will not like having named views saved in every model. Others will not care for my choice of names. Figure 8 shows the lines that need to be changed in either case. Open the Macro Editor with the Isometric macros (Num & Ctrl+Num 1, 3, 7, & 9) and change these lines.
One of the nice things about all of this is that none of these keys had any functionality assigned to them by SolidWorks. This means that you can add these macros with out loosing any functionality or changing the way you currently work. Further, there is no reason why you cannot pick and choose which routines you want to use - or where to use them. The macros can be modified to do - well - anything you want.
Personally, I like the way most of this works. Don Rummell stated that these were his handiest shortcuts and I have to agree with him. Using these new tools will become automatic with time, but it should help to print the sheet with the keypad images and use it as a mnemonic reminder. I am sure that after a short time you will find using these keys is a lot faster than running the mouse up to the Standard Views toolbar all the time.
Wayne just mentioned that the NumLock does need to be turned on. I think that I should also mention that the keypad will still function normally anywhere that requires data to be entered.
These macros were written and will work with SW2001+, and were tested on SW2003.
Enjoy
Lee
Lee Bell, an independent development engineer in Oceanside, CA, has been working in engineering for nearly 20 years, mostly in product design and development. He started with manual drafting and then various conventional CAD systems including Anvil 5000, AutoCAD, Fast-CAD and Design CAD 3D. He started in solid modeling with Mechanical Desktop, switched briefly to Inventor and finally graduated to SolidWorks 99. He is now a confirmed SolidWorks junkie. “SolidWorks is my system by choice,” says Bell. “The only thing that could be sweeter would be using it with a Cerebral Interface.”
Wayne Tiffany is a design engineer at Automatic Systems, Inc. in Kansas City, MO. He has two years of experience working with SolidWorks, designing custom machinery for the conveyor and automotive industries, and is the president of the newly formed Kansas City Area SolidWorks User Group. Tiffany is a frequent contributor to SOLID Solutions magazine.