Skip to main content
1-Visitor
June 11, 2015
Solved

Mapkey to delete all "old" parameters

  • June 11, 2015
  • 3 replies
  • 5757 views

Hello everybody,

I want to delete all old parameters of a part/assembly by a mapkey. I assumed it wasn't quite difficult, but I can't select all parameters!?

The problem is the fact there are different numbers of parameters. So, indepent of how many parameters I have, the mapkey should delete all the old parameters!

The reason I want this, is because I build up a new format with parameters. The models already made should be populated with these parameters and filled in.

Thanks already for the reactions!

Best answer by Mahesh_Sharma

As Don mentioned ModelCHECK is one of the best options to remove unwanted parameters. There is an article at PTC web about removing unwanted parameters using ModelCHECK.

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS49875

3 replies

12-Amethyst
June 11, 2015

ModelCHECK has the ability to delete parameters (search the PDF for 'PARAM_UNWANTED'). You have to know the name of each parameter and list it in the ModelCHECK files but this should work. Be careful that any of the names you want to use do not match names listed for deletion. ModelCHECK also has the ability to rename parameters, so any of the old parameters similar in function to your new ones could be re-purposed with this.

A mapkey would have to change the parameter filter so it doesn't show system parameters (or so it only shows user-created parameters). Then you may be able to define it to just delete the first parameter in the list over and over until no more parameters exist. The problem with this will be any parameters that are locked (typically by a relation, but not always) will most likely cause the mapkey to fail or to loop itself trying to delete a locked parameter.

I don't have much experience with Toolkit but I'm pretty sure that has the ability to scrub parameters out of your files.

24-Ruby III
June 11, 2015

Raymond,

if you are experienced user, then you can set config.pro option new_parameter_ui no and create a mapkey which:

  • clicks Info command  and saves param.inf file
  • runs external program which reads param.inf file and creates trail_remove_parameters.txt file
  • plays trail from trail_remove_parameters.txt file

param.inf file format

Symbolic constant              X-refs   Current value        
-----------------              ------   ------- -----                 

PARAM_NAME_1                   Local    ""

PARAM_NAME_2                   Local    ""

trail_remove_parameters.txt file format

!trail file version No. 1600

!Creo  TM  2.0  (c) 2015 by PTC Inc.  All Rights Reserved.

#DELETE

!%CPSelect parameters to delete.

#PARAM_NAME_1

#PARAM_NAME_2

#DONE

Martin Hanak

1-Visitor
June 15, 2015

Unfortunately I'm not an experienced user. It seems to be quiet complexe, so if you've got a simplyer solution it would be great!

Mahesh_Sharma
22-Sapphire I
June 13, 2015

As Don mentioned ModelCHECK is one of the best options to remove unwanted parameters. There is an article at PTC web about removing unwanted parameters using ModelCHECK.

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS49875

1-Visitor
July 14, 2015

Hello Mahesh and Don,

Thanks. It takes a while, but it's working now. The next step I want to do is put in the new parameters by modelcheck. It should work also by that.

Raymond

Mahesh_Sharma
22-Sapphire I
July 14, 2015

Hi Raymond,

Yes, ModelCHECK can add parameters as well.