Skip to main content
1-Visitor
September 21, 2015
Question

Adding parameters to existing parts

  • September 21, 2015
  • 4 replies
  • 19987 views

I have parts and assemblies that were created without using our templates. There are about 5-10 parameters I need to add to these parts and assemblies.

 

I know that I can add them by just adding the parameters column to the model tree of the assembly. This does work, but is a bit of a pain because you have to tell it what kind of parameter it is for each part as you add each parameter.

 

I had mapkeys that would call open a config file set new_parameter_ui and New_relation_ui to no and then add the parameters. These mapkeys don't appear to work anymore (I thought I had fixed them for Creo 2, but that may have been for Wildfire 5.). Before I try to fix them, I was wondering if anyone is still using this method in Creo 3?

 

Or, is there a better method now that we are in Creo 3?


Thanks,
Carrie

 

 

4 replies

Mahesh_Sharma
22-Sapphire I
September 21, 2015

Carrie,

One of the options is ModelCHECK. This will give you information whether parameter is available in data or not, If not it can add.

Check earlier post.

Re: Modelcheck paramter setting ?

12-Amethyst
September 21, 2015

You can recreate a mapkey for that, maybe it stills to be the faster way:

mapkey $F2 @MAPKEY_NAMEload parameters;~ Command `ProCmdRibbonOptionsDlg` ;\

mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.AddOpt`;\

mapkey(continued) ~ Input `add_opt` `InputOpt` `new_parameter_ui`;\

mapkey(continued) ~ Update `add_opt` `InputOpt` `new_parameter_ui`;\

mapkey(continued) ~ FocusOut `add_opt` `InputOpt`;~ Input `add_opt` `EditPanel` `no`;\

mapkey(continued) ~ Input `add_opt` `EditPanel` `no`;~ Update `add_opt` `EditPanel` `no`;\

mapkey(continued) ~ FocusOut `add_opt` `EditPanel`;~ Activate `add_opt` `AddOpt`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;~ Command `ProCmdMmParams` ;\

mapkey(continued) #DELETE;#PARAMETER1;#DONE;#CREATE;#STRING;PARAMETER1;VALUE1;\

mapkey(continued) #DELETE;#PARAMETER2;#DONE;#CREATE;#STRING;PARAMETER2;VALUE2;\

mapkey(continued) #DELETE;#PARAMETER3;#DONE;#CREATE;#STRING;PARAMETER3;VALUE3;\

mapkey(continued) #DELETE;#PARAMETER4;#DONE;#CREATE;#STRING;PARAMETER4;VALUE4;\

mapkey(continued) #DONE/RETURN;#DONE/RETURN;

Starting on line 10, replace "Parameter1" for your parameter name, "String" with the type of parameter, and "value1" with your own value.

Jose

1-Visitor
August 20, 2021

Hi Jose
I appreciate your mapkey which is very short and easy to modify for my own parameters, 
however, after running it, the parameters display is no more a table but a menu... why ? how to fix that ?

Pier_8wd_0-1629468640101.png

 

 

23-Emerald III
August 20, 2021

The mapkey has to change the UI setting to menus in order to add parameters. He forgot to end the mapkey by resetting that value.

Check out the Update Parameters mapkey I added in this thread:

Re: Insert/Import Parameters to Existing Assembly - PTC Community

 

21-Topaz II
September 24, 2015
  1. Open your start part with the all parameters that you need.
  2. Save a copy as a neutral file (*.neu).
  3. Open a part that needs parameters added.
  4. Import the neutral file, the parameters come along with the import.
  5. Delete the import feature, the parameters will remain.
8-Gravel
October 20, 2016

I tried this method and all the parameters imported locked and un-editable.

Any thoughts as to why?

21-Topaz II
October 26, 2016

Make sure that you uncheck "Enable ATB" when importing:

Capture.JPG

1-Visitor
September 24, 2015

I did try fixing my mapkeys, but didn't get there. I will try the attached mapkey at some point in the future.

We also need to add some relations, so what we are doing for right now is this:

I created a text file with relations similar to this:

created_date = "09/24/2015"

Any parameter I needed to add, I created a relation for and gave it a default value of some time.

I then would open the part, select relations, open the text file and paste it into the relations box. I then verified the relations, then deleted the ones I didn't need to keep.


This seems like it will work fairly quickly for this project - there's not that many parts.

14-Alexandrite
September 25, 2015

Keep in mind that this method will work only for string and/or real number parameter types.

If you try to create a integer parameter via relation you will actually get a real number.