Time-Saving Techniques for Making Thousands of Parts

About 18 months ago at Weatherford, we needed to create a batch of fresh Pro/ENGINEER models for over 8,000 standard o-rings as part of an ongoing clean-up operation. In this article, I highlight some valuable lessons we learned and outline the steps taken to create these models, including templates, family tables, trail files and UI scripting.

 

 

Initial attempt

The first step was to create a solid model of a typical o-ring in Pro/ENGINEER. The plan was to use this template as a starting point for all the others, effectively multiplying the model by 8,000. We included a datum axis, datum planes, and renamed dimensions (see simplified version in Fig. 1).

 

Figure 1.

O-rings are deformed during use, either expanded over a pipe or squeezed into a bore, so they’re a prime candidate for flexibility in Pro/ENGINEER. We chose to make the inner diameter flexible, allowing a user to pick a cylindrical surface to determine the assembled diameter. We also liked the idea of using the component interface capability (Fig. 2), since they’re assembled the same way each time.

Figure 2.

So, this was a great chance to introduce these intelligent capabilities to parts. Even for simple items like o-rings, a bit of foresight can save a lot of time later on. Just think how many hundreds of times these parts will be assembled by our designers in the future…

A bit of a squeeze

We thought it would be good if the cross-section changed shape as the o-ring was deformed (Fig. 3), so I modeled an o-ring with an elliptical cross-section and used relations to tweak the major and minor diameters, giving the appearance of deformation.

Figure 3.

After talking to a few of our engineers, however, we decided to keep things simple and retain the circular cross-section. The overlap would allow a designer to see the potential compression, plus the ellipse did not form a true representation. So it was back to a simple circular cross-section, and then on with the show.

Multiplication

The o-ring part numbers, descriptions, sizes and materials were already available on our Windchill server, so we sorted and filtered the data in a spreadsheet (Fig. 4). There were 369 sizes, each available in 23 materials, resulting in 8,487 possible combinations. Family Tables offered an attractive approach since they should be good at this kind of thing. But past experience with Pro/INTRALINK and Family Tables had taught me to be cautious, so we chose to create 369 parts, each holding a family table for the 23 material options. (We later decided to break up even these family tables.)

Figure 4.

Follow that trail

Faced with modeling 369 parts and having limited dedicated resources (i.e., myself!), I realized it was time to get smart and let the computer take the strain. Trail files sprung to mind as I’d already done my homework and knew they could be used for automation, much like macros and mapkeys. The great thing about trail files is their editability—allowing you to record, tweak in a text editor, then play back the new version. Plus, Pro/ENGINEER can be run in “no graphics” mode with a trail file, further speeding up the process.

So I blazed a trail:

  1. Create new part, using o-ring template.
  2. Edit dimensions (Inner diameter, Cross-section size).
  3. Edit parameters (Description, Material – use config.pro option “new_parameter_ui no” to enable accurate parameter editing).
  4. Regenerate.
  5. Save + erase from memory.

 

By opening the resulting trail file in a text editor, we replaced the sizes and parameters by “dummy” values such as XXX, YYY, ZZZ etc. The next goal was to merge this master trail with the list of numbers, values and parameters.

Mammoth mail merge

If you’re an administrator or systems flunky, you probably have your own favorite scripting or programming language. Whether it’s batch scripting, C++, Java, Javascript, Perl or whatever, you can put together a few lines of code to accomplish great things. Here I used Javascript to process the text, with the original trail file in a textarea and the values held in arrays. This project actually spawned a useful web-page trail generator that I’ve since used for several other projects, combining lists of values with trail file skeletons and spitting out the goodies (Fig. 5). You can try out an example of the trail-maker discussed here by going to http://www.cadmin.co.uk/proadmin/trail-maker.htm.

Figure 5.

Keeping a low profile

Now that we had our mammoth trail files, we prepared to run them through Pro/ENGINEER. We first played a snippet of the trail file to check to see if it worked properly. With this under our belt, it was time to turn off the graphics and let Pro/ENGINEER work away “in the background.” We achieved this with a couple of command line switches:

call c:\ptc\proe\bin\proe.bat c:\orings.txt -g:no_graphics

The line includes a call to the usual Pro/ENGINEER startup batch file, then a mention of the trail file and selection of the “no_graphics” mode. Trail files run much quicker without graphics, since there’s no need for the computer to worry about displaying the program and 3D models. Still, it was a case of kicking back and leaving the computer to run through the mountains of o-rings. (Great time for a cup of tea…)

Note: To save the items to an existing workspace (e.g., Work), simply add another switch: 

call c:\ptc\proe\bin\proe.bat c:\orings.txt -g:no_graphics -wWork

  

Chop up the tables

This was about the time we made a decision that probably should have been made earlier (sometimes things move so fast!)—to explode all of those family tables. After presenting the idea to several engineers and thinking it over again, we reckoned it would be better to have separate Pro/ENGINEER parts for each and every o-ring. This would make things tidier in Pro/INTRALINK and Windchill.

Up to this point, we’d used “old-style” o-rings that were controlled via a family table of 100 items. This family table was often updated with new sizes, causing conflicts in Pro/INTRALINK. One aim of the o-ring project was to create all potential o-rings you’d ever be likely to need. 

Anyway, I used the trail file method again to break up the family tables:

  1. Open generic + instances.
  2. Tools > Family Table > Delete Entire Table.
  3. Save all instances (they become standalone parts at this point). 

The trail file and part numbers were plugged into the trail generator, and this new trail file processed the hundreds of family tables into thousands of separate parts.

Into Pro/INTRALINK

Now we had thousands of parts in several workspaces, all ready to be checked in to Pro/INTRALINK. To conserve bandwidth (and patience), I decided to submit them in batches. The files were destined for various Pro/INTRALINK servers around the company and the world, so the submission process had to be automated and repeatable. 

This was a great chance to use Pro/INTRALINK UI scripting. (Read more on this from Matt Meadows in the Fall 2004 issue of Profiles Magazine  http://www.profilesmagazine.com/p29/tips_meadows.html and my own explanation at http://www.cadmin.co.uk/proihelp/admin_scr.htm). 

I recorded a couple of actions, then edited the script and recompiled:

  1. Select 100 rows.
  2. Object > Checkin > OK.
  3. Copy this + paste to loop through all parts.

Figure 6.

Note: Turn off “Key Recording” so that you can use row numbers instead of part numbers. For example, if you select the workspace’s first 100 rows:

...

IL.deselectAll( "WSPI" );

IL.selectRange( "WSPI", 0, 99 );

...

 

Copy and paste code to check in the rest, i.e.,

 

...

IL.selectRange( "WSPI", 100, 199 );

...

 

All’s well that ends well

Since the original o-rings, we’ve successfully repeated this process for other standard parts. The upfront investment is well worth it, reducing errors and duplication of work. We’re making the software do the repetitive work, leaving designers free to concentrate on their designs rather than drawing up simple or standard parts.

The techniques mentioned here (templates, trail files and UI scripting) can all be used in a variety of situations. Hopefully, this starts you thinking about the power available at the touch of a button.

 

Edwin Muirhead is CAD manager at Weatherford UK and creator of CADmin.co.uk, a leading website for Pro/ENGINEER tips and CAD Admin resources. He can be reached by email at Edwin.Muirhead@eu.weatherford.com.

Time-Saving Techniques for Making Thousands of Parts

Opportunity Awaits You in Dallas

PLM Pain Relief

Meet the Windchill Customer Council

Reel 3D From the 50's – Presentations That Pop

Pro/TOOLKIT: Getting Along With UDFs

Extending All Four Axis Lines at Once in Pro/ENGINEER Wildfire 2.0

Creating a Rectangular Fill Pattern for Regular Hexagonal Cutouts