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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

SUMMARY - can Pro/PROGRAM change which instance is assembled?

lylebeidler
1-Visitor

SUMMARY - can Pro/PROGRAM change which instance is assembled?

Thanks to all who replied.

The answer is yes, it can do that.

Jason Clark supplied this sample code to show how:



RELATIONS

IF TANK_SIZE == "3000" & PRESSURE == "175"

FRONT_HEAD = "14031844"

REAR_HEAD = "14031836"

ENDIF



(similar relations redacted)



END RELATIONS





ADD PART (FRONT_HEAD)

INTERNAL COMPONENT ID 94

END ADD





IF TANK_SIZE == "6000"

ADD PART (SHELL4)

INTERNAL COMPONENT ID 5571

PARENTS = 5568(#12)

END ADD



ADD PART (SHELL5)

INTERNAL COMPONENT ID 5574

PARENTS = 5571(#13)

END ADD

END IF



ADD PART (REAR_HEAD)

INTERNAL COMPONENT ID 95

END ADD



Thanks also to Kevin Alexander for this:



There is a function called ?lookup_inst? that does exactly this ? from
Pro/Help:




To Replace Family Table?Driven Components


You can automatically replace family table?driven components according to
design criteria by using the lookup_inst function. With this function, you
can search a component family table to find an instance that fits the values
of the search parameters. If the lookup function does not find a match, it
returns the name of the generic.

The format for lookup_inst is:

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

where

* generic name?Name of the generic model with a .prt
or .asm extension

* match_mode?One of the following values:

o ?1 (find closest instance with param values less than or equal
to supplied values)

o 0 (find instance with param values that match supplied values
exactly)

o 1 (find closest instance with param values greater than or
equal to supplied values)

* param_name_1?Family table parameter name

* match_value_1?Value to match against

See Also

About
<file: c:\ptc\wildfire4\html\usascii\proe\program\about_replacing_componen<br="/>ts_in_assembly_designs.htm> Replacing Components in Assembly Designs

Example:
<file: c:\ptc\wildfire4\html\usascii\proe\program\example_replacing_family<br="/>_table_driven_components.htm> Replacing Family Table-Driven Components



--



Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
<">mailto:-> -
<">http://www.mgsincorporated.com>
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
0 REPLIES 0
Announcements


Top Tags