Enterprise PDM Convert Tree Tweak

Exports out of Enterprise PDM are a common requirement to ensure outside parties are supplied with up-to-date drawings and models for manufacturing and design reviews.  To address this requirement, EPDM added Tasks a few releases ago, allowing a network on connected machines running SolidWorks to perform these tasks easily.   SolidWorks provides the "SWTaskAddin" which enables the common tasks of Converting and Printing documents out of SolidWorks.

There is one major difference between these two tasks besides the fact that one converts files into another format and the other prints them; selecting references.  Baked into the Print task is an option to "Auto-select" files within the reference tree including:

- None

- All drawings

- Parts and sub-assemblies only

- All parts, sub-assemblies, and drawing.

This feature is not part of the Convert task and is commonly requested for creating an export package.  Since this is a current limitation of the SWTaskAddin the only real option was to use the API and build a new task addin that displays that similar reference prompt.  I recently started building this addin and realized how much duplication would be needed just to get this one option so I decided to fiddle first!

Since the SWTaskAddin stores the task settings in the database, it is easy to trick the task to run the UI of one and execute the other.  Here is how you can get the convert task to prompt for references without coding an addin. Before I show the steps there are a few assumptions you have to first understand.

1. The tweaked task cannot have user interactions so you must "Set-it and Forget-it".

2. The reference prompt shows some print options that need to be ignored.

3. I am unsure how resilient this will be to upgrade and or patches (although it should be fine).

Convert Task with References Workaround:

1. Create a conversion task and set all the options like type, location, options etc. (Make sure all options are set to NOT allow users to change since that is part of the Convert UI).

2. Under "Output File Details", click on "Advanced Scripting Options..." and COPY all the highlighted text.

3. Click "OK" to save the task.

4. Reopen the task go back to "Output File Details", click again on "Advanced Scripting Options..." and switch the "Task user interface type:" from "Convert" to "Print".  You will get a prompt to close and reopen the task to let the settings to be loaded.

5. Reopen that task and now go to "Files", click on "Advanced Scripting Options..." removed the highlighted text and PASTE in the script you copied from the task when it was in "Convert" UI.

6. Click "OK" to save the task.

By starting the task as a Convert, all the settings of the convert task are saved into the database after we hit OK. When we go back into the task and switch it to a Print task, all the settings are still stored in the database from the Convert but we have now told the task to show the Print UI.  Replacing the Print task advanced scripting with that of the Convert task allows the print task to execute, using the settings in the database and displaying the reference screen we want from the Print task.

Although I enjoy coding add-ins for this tool, avoiding a lot of duplicate work and staying within the bounds of an out-of-the-box install is always the goal.  Despite the limitations of interaction and the print related interface options, the tweak gets the job done. Enjoy! ~Lou

Using Sketches to Rip Sheet Metal Parts

The ability to use sketches to rip sheet metal parts may be one of the most important features, especially when importing solids. The rip feature used to only be able to rip linear edges on the part. However, as you can see in the example to the left, this would not work since the bottom is missing gaps to rip by. Instead of going through the effort of using a complex cut feature to add the gaps you can simply use sketches. This technique will only work if the sketches terminate at verticies on the part. Notice in the example how each of the sketch entities start and end at verticies on the part. The sketches do not need to be separate for each entity either. In this case the four entities are all within one 2D sketch on that bottom face. Now you are ready to insert your bends! First, you select the fixed face and then scroll down to reveal the Rip Parameters. and select on the edges and sketches that rips can be added to. It is good practice to make sure the rip edges are sharing verticies so in the example to the right notice how the sketch entity and the model edge are setup. Selecting the inside edge may cause issues when trying to perform a rip like this. Now you can flatten your part properly without having to perform a ton of preprocessing procedures. ~Lou

Auto Align And Mate Hole Patterns

With SolidWorks being a muilt-window application, there are a few tricks you can do with multiple windows tiled using drag and drop. As you may already know, selecting features from one part and dragging and dropping them into another part to copy them is a feature that has been around for some time now. This is where the technology for the current Design Library and the old Feature Pallette originates. This works for mating parts to an assemby that are open simultaniously within SolidWorks by selecting the edges or faces, holding control and drag and droping till your index finger falls off.

Circular edges, on the other hand, have a uniqueness when it comes to drag and drop mating. Grabbing a circular edge, with a drag and drop, mates the circular part coincident and concentric (2 mates) in one shot. But it goes one mate further when a circular pattern resides on both the mating part and the target assembly, assuming the patterns match. As illistrated to the left, selecting the upper part's circular edge and dragging it into the lower assembly containing the base and dropping it on the edge will mate the lid to the base coincident and concentric. In addition, it will automaticaly align the seed holes of the patterns and allow you to clock the alignment by tapping the TAB key. So in this case, 3 mates are added in one drag and drop action! This can be further automated by adding a mate reference to the outer circular edge. Mate references can add this automatic mating technology to parts without having to open them to select the edge on a drag and drop. It will tell SolidWorks to do this automatically so you can drag and drop your parts directly from Windows Explorer with the same result! ~Lou

Starting A 2D Sketch By Selecting An Edge

Obviously you can create a 2D sketch on a face or a plane, but did you know you can also select an edge? When you pre-select an edge and insert a sketch, SolidWorks will create a plane perpendicular to edge at the endpoint closest to where you select and open a sketch on it automatically. Two functions happen when you open a sketch like this. First it creates a reference plane and and second, it opens a sketch with the origin lined up on the endpoint of the selected edge.

This can be especially helpful for functions like miter flanges in sheet metal. When you click on the miter flange tool it will prompt you to select somewhere to insert a sketch. Using this technique is much easier than trying to select the thin face of the sheet metal part to insert a new sketch on. ~Lou

Opening Zip Files With SolidWorks

There is a trick we use in support to open files when they are sent to us in a ZIP format. You may have noticed that the Zip file format is not listed in the Files of Type area in the open dialog but SolidWorks will open them. How? If you drag and drop the zip file into the SolidWorks grey background or onto the toolbar (See below), your files will open up in SolidWorks. Obviously it has to be a file type SolidWorks will open but this is much quicker than unzipping and opening the file afterwards. Files that are not able to be opened by SolidWorks will still be extracted.Here are the rules:

  • If a file in the zip has references also inside the zip file it will open the top level file only. (i.e. an assembly and associated parts, assembly will open up in a single window)

  • If the zip has a number of part files, it will open all the part files in multiple windows.

  • Files are unzipped in the same location that the zip file resides. (If zip file is on the desktop when you drag it into SolidWorks, its contents will also be unzipped to your desktop.)