×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

vba IF THEN expression to create a relation

vba IF THEN expression to create a relation

vba IF THEN expression to create a relation

(OP)
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".

RE: vba IF THEN expression to create a relation

(OP)
More accurately, I incorrectly used the phrase "Part Interface". The correct term is "Component Interface".

RE: vba IF THEN expression to create a relation

(OP)
How about it? Anyone up to the Pro-E (Wildfire 3) Relations IF/THEN VBA challenge?

RE: vba IF THEN expression to create a relation

I thought vba wasn't till wf4

RE: vba IF THEN expression to create a relation

(OP)
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".

RE: vba IF THEN expression to create a relation

you may need double = signs

==

 

RE: vba IF THEN expression to create a relation

(OP)
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"  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources