cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

how i can do it ? adding sub-assembly with pro/program

cyılmaz
8-Gravel

how i can do it ? adding sub-assembly with pro/program

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

ACCEPTED SOLUTION

Accepted Solutions

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


Martin Hanák

View solution in original post

2 REPLIES 2

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


Martin Hanák

Hello Hanak ,

you're right , thank you...

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags