if my choice "1" i want to add only "SECTION_1.ASM"
if my choice "2" i want to add "SECTION_1.ASM"and"SECTION_2.ASM"
if my choice "3" i want to add "SECTION_1.ASM"and"SECTION_2.ASM"and"SECTION_3.ASM"
if my choice "4" i want to add "SECTION_1.ASM"and"SECTION_2.ASM"and"SECTION_3.ASM"and"SECTION_4.ASM"
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
INPUT
SECTION_NUMBER NUMBER
"SECTION NUMBER CHOICE ( 1, 2, 3, 4 )"
END INPUT
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
where is the problem in my program ?
IF SECTION_NUMBER==1
ADD SUBASSEMBLY SECTION_1
INTERNAL COMPONENT ID 40
END ADD
END IF
IF SECTION_NUMBER==2
ADD SUBASSEMBLY SECTION_1
INTERNAL COMPONENT ID 40
AND
ADD SUBASSEMBLY SECTION_2
INTERNAL COMPONENT ID 41
PARENTS = 40(#5)
END ADD
END IF
IF SECTION_NUMBER==3
ADD SUBASSEMBLY SECTION_1
INTERNAL COMPONENT ID 40
AND
ADD SUBASSEMBLY SECTION_2
INTERNAL COMPONENT ID 41
PARENTS = 40(#5)
AND
ADD SUBASSEMBLY SECTION_3
INTERNAL COMPONENT ID 49
PARENTS = 41(#6)
END ADD
END IF
IF SECTION_NUMBER==4
ADD SUBASSEMBLY SECTION_1
INTERNAL COMPONENT ID 40
AND
ADD SUBASSEMBLY SECTION_2
INTERNAL COMPONENT ID 41
PARENTS = 40(#5)
AND
ADD SUBASSEMBLY SECTION_3
INTERNAL COMPONENT ID 49
PARENTS = 41(#6)
AND
ADD SUBASSEMBLY SECTION_4
INTERNAL COMPONENT ID 54
PARENTS = 49(#7)
END ADD
END IF
Solved! Go to Solution.
Hi,
try following:
ADD SUBASSEMBLY SECTION_1
INTERNAL COMPONENT ID 40
END ADD
IF SECTION_NUMBER > 1
ADD SUBASSEMBLY SECTION_2
INTERNAL COMPONENT ID 41
PARENTS = 40(#5)
END ADD
END IF
IF SECTION_NUMBER > 2
ADD SUBASSEMBLY SECTION_3
INTERNAL COMPONENT ID 49
PARENTS = 41(#6)
END ADD
END IF
IF SECTION_NUMBER > 3
ADD SUBASSEMBLY SECTION_4
INTERNAL COMPONENT ID 54
PARENTS = 49(#7)
END ADD
END IF
Good luck
MH
Hi,
try following:
ADD SUBASSEMBLY SECTION_1
INTERNAL COMPONENT ID 40
END ADD
IF SECTION_NUMBER > 1
ADD SUBASSEMBLY SECTION_2
INTERNAL COMPONENT ID 41
PARENTS = 40(#5)
END ADD
END IF
IF SECTION_NUMBER > 2
ADD SUBASSEMBLY SECTION_3
INTERNAL COMPONENT ID 49
PARENTS = 41(#6)
END ADD
END IF
IF SECTION_NUMBER > 3
ADD SUBASSEMBLY SECTION_4
INTERNAL COMPONENT ID 54
PARENTS = 49(#7)
END ADD
END IF
Good luck
MH
Hello Hanak ,
you're right , thank you...