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.

proprogram if statements help!!!!

omarhernandez

New member
I am having a hard time believing that proprogram will not let you execute an if statement inside of an execute command.
smiley7.gif
smiley7.gif
smiley7.gif
smiley7.gif



I'm trying to execute dimension from an assy to a subassy. If there is anyone that could help me it would be greatly appreciated.Here's the if statement...


EXECUTE ASSEMBLY 045_PEA3
PASS_VAR_DOWN = PASS_VAR_DOWN


IF PASS_VAR_DOWN == YES
ANVIL_SPACER_BLOCK = ANVIL_SPACER_BLOCK
PUNCH_EXT_BACKUP_BLOCK = PUNCH_EXT_BACKUP_BLOCK
A_PEA3 = A_PEA3
B_PEA3 = B_PEA3
C_PEA3 = C_PEA3
D_PEA3 = D_PEA3
ENDIF


END EXECUTE


P.S. - I didn't have any empty lines in the program, I just posted It this way to make it easier to debug for myself.


Omar
 
I havn't used the execute command but I have passed down parameters from assy to subcomponentsbefore. I think you need the session ID of the subassy in the assignment statements.


A_PEA3:ID = A_PEA3
B_PEA3:ID = B_PEA3
C_PEA3:ID = C_PEA3
D_PEA3:ID = D_PEA3


Change ID to whatever the session ID is of the subassy or subcomponent


Joe
 
That's not the problem I am having. I don't think my relation inside of proprogram work because proprogram was not designed to execute if statements inside of execute command, but I would like some opinons on this matter.


Omar
 
Hi,


I think you might have solved this problem by now....If not...


You have just mentioned the IF PASS_VAR_DOWN == YES what would happen if it is NO.


Vishnu
 
Omar,


You have to let it go. You are trying to put relations in the execute statement and that is not how it is done. Joe had one way, using session ID, Or they have to be passed down in a layout. The assembly and the part are declared to the layout.
smiley2.gif
 

Sponsor

Back
Top