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.

RELATION

divyanandh

New member
HOW TO WRITE RELATION FOR AN ASSEMBLY USING CONDITION STATEMENT. THERE IS A PROBLEM THAT THE RELATION IS NOT EXCUTED
 
Here is a conditional statement from an assembly I made. "D2:24" refers to dimension D2 in assembly component 24. It states that if those conditions are met, then the rest of the called dimensions will be assigned. You must use 2equal signs (==) in the conditional statement. You can designate multple component members. You can also use < or > for qualification and only one symbol is needed. The statement must begin with "if" and end with "endif". Multiple if statements can be consecutive, allowing Pro to sequence through them until it finds the condition met. I have also added an "if,else" statement that is driven in the same assembly relation sequence


if D2:24==23.75 & D1:24==29.5
D13:24=13.125
D30:22=10.625
D31:22=10.84375
D79:22=14
D80:22=7.75
D5:30=14.125
D6:30=8.875
endif


if D2:24>20
D138:22=.875
else
D138:22=.75
endif


Hope this helps you out!!
 

Sponsor

Articles From 3DCAD World

Back
Top