Skip to main content
14-Alexandrite
July 14, 2017
Solved

Creating a user parameter that is linked to a model or system parameter

  • July 14, 2017
  • 1 reply
  • 4449 views

I ahve a Start part that is used every time I create a New Part.

 

I have created a user parameter in my Start Part named PART_NO.  It is a String type of parameter.

 

I would like to know how I can associate this user parameter to the the name of the part.

 

For example if I create a new Part using the above mentioned Start Part and name it TEST1, I would like the User Parameter from the Start PArt, which is named PART_NO, to have the value of TEST1, which is the name of the new part I just created.

 

Hopefully this makes sense.

 

Any suggestions?

Best answer by BenLoosli

Create a relation in your start part that evaluates the model name to your parameter.

 

Part_no = rel_model_name

 

This will take the model name and assign it to your Part_no parameter.

1 reply

BenLoosli23-Emerald IIIAnswer
23-Emerald III
July 14, 2017

Create a relation in your start part that evaluates the model name to your parameter.

 

Part_no = rel_model_name

 

This will take the model name and assign it to your Part_no parameter.

21-Topaz II
July 18, 2017

We use this relation with an enhancement that might be of value to you.

 

At development time, parts may not have a P/N yet as they are not yet approved for production.  So we might have a file named "LEFT_HANDED_WIDGET" rather than 12345.  Since only 10 characters will fit in our drawing cell for the P/N, we created this to substitute "TBD" in cases where the name is too long:

 

if string_length(REL_MODEL_NAME) <11
PART_NUMBER = REL_MODEL_NAME
else
PART_NUMBER = "TBD"
endif

 

It has the fortunate consequence that now users try to make their non-P/N names 11 or more characters to force the TBD in the titleblock.

17-Peridot
May 1, 2018

Doug,

 

Do you know exactly where REL_MODEL_NAME comes from? Is it filename in Windchill? I have been wanted to implement partnumber = rel_model_name, but can't figure out where its from. Need to information to back up my logic.

 

Thank you,

Lance