NEWSUG Meeting Minutes
March 19,
2003, 5:00 p.m., NWTC Room C231
While this report generally covers the meeting events, they have been arranged into a logical sequence and refined with the purpose of making them helpful without necessarily precisely representing the facts as they happened.
25 people attended this meeting.
Click on links for easy navigation
Controlling Assembly Parameters via MS Excel
·
New web site at http://www.newsug.org/
·
Presentation guidelines will be posted on the web site and will be
given to the presenters. The goal is to make the meetings
helpful.
·
We are having a contest to come up with a NEWSUG logo. The
design must come from a NEWSUG member and it must be modeled in
SolidWorks. A sample logo was included in the Power Point presentation
slides.
·
Next meeting is tentatively scheduled for May 21, 2003 at Miller
Electric. Currently planned topics will be SolidWorks sheet metal and
traps in using Cosmos Works Express.
·
Technique
1--While in the sketch mode, create a centerline and the geometry that you wish
to mirror in any order you wish. Select the centerline and the
geometry. Select the Sketch Mirror icon. The
selected features will mirror around the centerline.
·
Technique
2—While in the sketch mode, create a centerline. Toggle on the Sketch
Mirror icon. Any geometry added while the icon is toggled on will be
mirrored around the centerline.
Geometry that is created with this
technique has properties of symmetry about the centerline. If one element
is dimensioned, its symmetric one is also dimensioned by default. Lines
perpendicular to the centerline that touch it become one with the symmetric
counterpart. Any dimensions on any of these features can be edited
normally.
· Technique 3—After creating part of your geometry, use the Mirror icon to bring up a dialog box that lets your mirror items in the menu tree around any plane. This technique can be helpful to enhance performance.
![]()
Once you create a base feature with an additional feature or
features, you can create a linear pattern or circular pattern. Use the
Linear Pattern icon or the Circular Pattern icon to bring up
the dialog box. In the dialog box you will be prompted for key information
to identify what you want to pattern and the pattern size and shape. By
toggling on the reverse direction arrow you can display a preview of what you
will get. Using geometric patterns can enhance performance because
some of the computations need to be done only for the initial feature and not
for the repeat of that feature in the pattern.
SolidWorks has already provided many hot keys. You can find some of them by going through the menus. The hot keys appear to the right of standard menu items. This includes all of the standard Windows hot keys like open and save a file, copy, paste and others. In the SolidWorks help menu you can find a comprehensive list of all default SolidWorks hot keys under keyboard, shortcuts.
You can create your own hot keys by selecting the Tools | Customize menu. Select the keyboard tab. In this detailed listing of all menu options, you can assign a shortcut key to any command listed. If you assign a key that is already used, a warning message will come up to block you from overwriting it.
Because of Larry’s background and how he works, he has highly customized the keyboard to meet his needs. It let him keep his right hand on the mouse all of the time and the keyboard usage resembles a previous CAD package that is familiar to him. If we can save only a few seconds each time we use a short cut and we use that short cut with any regularity, the total savings can be substantial.
Two keys that are not obvious are displaying the assembly tree By Features or By Dependencies. You can create your own hot keys for these. Find them under the View menu. Larry uses F and D for these hot keys because he never uses the F key for Full View. Alternately, you can use Ctrl + F and Ctrl + D for this feature.
If you follow the path C:\Program Files\SolidWorks\user, you can find a file with your name and a file extension of cus, which contains your hot key settings. This file cannot be easily read but you can copy and paste it from computer to computer so that your custom settings have a degree of portability.
A macro is a set of actions that you can record and use to automate tasks. You can record a macro with the macro recorder or you can create an API. You can make macros with a combination of the two methods.
The advantage of recording a macro is that it is a quick and easy method to create simple macros. The disadvantage of recording a macro is that it has limited functionality.
![]()
![]()
Record
a macro with the macro toolbar enabled. Set up your SolidWorks
model the way you want it when the macro starts. Select the
Record/Pause Macro icon. Go through the steps that you want
to record. When you are done, push the Stop Macro icon.
A dialog box comes up prompting you for where you want to save the macro.
Once the
macro is saved, you can use the Edit Macro icon to edit it or you can use
the Run Macro icon to run it.
Since running the macro requires that you find it, Mark recommends as a first choice that you give each macro an icon and place the icon on a toolbar. Here are the steps to do that:
1. With a
part or assembly file open, right click on an open area of the menu
bar.
2. Select
Customize . . ., the last item, from the drop down menu.
3. Go to
the Commands tab.
4.
Under Categories:, select Macro.
5. Left
click on the icon that looks like this. And drag it to a tool bar where
you want macro to be.
6. A dialog box will come up that will let you assign the bitmap image of your choice to the icon, create a Tooltip (seen when the cursor loiters over the icon), Prompt and assign the macro. You also have an option, near the bottom of the form to assign a keyboard shortcut key.
As a second choice, insure that the File Locations under System Options has the Macros path set to your desired path for all of your macros.
In Mark’s primary example of making a hex in a sketch, the dimension that was entered in the sketch while recording the macro was carried forward to the macro. When running the macro, even though it prompted for a new dimension, the original dimension was always inserted when the macro was done. To fix this problem, three lines of text were removed from the macro. It illustrated the lack of flexibility limitation of recording a macro and the work around for this limitation.
Create a Macro With API (Application Programming Interface)
The advantage of using the API is dramatically expanded functionality. The power of this substantial subset of Visual Basic is available. The disadvantage is that it can take much more time to learn this method and to create macros than with recording macros.
Actual API programming is beyond the scope of the NEWSUG demonstration. In most cases, users will record as much of the code as they can and then edit it with the SolidWorks Macro Editor. A good learning and debugging technique is to open a macro then start it and step through it by pressing the F8 key repeatedly. In this way you can see what the macro does and how it works. For those who are interested in this work, classes are available from your SolidWorks VAR. The topic is so extensive that SolidWorks provides a whole set of help topics, called SolidWorks API Help Topics. The help topics include both overview and detailed help.
The NEWSUG web site includes links to a few sites that have macros available for down load. It also has a form that users can fill in for other web sites with macros. One of the most common macros is one that helps users fill in custom properties. Many variations on this function are available. The suggestion was made that in most companies macros should all be kept on a common network location. That will let users access the best macros and it will help to keep them current.
Many of us have been trained in how to use SolidWorks Design Tables. Moshe presented an alternate approach to do similar things that is less known, but easier to use and has greater flexibility. It also has the substantial advantage of not requiring hard links to files (external references). Here are the steps to get the essential Excel spreadsheet and additional details on how to use this technique.
1. Go to
the SolidWorks web site, www.solidworks.com.
2. Use
the Subscription Support login.
3. Pick
Model Library.
4. Pick
API.
5. Select
the Modeling Utilities directory.
6. Find the Excel to SolidWorks Link Template by Rick Chin. Right click on the zip file to save it to your machine.
The key item for this technique is the Excel spreadsheet that you download with the above directions. The spreadsheet has macros in it that let you change SolidWorks dimensions from the spreadsheet or change spreadsheet values from SolidWorks. When you are done with this work, you have the option of preserving the links between the spreadsheet and the model or not.
The spreadsheet comes up with three worksheets. You do your work on the first sheet. The second sheet is used by the macros to keep track of the links. The last sheet contains the help text. It is redundant of the text file that comes with the spreadsheet in the zip file.
This technique has the advantage of being able to manipulate SolidWorks dimensions in a format that will be easier to use in some cases.
1. Open
both SolidWorks and the Excel spreadsheet. Create your part or assembly
model in SolidWorks like you normally do.
2. At any
point in the creation or editing process, click on a dimension in
SolidWorks.
3. Select
the Excel worksheet.
4. On the
first sheet, click on the cell that you want to use as a link for that
dimension. Press “Ctrl + L”.
5. The
dialog box gives you three option buttons. You will usually want to click
on the default value to let you control the SolidWorks dimension from the
spreadsheet. Alternately, you can display the SolidWorks dimension in the
cell or you can display the mass properties of the SolidWorks model in the
spreadsheet.
6. Select
the Link command button.
7. Add
desired documentation around the link cell that you just created so that you
know what you are controlling.
8.
Whenever you wish, change the value in the spreadsheet. The
SolidWorks model will update right away.
9. Repeat
steps 2 through 7 with what dimensions you wish, when you wish.
10. Change the dimensions in the spreadsheet when you wish to change the drawing.
In Moshe’s presentation, he showed how you can have multiple sets of data that you can copy and paste over the linked cells to give the model a new virtual configuration.
When you are done, close the spreadsheet. The SolidWorks model will behave as though you created and edited the dimensions normally. There are no remaining links or external references in the SolidWorks model.
If you wish to maintain the links between the spreadsheet and the SolidWorks model, create them like the numbered steps above. Save both the spreadsheet and the model. At any time you can open them both and resume adding links and editing values.
While this has not been investigated thoroughly, it looks like the links are broken when the files are closed. If that is the case, they are obviously reestablished when the files are reopened.
Karl showed us a SolidWorks assembly model of a 0-4-0T steam locomotive built by Hinkley & Company in 1871. As a hobby, he got scaled layout drawings and specification from a hobby shop and created each part in this detailed assembly. On the internet Karl was able to find a kinematic animation of the valve assembly that demonstrated how the engine reversed. It was an incredible labor of love that has taken hundreds of hours to create.