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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Replace start part in legacy models

lmckee
1-Visitor

Replace start part in legacy models

Hi all,

I updated our start part about a year ago and had been manually updating old models as I came across them using a mapkey, so that the additional parameters that appear in the new start part are populated in the older models. We need the parameters to populate the new drawing format automatically from the models. Is there an easy way to update all models with the new start part to save a lot of time? I tried to share the mapkey that I created with other team members, by sending them my config.pro file, but it doesn't seem to work on their PC's and I am not sure why, so thought I would try a different approach to the issue if possible? I thought there is perhaps a way to do this by running a script, but this is not something I have done before, so wouldn't know how. Any advice or suggestions greatly appreciated. Thanks.

13 REPLIES 13
James62
12-Amethyst
(To:lmckee)

Hi,

If a mapkey cannot do it then maybe a trail file or a script can. It all depends on what exactly you are trying to do.

lmckee
1-Visitor
(To:James62)

Hi,

The mapkey works for me, but other users report it doesn't work for them. All I need is for the part or assembly to have around 30 new parameters added. The values for the parameters are supplied from a relation in the new start part, so I need the old part or assembly to use the new start part instead of the original (as it contains the parameters and the relation), or if this is not possible, then I need to create the parameters in the legacy part or assembly and paste in the relevant relation for it to use when generating a drawing from the format. The goal is to automatically populate the tables in the drawing from the format, but the problem was that some parameters the format uses did not exist in legacy models, hence the required update.

How do I go about creating an update from a trail file or a script? Essentially i need to add a relation and a bunch of parameters to hundreds of parts and assemblies that were created before we had the new start part.

Thanks again.

James62
12-Amethyst
(To:lmckee)

Interesting,

Sooner or later I'll be facing the same problem.

Have you got all the parts and assemblies in the same folder or bunch of folders at the same location and would you like this update to be all automated process?

Like find all files, open first file, add params, save, close, open second file, etc. Or are you just going to open each file by yourself and apply the mapkey you have to each manually?

EDIT: See this video on how to run trail file from a mapkey: 2014 PTC LiveGlobal Mapkeys TrailFiles Presentation Video - YouTube

lmckee
1-Visitor
(To:James62)

As we are using a PDM system we have all of the parts and assemblies within different product folders and libraries, so I was hoping to use something that could look for file types and add parameters based on this - never having used scripts before and unsure even where to find/add them I thought I would ask, as they might have been able to do this. I had hoped to avoid opening each one individually which I do now as I come across the parts with missing parameters. Thanks for the link, I will have a look at it and hopefully it might be of use to finding a solution.

James62
12-Amethyst
(To:lmckee)

I'd solve the problem of opening and closing each found file with Autohotkey. The script you can learn to create with it can let you find only the specific file types within any amount of subfolders. It's not that hard to learn as you may think at first. If you prefer any other scripting language then go ahead.

If you need any help with AHK then let me know.

dgschaefer
21-Topaz II
(To:lmckee)

Here's an easy way to add the parameters:

  1. Open your start part.
  2. File > Save As > Save A Copy > and pick Neutral (*.neu) as the file type.
  3. In the part you need to add parameters to, go to Model Tab > Get Data > import and pick the neutral file.
  4. Once imported, all the parameters in the start part will be present in your existing part.
  5. The import feature can be deleted, the parameters remain.

Limitations:

  • Only works on parts, not assemblies
  • Does not import relations.

However, this is easily automated with a mapkey, as long as your neutral file is in a common location, accessibly by everyone.

The relations are going to be harder. You can import relations from a file, but it replaces all existing relations with the file, not likely acceptable.  I'm not a Model Check user, but perhaps there's a solution there?

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Thank you, I have never used (*.neu) before so it is good to know, I will try it out - it might be a good way of sharing the functionality of the first half of my mapkey. My mapkey replaces the parameters and adds in the relation, I can't currently automate the process for it to apply the mapkey to all .prt and .asm files, or share it with other users. Getting this to work would be the first step, thanks!

jsharp
1-Visitor
(To:lmckee)

I deal with this on a daily basis and we simply use Model Check. My advice is to explore and set up model check to do the job.

lmckee
1-Visitor
(To:jsharp)

Hi Joe, thank you! I downloaded a model check handbook, but couldn't find how to configure my machine to use it. Do I need a special licence? When I go to file and prepare I have only 4 modelcheck options, all of which didn't seem to open any relevant menus, one gives me the error message "RC_MODEL_TYPE must be set to process rule" and as this is not a config.pro setting, I wasn't sure where to set this. Can you recommend where to find out more information on model check, it sounds ideal, but I cannot currently use it.

Thanks again.

BenLoosli
23-Emerald II
(To:lmckee)

There is a config.pro option that enables ModelCheck and then you need ModelCheck settings enabled for it to actually run the checks.

It can be run in a batch mode, which we did at a prior company to populate all models with the new Windchill parameters from the ones we had in Intralink.

Modelcheck is enabled already by default on my PC, but when I go to config_init.mc to check if it is enabled there it doesn't open very well in a text file. Should I be opening this in another format to be able to read it? However, if I use the hash key as a delimiter I get the following:-

# Enable ModelCHECK Y=enable, N=disable, A=Ask user
MC_ENABLE        YNA            Y

I assume from this it is enabled, so I will see if I can try and run it in batch mode, which seems to be what I would want.

Thanks.


You may find this useful. I presented this as a "getting started" guide at PTCUser back in 2010, but it also has a section for updating models to company standards. Hopefully it gets you what you need. Your "standards" are defined in the "start.mcs" file and the update options in the appendix will have MC check that everything matches.

Making ModelCheck Work for You

Also, the RC_MODEL_TYPE error you got is for running RuleCheck, which is a separate tool and configuration. What you want to eventually run is ModelCheck Interactive (current model) or Batch once the configuration is done.

Announcements


Top Tags