Skip to main content
16-Pearl
February 2, 2023
Solved

Windchill adding parameters automatically

  • February 2, 2023
  • 2 replies
  • 3639 views

Hi,

how to add parameters in model automatically? We have alot of old parts on the server. Our machines are always updating so all the old parts are edited/used each year. This year because of technology we need to add new parameter to each part. Is there any way how to add it on checkout or with the help of modelcheck or other way how to add parameters without manual work?

 

 

 

Best answer by d_graham

@ilyachaban ,

 

The tool reads a CSV file in the format;

<EPMDocument idA2A2>,<Global Attribute Internal Name>,<Reusable Attribute Data Type>,<Attribute Target Value>

The tool reads each line.

Finds the EPMDocument

Adds the value to the attribute.

 

The utility could be modifiy to use EPMDocument number rather than EPMDocument id.  That would not be a problem.

Just spec out how you'd like it to work and I write it that way.

 

Note: the utility runs includes and -commit argument.  If -commit is not entered no database changes are made.  The run is logged but I like to make sure we are really ready to make changes therefore the I include explicit use of -commit.

 

I write lots of tools, if you need help feel free to reach out to me.

BTW, this is a hobby for me now.  20 years doing this stuff but retried now and just can't stop doing the fun stuff.

 

The help loos like this:

d_graham_0-1675350988836.png

 

David

windchill.developer@yahoo.com 

2 replies

23-Emerald III
February 2, 2023

ModelCheck can be run in batch mode to update parameters in a file or a directory of files.

16-Pearl
February 2, 2023

Yes it can but i only want to add parameter if it doesn't exist. Modelcheck do force update/add on parameter which is written in start configuration. Some model do now have this parameter and i don't want to touch it with modelcheck. 

Is there any possibility to check existence of parameter?

23-Emerald III
February 2, 2023

Are you wanting to add a constant parameter or a variable one?

By constant, I mean the same parameter value for all parts or variable where each part may have a unique parameter added. If doing a constant, then overwriting it with ModelCheck won't hurt as it didn't change. A variable parameter add may require a custom ModelCheck batch application to be written that will add the parameters and values that you want for each part. We had a program written, at another company, almost 20 years ago when we converted from Intralink 3.4 to Windchill 7 and had to update all of the files. The program had configuration options for what was to be added and then ran in batch mode updating all files in the working folder.

 

23-Emerald IV
February 2, 2023

This can be done with a custom utility.  We're doing something similar using a tool that @d_graham built for us.

16-Pearl
February 2, 2023

Is it possible to approximately describe how this tool work?

Thank you.

 

 

d_graham18-OpalAnswer
18-Opal
February 2, 2023

@ilyachaban ,

 

The tool reads a CSV file in the format;

<EPMDocument idA2A2>,<Global Attribute Internal Name>,<Reusable Attribute Data Type>,<Attribute Target Value>

The tool reads each line.

Finds the EPMDocument

Adds the value to the attribute.

 

The utility could be modifiy to use EPMDocument number rather than EPMDocument id.  That would not be a problem.

Just spec out how you'd like it to work and I write it that way.

 

Note: the utility runs includes and -commit argument.  If -commit is not entered no database changes are made.  The run is logged but I like to make sure we are really ready to make changes therefore the I include explicit use of -commit.

 

I write lots of tools, if you need help feel free to reach out to me.

BTW, this is a hobby for me now.  20 years doing this stuff but retried now and just can't stop doing the fun stuff.

 

The help loos like this:

d_graham_0-1675350988836.png

 

David

windchill.developer@yahoo.com