Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vba IF THEN expression to create a relation

Status
Not open for further replies.

iko2k

Mechanical
May 18, 2006
7
0
0
US
I would like to create an "IF" "THEN" expression to allow on condition to exist in a part "Family Table". I've created 2 part interfaces and would like to express that "IF" one particular part feature (interface) is used (as expressed in the family table as "Y" (YES)) "THEN" the other feature (interface) is not used. Conversely, IF the answer in the family table is "N" (NO) for the feature, "THEN" the other feature (interface) is used. The feature (interface) names are "screw_interface" & "sem_interface".
 
Replies continue below

Recommended for you

OK, I do not know VB language but Pro-E wildfire 3 does use something similar that allows expression very much like VB. Given the problem at hand, I've almost got this thing to work. Currently I have:
IF L1_THRD=YES
M1_THRD=NO
ELSE
M1_THRD=YES
ENDIF
Pro-e tells me "INVALID SYMBOL FOUND" after the first line. At least it recognizes the language. Maybe the syntax is wrong. It seems to be ok with the remainder of the statement. If I remove the initial "IF", it comes up with "L1_THRD" being ok but after which I get "Relation has an error" after the "ELSE" & "ENDIF".
 
I had tried the == previously but to no avail. However, I finally got it to take using the "Relations" - "Look In" - "Feature" instead of "Part". It verified the relations and all seemed well but in the end, Pro-E did not remove the feature as requested when creating the part.
I’m blank on this one.

IF L1_THRD==YES
M1_THRD=NO
ELSE
M1_THRD=YES
ENDIF

Pro-E verified the relations in the "Look In" - "Feature"
 
Status
Not open for further replies.
Back
Top