Nested IF relations
Nested IF relations
(OP)
I am having some issues with a part family table.
I am developing a family table of parts for electrical connector test mates per this Military standard. The family is 9 parts that fall into 3 categories, 2 rows of leads, 3 rows or 4 rows.
The first relation I wrote was based on the size with < and > as the logical expressions, but it kept crashing my ProE session for some reason.
So finally I ended up with this:
It works well for 4 row and 2 row parts, but not for 3 row. Any ideas?
I am developing a family table of parts for electrical connector test mates per this Military standard. The family is 9 parts that fall into 3 categories, 2 rows of leads, 3 rows or 4 rows.
The first relation I wrote was based on the size with < and > as the logical expressions, but it kept crashing my ProE session for some reason.
So finally I ended up with this:
CODE -->
/* NOMENCLATURE Y3R IS Y DIMENSION OF 3RD ROW 1ST FROM LEFT
/* PITCH CONTROL
IF N_ROWS >= 3
PX1R = .075
PX2R = .075
PX3R = .075
PX4R = .075
IF N_ROWS == 2
PX1R = .1
PX2R = .1
PX3R = .1
PX4R = .1
ENDIF
ENDIF
/* HOLE PATTERN CONTROL
IF N_ROWS == 4
$Y3R = .0375
X2R = .0375
X1R = .075
X4R = .0375
IF N_ROWS == 3
$Y3R = 0
X2R = .0375
X1R = 0
X4R = .0375
IF N_ROWS == 2
$Y3R = -.0375
X2R = .0250
X1R = .075
X4R = .050
ENDIF
ENDIF
ENDIF
/*SHELL OUTSIDE DIMENSIONAL CONTROL
IF N_ROWS == 4
WIDTH = ((SIZE / 4) + 1) * .05 + .155
H = .490
IF N_ROWS == 3
WIDTH = ((SIZE / 3) + 1) * .05 + .125
H = .390
ENDIF
ELSE
WIDTH = (CEIL(SIZE / 2) - 1) * .05 + .140
H = .298
ENDIF It works well for 4 row and 2 row parts, but not for 3 row. Any ideas?





RE: Nested IF relations
Same problem with entire /* HOLE PATTERN CONTROL section.
RE: Nested IF relations
RE: Nested IF relations
It is not needed with what you are trying to do!
Just set your IF for your row counts, then the spacing in the IF-ENDIF construct.
IF n_rows == 2
set spacing data
ENDIF
IF n_rows == 3
set spacing data
ENDIF
IF n_rows == 4
set spacing data
ENDIF
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Nested IF relations
Not sure why I was trying to force the nested ifs, I guess having a cold and working too many hours to get the project out before the end of the year could have something to do with it, haha