I have a spreadsheet that uses the "LookUp" function to automatically determine how many segments are required for an intermittent (tack) weld, based on the length of the weld joint.
I set up an excel analysis feature in Pro/E that uses a model parameter that is set (in a relation) to be equal to the length of the weld feature ('LENGTH' parameter, not the "WELD_LEN" parameter) as the input to the excel analysis feature.
The output is saved as a feature parameter. Then I have a feature relation for the weld that sets the NUM_OF_WELDS weld feature parameter to be equal to the parameter from the excel analysis.
This works, but the complexity makes it an unrealistic workflow. I have to regen my model three times in order for the correct number of welds in the intermittent weld feature to use the values calculated in the spreadsheet. I would need a seperate excel analysis feature for each weld feature, and I would need the additional model parameter for each weld feature. Clearly this isn't an acceptable solution, so I'm wondering if there is a way to define a feature relation that executes something like the LOOKUP function from excel?
Ideally, I would like to eliminate everything from my workflow except for a feature relation that I could import into the weld feature.
No responses so far ... we are going to try to use the Interactive C programming capability inside feature Relations to accomplish this. If anyone is interested, I'll post the results later.
You could try a series of nested IF statements, along the lines of:
if length > 100
segments = 10
else if length > 90
segments = 9
else if length > 80
segments = 8
else segments = 1
I'm not sure about the exact format for IF... ELSE IF in relations so it may need detail changes.
Clunky, but would do the same job as a LOOKUP.
Alternatively, could you define it mathematically, probably using int?
Thanks for the suggestion. I did consider that, but thought it might get cumbersome with a couple of dozen options, so was hoping to find something a little more elegant. Esp in light of the fact that what is now a couple of dzn options could easily be much larger if the capability worked well.
If we cannot get the Interactive C-program option to work, or if for some reason that has a negative impact on regen time, I'll go back & try your suggestion.