29 Aug, 2019

On Automating Problems Away With Joe Burch

I recently had a chat with Joe Burch at Tesla’s office in Palo Alto. He told me about his first VBA code, which he wrote as a young engineer, to solve some 20,000 CATPart problem in V5. So I was like: "Would you be interested in an interview, Joe?" He gladly agreed. Here it is!

1- What do you do at Tesla?

I have had a number of roles in the past, but I am now a Technical Program Manager on a software team in Service Engineering. This role has a pretty diverse set of responsibilities and challenges, both in the technical realm (e.g. diving into databases, making occasional code changes) and the program management realm. (e.g. tracking projects and time-lines, coordinating projects with other teams) It’s an exciting mix each day!

2- From my interaction with you, I learned that you sometimes write your own automation to get things done. How did you start ? What was the first time you had to write your own code like? How long did it take you to write, and how much time did you save?

I have learned over time that I really enjoy finding “lazy” solutions to repetitive problems. My first automation experience was an example of that. I was a new engineer at my first employer, and was tasked with fixing a small error in about 20,000 CATIA V5 parts. Performing this work manually felt crazy to me, so I went in search of a better solution. Since I was using CATIA V5, VBA (Visual Basic for Applications) was the obvious choice for me. I recorded a macro and refined it (many times!) until it met my needs. The process was (as you might imagine) driven mostly by trial-and-error. I discovered which fixed values needed to be replaced by variables, where I should set the boundaries of a loop, etc. I also made some important discoveries the hard way! For example, at that time, a CATIA V5 process would get a bit slower each time you opened, saved, and closed a CATPart, so I eventually wound up restarting V5 every 100 CATParts or so, and had the VBA code running in a different process. (in Microsoft Excel)

In the end, I would (roughly) guess I spent about 40 hours in total development, and saved about 120 hours. (and my sanity!) Perhaps most importantly, that project got me excited about future automation possibilities, and launched my career as a CAD/PLM administrator.

3- What automation resources were available to you back then? Where do you draw the line between self-learning and the risk of going down a rabbit hole?

I relied heavily on the following resources:

  • A variety of VBA language references online, since that language is built into the Microsoft Office suite
  • This useful help file for CATIA V5 automation: [CATIA V5 install Path]\win_b64\code\bin\V5Automation.chm
  • The forums at http://www.coe.org/

As far as self-learning vs “going down a rabbit hole” – I often proceed on my own so long as I feel I am making some progress. But the advice of those with more experience is often very valuable!

4- If you were to write a script or a program all over again, which one would it be and why?

I wrote an integration between Dassault Systemes’ SmarTeam and Adobe LiveCycle for 3D PDF Generation, which was totally custom and not very well documented. Writing clear, readable, and well documented code for others (including myself in the future!) is something I’ve come to appreciate more over time. [Here is how it worked]

5- Do you think it’s "automation" "vs", "in spite of", "instead of", "along with" , or "of" design and engineering? Why?

Depending on the task, and the frequency / scope of design changes, I feel that automation can be complimentary to the design process. So definitely “Automation along with design and engineering”. If a company will make 100+ variants of a design, automating common tasks (even as simple as automatically producing drawing views!) can save a lot of time. However, it can sometimes be easy to fall into the trap of planning complex automation that is rarely used, so scrutinizing the use-case carefully is an important aspect of the work. I have written lots of automation that was only used a few times, and probably wasn’t worthwhile. Those projects were still good learning opportunities however!

6- Should schools acknowledge automation and integrate it as a subject of study for undergrads and Why? If yes, in what fashion?

In my opinion, an introductory education into automation can be quite valuable, and serves a couple of important purposes:

  • It teaches a mindset of what is possible with automation. Even if they don’t write code themselves, this helps those students become better “partners” when automation is developed.

  • In some cases, it can provide exposure to software development for the first time, giving valuable exposure to those who haven’t had any other experience in the subject.

For myself, needing to tackle real-world problems was the best way to learn. So an automation education which addresses the types of challenges faced by engineers in industry feels like the most helpful to me.

Tags: , ,

About : Maher Elkhaldi

Maher Elkhaldi is a senior applications engineer at Tesla Motors. He founded the 3DXAutomation blog to help make knowledge of programming CATIA easier to find, and contribute to the open-source community.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.