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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Creo internal variable names and assignment to parameters

cadcam
12-Amethyst

Creo internal variable names and assignment to parameters

Dear All,

    Just looking at enhancing some of our drawing templates and possible automation of simulate results.

     1) Up to now we have manually entered some data into tables on drawings and some automatic.

I was looking to automate the inclusion of some material data etc

   if I set parameter MATERIAL_TYPE  = material_param("PTC_MATERIAL_DESCRIPTION")

   in a relation I can use it in notes and tables etc. However if I chnage DESCRIPTION for NAME or DENSITY it doesn't work.

    assume they must have another internal name. Where can I obtain a authoritive list of internal parameter names that can be used in relations etc.  and any limitations on their use

  Regards

8 REPLIES 8
rmcboaty
7-Bedrock
(To:cadcam)

llie
16-Pearl
(To:cadcam)

Try these relations as I am working on implementing them at our company.

TITLE = PTC_COMMON_NAME

CAGECODE = PTC_ORGANIZATION_ID

PARTNUMBER = REL_MODEL_NAME

BenLoosli
23-Emerald II
(To:llie)

Cage Code is a numeric number issued by the US government as a supplier ID. Are you really using that as your PTC_ORGANIZATION_ID?

llie
16-Pearl
(To:BenLoosli)

Yes, PTC_ORGANIZATION_ID is the mapped attribute in Windchill for cage code and gets push into our files parameters.

cadcam
12-Amethyst
(To:cadcam)

Thank you for the feedback. I think I now have a solution to half my problem. What I wanted to do was to put the material name (+ properties) on a drawing in a table.  In the .mtl fles there are a series of properties, the names of which are available to use in relations. However the same parameters are not neccessarily defined for each material, depends on the source, and in particular NAME is not one. However you can add additional properties, so to get the material name to transfer I have generated a new field, e.g. for Brass

in brass.mtl add the lines

{

  Name = CUED_MATERIAL_NAME

  Type = String

  Default = 'BRASS'

  Access = Full

},

[NB Name doesnt have to start with PTC]

In relations add

MATERIAL_TYPE  = material_param("CUED_MATERIAL_NAME")

where MATERIAL_TYPE is a parameter defined in the start part

Then &MATERIAL_TYPE can be used in tables and notes on a drawing

Now to find out how to allocate the user's id to a parameter to put in drawings (2 & 3d)

Regards

BenLoosli
23-Emerald II
(To:cadcam)

User's id, you mean PTC_WM_MODIFIED_BY or PTC_WM_CREATED_BY?

cadcam
12-Amethyst
(To:BenLoosli)

Do these variables come from Windchill?

Currently relations (creo4) on my system doesn't seem to recognise them [we don't run WC]

I have a workaround whereby I can set the originator to the windows username automatically via a mapkey, but it does seem a little longwinded.

  Regards

llie
16-Pearl
(To:cadcam)

These variables do come from Windchill.

Top Tags