AnsweredAssumed Answered

Macro and equations with IFF in them

Question asked by Jon Christensen on May 8, 2017
Latest reply on May 8, 2017 by Jon Christensen

Does anyone know how to add an equations with a nested iff in it? I have tried and can add other equations but not this one. What am I doing wrong? This is so that I can equate the sheetmetal thickness to a Gauge number.

 

swEquationMgr.Add -1, """Gauge_Number""= ""IIF(""Thickness"" LIKE 0.0598, 16, IIF(""Thickness"" LIKE .0747, 14, IIF(""Thickness"" LIKE 0.1046, 12, IIF(""Thickness"" LIKE 0.1345, 10, IIF(""Thickness"" LIKE 0.1875, 3/16, IIF(""Thickness"" LIKE 0.25, 1/4, IIF(""Thickness"" LIKE .375, 3/8, IIF(""Thickness"" LIKE 0.50, 1/2, 1000))))))))"j

 

I tried it without nesting (just for 12 GA) and it did not work either...but it does not give an error either?

 

swEquationMgr.Add -1, """Gauge_Number""=""IIF(""Thickness"" LIKE 0.1046, 12,1000)"""

 

I tried different "" combinations but that does not seem to be the problem either? Thanks for any help!

Jon

Outcomes