[Ny...] Posted June 4, 2025 Share Posted June 4, 2025 hi, first time posting here I am trying to choose to report the circle without an error, and if they are both calculating, the closest to nominal. But if the inputs contain a un-computed value the whole result will also be un-computed, is there a way around this? Thanks in advance, Nyall Link to comment https://qualityforum.zeiss.com/topic/23601-if-statements-in-user-defined-checks/ Share on other sites More sharing options...
[Ny...] Posted June 4, 2025 Author Share Posted June 4, 2025 I think I have the solution... if anyone else comes across a similar issue, the proper test for if an element is uncomputed is: x = "???" if A.actual.computation_status != INVALID: if B.actual.computation_status != INVALID: if abs(C.nominal.diameter - A.value) < abs(C.nominal.diameter - B.value) : x = A.actual.diameter else: x = B.actual.diameter else: x = A.actual.diameter else: if B.actual.computation_status != INVALID: x = B.actual.diameter else: x = "???" x 1 Link to comment https://qualityforum.zeiss.com/topic/23601-if-statements-in-user-defined-checks/#findComment-133215 Share on other sites More sharing options...
[Ti...] Posted June 6, 2025 Share Posted June 6, 2025 Interesting, I didn't know you could use custom python code in the user defined, I was always using the basic functions in the fx dropdown. We measure difficult features and I many times need to construct many feature to get an average or to avoid question marks. This will help me in the future, thanks. Link to comment https://qualityforum.zeiss.com/topic/23601-if-statements-in-user-defined-checks/#findComment-133343 Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in