Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Pro/Program IF statement issue

g_spy20

New member
I have the following IF statement in my pro/program for my assebly:


IF QTY==4 | STY=="H" & QTY==3 & HND=="R"


This IF statement is used to turn on/off a part in an assembly. The "QTY==4" will not turn on the part, however the "STY=="H" & QTY==3 & HND=="R"" will. I have tried to reorder the two statements, but then "STY=="H" & QTY==3 & HND=="R"" will not work and "QTY==4" will. Essentially whatever follows the OR character works and whatever precedes it doesnt work.


I have had this issue with other IF statements as well. Please let me know if there are any character errors, other ways to convey this, etc.


Thanks.
 
Yep, that should fix it. You gotta be careful when using OR and AND conditions together. They often negate each other.


Jim
 

Sponsor

Articles From 3DCAD World

Back
Top