assembly family table
assembly family table
(OP)
Hello,
I was wondering how can I replace components by Family Table members in an assembly via Pro/Program considering my family table members are assemblies.
osebax
I was wondering how can I replace components by Family Table members in an assembly via Pro/Program considering my family table members are assemblies.
osebax





RE: assembly family table
It's useful to add the "_INST" to the instance label for 'housekeeping' purposes.
Add a string parameter say 'FRUIT_SELECT', this string will hold the selection of the NAME of the instance you want to show in the main assembly, e.g. APPLE, PEAR etc.
You can enter this through Javascript on a web page or Java or manually.
Add the family table to the main assembly
In Proprogram for the main assembly, in RELATIONS, add
COMP_FRUIT = FRUIT_SELECT+"_INST.ASM"
Now find in the EXECUTE section the entry for the FRUIT.ASM
ADD SUBASSEMBLY FRUIT
INTERNAL COMPONENT ID 12527
PARENTS = 36(#1)
END ADD
and modify this to read
ADD SUBASSEMBLY (COMP_FRUIT)
INTERNAL COMPONENT ID 12527
PARENTS = 36(#1)
END ADD
(You could also add here some logic which switches this OFF)
e.g.
IF (FRUIT_REQ=="Y")
ADD SUBASSEMBLY (COMP_FRUIT)
INTERNAL COMPONENT ID 12527
PARENTS = 36(#1)
END ADD
END IF
where FRUIT_REQ is a parameter you have set to either Y or N
Now save the edit, and regen the main assembly to show the selection you made.
Good luck
RE: assembly family table
1. an incremental number (must be added to family table) - in my case called INSTANCE
2. a string variable to denote the instance name - in my case called INSTANCE_NAME
Then just use the following line in the relations for the if statement
INSTANCE_NAME=LOOKUP_INST("generic.prt", 0 , "INSTANCE", 1)
eg
IF (FRUIT_REQ==Y)
INSTANCE_NAME=LOOKUP_INST("generic.prt", 0 , "INSTANCE", 1)
else
INSTANCE_NAME=LOOKUP_INST("generic.prt", 0 , "INSTANCE", 2)
endif
In the PRO/PROGRAM replace the part name
ADD PART GENERIC
with the parameter
ADD PART (INSTANCE_NAME)
RE: assembly family table
In my environment where ProProgram is over 150,000 lines, a large assembly consisting of hundreds of sub-assemblies, and dozens of new instances added weekly, I prefer to set the logic for selection once and for all.
RE: assembly family table
I did make a mistake in my earlier post.
The parameter INSTANCE_NAME should be in the assembly, not the part.
RE: assembly family table
RE: assembly family table
RE: assembly family table