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

Control part level family table with assembly parameters

Participant

Control part level family table with assembly parameters

Probably a bit of a newbie question but I am looking to have an assembly level parameter(s) that would define what instance of a part is used in the assembly.

 

Example of the use might be a piping selecting a pipe flange on a vessel. The flange part itself is driven by a family table and it is mated to a piece of pipe which is in turn mated to a vessel. I could replace the flange and pipe manually but I want to also drive multiple parts with one parameter change, i.e. I would like to set a parameter to select a 6" flange and have the flange part select the appropriate instance based on the parameter. This parameter would also update the pipe part, the hole in the vessel and the BOM on the drawing.

10 REPLIES 10

Re: Control part level family table with assembly parameters

With Pro/PROGRAM I believe you can use statements to select members of a Family Table or Interchange Assembly based on parameter values.

 

Dave Martin - dmartin@creowindchill.com - https://www.creowindchill.com

Re: Control part level family table with assembly parameters

Hi Dave, Thanks for the reply.  Yeah you are probably right since pro/program can control most features in the model. I guess I was hoping for a cleaner parameter + relation type soluion but I'll start learning the syntax I think.

 

Time to dust off that pro engineer automation book I bought years ago!

Re: Control part level family table with assembly parameters

Usually when I need to do this kind of thing I resort to family tables. The subcomponents of interest have family tables, so they have all the versions of each component that I will need. Then, in the assembly, I have the subcomponents as columns in the table. Add entries for all the versions of the assembly that I want. For each column of subcomponents, where it usually just has "Y" or "N", instead put in the name of each subcomponent's instance that I want for a particular version of the assembly. When you bring up one of the assembly instances, if you've done things right, you get the mix of subcomponents that you want.

It's not a picnic setting up, but it's reliable.

Re: Control part level family table with assembly parameters

Great information, thanks. Allows me to look for more things to learn.

 

Ulimately this is all going to be connected / run off a spreadsheet

Re: Control part level family table with assembly parameters

@DaveMartin probably refers to the "LOOKUP_INST" functions.

 

You can use RELATIONS to let Creo select the correct instance of a family table (FT) based on the input of one or multiple parameters.

 

For example, let's say you have a FT of a bolt, called "bolt.prt". That FT has a parameter called "DIAMETER" and "LENGTH". You have added a bolt (M4x30) to your assembly, and now you want to drive that bolt.

 

If you know the distance/thickness of your construction (two plates bolted together), you can let Creo select the correct bolt length.

 

So, let's assume that you have a parameter called "BOLT_DIAMETER" and "CLAMP_THICKNESS".

The "BOLT_DIAMETER" holds the exact diameter your bolt needs to be, "CLAMP_THICKNESS" is the minimum value/length your bolt needs to be.

 

In your RELATIONS, add this code:

 

BOLT_INSTANCE = LOOKUP_INST("bolt.prt",1,"DIAMETER",BOLT_DIAMETER,"LENGTH",CLAMP_THICKNESS)

 

So how does the "LOOKUP_INST" work?

lookup_inst ("generic_name", match_mode, "param_name_1", match_value_1, "param_name_2", match_value_2,...) 

 

generic_name = the name of your FT, with the extension (.prt or .asm)

match_mode = one of these values

  • -1 (search for the closest instance where the paramater value is smaller or equal)
  • 0 (search for the instance where all the parameters match exactly)
  • 1 (search for the closts instance where the parameter value is equal or greater)

param_name_1 = The name of the FT parameter

param_value_1 = The value that you want to match (accoring to the match_mode)

 

!!! Pay attention to the quotes ("...")  !!!

 

Now, in your PRO/PROGRAM, replace a bit of code where you have added an instance of your bolt to your assembly:

 

ADD PART bolt_m4x30

...

END ADD

 

ADD PART (BOLT_INSTANCE)

...

END ADD

Re: Control part level family table with assembly parameters

UPDATE: 

After refreshing Creo it started to work.

 

 

I'm trying to do the same thing with a turnbuckle assembly, but I seem to be missing something because I am getting a relationship error.

 

This is my look up code

TURNBUCKLE_INSTANCE = LOOKUP_INST("TFAR-12133_TURNBUCKLE_ASSY1.ASM",-1,"INSTANCE", TURNBUCKLE)

 

and I replaced 

ADD SUBASSEMBLY TFAR-12133_TURNBUCKLE_ASSY1
...
END ADD

 

with

ADD SUBASSEMBLY (TURNBUCKLE_INSTANCE)
...
END ADD

 

I added pictures of the turnbuckle family table and some of the parameters from the assembly that the turnbuckles will be in. Can you tell what I may be missing?

 

Thanks,

Zach

Re: Control part level family table with assembly parameters

The value for "INSTANCE" needs to match a number in the "INSTANCE" column. I think if you change it from zero it would help.

Highlighted

Re: Control part level family table with assembly parameters

You have a "match_mode" of -1, which means that you are looking for an instance where the parameter "INSTANCE" is equal to 0 (the value of TURNBUCKLE) or lower.

 

There's no match, so the LOOKUP_INST should return the generic.

Re: Control part level family table with assembly parameters

I'd advise you to develop your model using Pro/Program, as @DaveMartin suggested.

 

Output your data (parameter values) from your spreadsheet to a formatted text file and regenerate your customised models using the 'Read File' option.

 

@KenFarley gave another piece of the jigsaw, "where it usually just has "Y" or "N", instead put in the name of each subcomponent's instance". You can make the selection of instances at regeneration time using the parameter values output from your spreadsheet.