Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

assembly family table 1

Status
Not open for further replies.

osebax

Mechanical
Apr 12, 2015
1
0
0
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
 
Replies continue below

Recommended for you

Each instance will be an assembly, e.g. if generic is FRUIT.ASM, the instances will be APPLE_INST.ASM, PEAR_INST.ASM etc.
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
 
I do it slightly differently. I add 2 parameters to the part (part called generic for this example) -

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)
 
I like that approach robertib, I can see the benefits in that, but it requires constantly updating ProProgram each time a new instance is added.
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.
 
It's not updating the program, but adding an extra if statement to the relations - the PRO/Program part remains the same in all cases.

I did make a mistake in my earlier post.

The parameter INSTANCE_NAME should be in the assembly, not the part.
 
Program is a text view of the model logic. It includes the relations, so editing the relations edits the Program. There are some additional operations that are available only in the Program environment but it isn't separate from the rest of the model.
 
It was developed to build highway trucks in Creo, where each truck is built from a list of bill of materials, each bill representing a component and it's placement on the truck. The objective of modelling in Creo is to ensure all components ordered for the truck can be fitted. One example as to why the programme is so large is because the library of fuel tanks available for selection is in the tens of thousands. Instaed of modelling each one as a Creo model, the tank and its components are created from features of the 'master' or (template) assembly. Features representing the different shapes of tank body shell, cuts to define the length of tank, along with shrink wrapped models of fillers, drain taps etc. must be available in the master assembly and have to exist at each of the 8 possible locations for the tanks. Each of these is suppressed until ProProgram logic switches it back on. Data input is by means of 20 screens of the associated LAYOUT file. Hope this goes some way to explaining.
 
Status
Not open for further replies.
Back
Top