04/17/2017

Creo Parametric 3.0 Tip: How to Set Parameters Based on Part of Other Parameters Within the Same Model

If you want to set up a new parameter that is part of another parameter, you can do so with the following equation:

New_Parameter=extract(param,(string_length(Parameter))-X,Y)

Where "New_Parameter" is the name of your new parameter and "Parameter" is the name of the parameter you are taking characters from. "X" is how many characters from the end of the string you want your new parameter to start at and "Y" is how many characters you want included in your new parameter.

The following relation sets a new parameter called "Part_no" to take the last 3 characters from the parameter "Part_name", which is currently set to "Parameters_123".

Part_no=extract(Part_name,(string_length(Part_name))-2,3)

After clicking ok and regenerating the model the parameter "Part_no" is set to "123".