stupid simple formula question

What I am trying to do is automate a simple rule that creates screw holes on a bar.  It needs to follow the ruleset of **never >12" between holes** and **always a hole 2" from each end**

I'm doing this with two hole features, one variable one in the middle and one putting the hole at each end. and two pattern features (fill every 12") patterning outward from the center driven hole.  I'm also trying to avoid having two holes particularly close to each other so I have the pattern switch from centered to off-centered when they start to encroach on the end holes.

 

Currently i have it driven by excel but I would like to know if there is a way to pack the formula into the part itself so that It doesn't need excel.

 

My exel formula is:

=IF(ISODD(ROUNDDOWN(((B2-4.125)/12),0)),"0","6")   **B2 being the length of the bar

 

So a length of B2=40 would output "6" and a length of B2=41 would output "0"

The 0,6 controlls the distance off-center the first hole is.

 

I've attached the part and excel file as I probably didn't explain it well enough.

 

any help is much appreciated

-Lee

2 REPLIES

Re: stupid simple formula question

SEE IF THE IF/THEN STATEMENTS DISCUSSEDIN THSI THREAD HELPS YOU AT ALL

 

http://community.plm.automation.siemens.com/t5/Solid-Edge-Forum/Variables-with-if-then-rules/m-p/299...

 

Re: stupid simple formula question

hrmm it may, I'm not sure how i'd use ABS to get at what I need. I'll have to look into it more thanks.