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?
Solved! Go to Solution.
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.
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.
Thanks.
That worked!
We use that all the time so there isn't any confusioin downstream cause by the user naming the file one thing and then putting in text for Part_no parameter in your example parameter. If you are using Windchill here is another parameter and relation that we are starting to use.
TITLE = PTC_COMMON_NAME
In the title block of the drawing you can then set that cell to use word wrap.
With Windchill, you can fill in a lot of a drawing titleblock with driven parameters if you take the time to set them up.
We used dates, names and other parameters in our formats at another company. Dates need to be manipulated but can be used. Names depends on what your usernames into Windchill are. We used initials, so it was easy. We use LastnameFirstinitial here, so we do not use the Windchill parameter. We could if I wanted to implement a relation table since we only have less than 10 active users. Maybe something to do AFTER I get Windchill 11 and Creo 4 implemented.
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.
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
We don't use Windchill, so it's not from there. My understanding is that it is simply the file name of the model.
Edit: A Google search for REL_MODEL_NAME finds this as the first result, the official PTC help page: