Troubleshooting DriveWorksXpress Equations
You can get some pretty fancy equations when working with DriveWorksXpress, sadly the nice DriveWorks equation editors that make debugging these equations aren’t avalaible until you upgrade to at least DriveWorks Solo. Luckily you already own a nice equation editor…Excel!
Let’s take an easy example. Let’s imagine we want to drive a dimension of a part based on a DriveWorks drop down box that contains the values: “Small”, “Medium” and “Large”. [We’ll name the input “Choice” in DriveWorks.] We want the values of the driven dimension to be 2, 3, and 4 respectively.
To use Excel as a debugger, paste the formula into Excel as I did below at cell A1. (Put the equal sign in front.) At this point, Excel is going to do some simple syntax checking and parenthesis will be color coded to help you match them up. In our case the syntax is correct so Excel takes the equation without much of an issue.
However we do have a problem. The DriveWorks input “Choice” doesn’t make any sense to Excel. That is why it is giving us the “#NAME?” error. The solution is to create a named range with the same name as our DriveWorks input. Excel will substitute the values in the named ranges for the DriveWorks input. In the example below, I named name cell C1 “Choice”. Do this by: highlighting the cell, then type the name of the range [DriveWorks input] in the area just to the left of the equation…the trick is to hit the Enter key when you are done, do not click out of that cell with your mouse.
You see that now cell A1 has the value of “4”, which is logical because “Choice” (the cell formerly known as C1) is neither “Small”, “Medium” nor “Large”. I can now put different values into “Choice” and watch my equation update.
For gruesome equations -with many DriveWorks inputs, nested if-thens and more parenthesis than a lisp routine, I almost always use this trick as a sanity check…it is a fast way to ensure my equations are behaving as I expect.