PDA

View Full Version : Using "If" Statements in fields?



ReachAndre
2008-06-05, 02:45 PM
Hello all,
I trying to use "if" statements in my formula. I started by trying to use an excel style formula, but this did not work at all.


Lets say B7 is a fielded value from a seperate object.

Ex:
=
IF(B7>2400,"16",
IF(B7>1600,"14",
IF(B7>1120,"12",
IF(B7>720,"10",
))))

Does anyone have any ideas on how I might be able to do this?

Thanks in advance all,
Andre

irneb
2008-06-18, 03:54 PM
Unfortunately not in formula. You can try using DIESEL instead, but it won't refer to another field-code inside a DIESEL expression. Thus your references to cells (as in B7) will be interpreted as text - not a "lookup" field-code to get the value of cell B7. For example this DIESEL code will give an error:
$(IF,$(>,B7,2400),16,$(IF,$(>,B7,1600),14, ......... ))

If you're using 2008 (or later), try creating your "table" in Excel - include the formulas there. Then Copy & Paste-As Link (with AutoCAD entities) into AutoCAD. This will create a table linked to the XLS file.