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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Windchill adding parameters automatically

ilyachaban
14-Alexandrite

Windchill adding parameters automatically

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?

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

@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 

View solution in original post

11 REPLIES 11
BenLoosli
23-Emerald II
(To:ilyachaban)

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

ilyachaban
14-Alexandrite
(To:BenLoosli)

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?

BenLoosli
23-Emerald II
(To:ilyachaban)

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.

 

ilyachaban
14-Alexandrite
(To:BenLoosli)

To be honest there is 2 parameters: 

 

1st one will be constant that user define. 

 

2nd one is relation dependent. 

 

All of them works the same rule it has to be added with initial value "-" so relations can work with it and modelcheck can check the value of user defined one. After modelckeck add this two parameters with initial value user and relations can enter it's correct values.

 

Why automatically add parameter that user has than edit by hand?! Because it can than be edited via modelcheck window or via windchill. 

 

 

As i can see from other answers most of the users does thid using customization. (So bad that this simple functionality has to be done that much harder way)

TomU
23-Emerald IV
(To:ilyachaban)

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

ilyachaban
14-Alexandrite
(To:TomU)

Is it possible to approximately describe how this tool work?

Thank you.

 

 

@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 

ilyachaban
14-Alexandrite
(To:d_graham)

Thank you. I will talk to my colleagues and we will look at possibilities what we can do about it. 

ilyachaban
14-Alexandrite
(To:d_graham)

Can I ask you the last question so I have full understanding of the problem. What API do you use to make your script work? There is a huge price difference in-between of them in our region so we need to choose if do in on outsource or find a person who will do it on full time. Thank you.

 

@ilyachaban ,

Please use my email address that I put in my previous rather than this site to communicate.

windchill.developer@yahoo.com 

 

We can setup a Teams meeting to discuss.  That's probably best.

As for "what API"?

Can you be more specific? The API to do what exactly? The utility does a lot of things to get the job done. It's a bit of complicated to explain in this thread.

 

Feel free to email me,

 

David

 

TomU
23-Emerald IV
(To:ilyachaban)

Currently we have two variations:

  • One runs on check-in and automatically synchronizes each drawing's parameters with its parent model's parameters.  (part or assembly)
  • The second is a utility that is run from a Windchill shell,  It will create (if necessary) and set parameter values for any CAD object,  Input is from a text file (.csv).  It does this without checking out or iterating the object, and it can update any version (iteration or revision).
Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags