Hello
I am looking to write:
If the Øext = 14 then the center distance = 5.5
If the Øext = 17 then the centre distance = 7
If the Øext = 21 then the center distance = 9
in the form of an equation.
nom_des_cotes.png
Hello
I am looking to write:
If the Øext = 14 then the center distance = 5.5
If the Øext = 17 then the centre distance = 7
If the Øext = 21 then the center distance = 9
in the form of an equation.
Hello
It should look like this (by default, if DIAMEXT is neither equal to 17 nor 21, the CENTER DISTANCE will be equal to 5.5):
EQ1 = if(DIAMEXT=17,7,5.5)
CENTRE DISTANCE = if(DIAMEXT=21,9,EQ1)
I wrote: EQ1= (iif("Ø ext@Esquisse1@063.13.01.Part" = 17, 7, 5.5)) but it tells me that the equation is invalid.
The problem doesn't come from the double "i" in "iif"? And the 2 parenthesis games are probably not necessary:
EQ1 = if("Ø ext@Esquisse1@063.13.01.Part"=17,7,5.5)
you should not put the Ø sign
http://www.lynkoa.com/sites/default/files/questions/answer/12/03/2015/pb_equations.jpg
Even writing like you, I have a mistake. It's maybe the second = he doesn't like.
I wrote:
"EQ3"= (iif("Ø ext@Esquisse1@063.13.01.Part"<17,5.5,7))
"entraxe@Esquisse3@063.13.01.Part" = ( iif("Ø ext@Esquisse1@063.13.01.Part">17.9, "EQ3"))
But the Ø17 has the 7th spacing, the Ø21 has the 9th spacing but the Ø14 has the 7th spacing too.
I found a solution that works. The only problem is when I update the 3D, I have to click 2 times on rebuild for the 5.5 center distance to update.
In SolidWorks 2011, I have to write iif for the equation to be correct. If I write if an error message appears: The syntax of the equation is not correct.
Hello
I just saw that the equals sign = doesn't work and there's a trick. Normally, no need to rebuild 2 times (and the iif has been changed to if with only one i since SolidWorks 2012).
The equations will therefore be:
Your second equation doesn't work.
It works if I write like this:
EQ3 = iif(not("Ø ext@Esquisse1@063.13.01.Part")<>17,7,5.5)
"entraxe@Esquisse3@063.13.01.Part" = (iif("Ø ext@Esquisse1@063.13.01.Part" > 17, 9,"EQ3" ))
On the other hand, we have to rebuild twice.