Skip to main content
23-Emerald III
April 6, 2020
Solved

Import Parameters

  • April 6, 2020
  • 3 replies
  • 10268 views

When I use the Import Parameters from an XML file. I have noticed 3 things.

1) If the parameter has a restricted parameter list associated with it, it will not import.

2) If the parameters are designated, when imported they have to be manually designated.

3) An imported parameter that already exists in the file will have its assigned value erased after the import.

 

I am on Creo 4 m080

 

Has anyone had an experience with overcoming these limitations?

We hired a couple of new designers and they created hundreds of parts using the piping and framework modules and these did not use our default start part so parameters we want in Windchill are now missing from their files. We are hoping an import will pf the parameters will allow us an easy method of correcting the files.

 

Best answer by TomU

@BenLoosli,

If you record a mapkey using the old parameter ui (hidden config), it can create any missing parameters, set their values, and designate them.  A mapkey built with this old interface will not overwrite any existing parameter values and won't stop running if some parameters already exist.  The ability to switch to this old parameter ui is going away in the near future, so I've been pushing on PTC to provide some way to continue this process with the new parameter UI.  No luck so far. (See CS322155)

 

Below is an example mapkey.  This will create a bunch of parameters, set their values (in this case blank), and designate them.  Run it on a test part to see what it's doing.  Let me know if you need a further explanation of anything.

 

mapkey tucp @MAPKEY_NAMECreate Parameters;@MAPKEY_LABELCreate Parameters;\
mapkey(continued) ~ 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) ~ Input `add_opt` `EditPanel` `no`;~ Update `add_opt` `EditPanel` `no`;\
mapkey(continued) ~ Activate `add_opt` `AddOpt`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;\
mapkey(continued) ~ Activate `UITools Msg Dialog Future` `no`;\
mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#PART;\
mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;STATION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\
mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\
mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\
mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\
mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#STATION;#SUB_CATEGORY;#DONE SEL;\
mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#ASSEMBLY;\
mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;STATION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\
mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\
mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\
mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\
mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#STATION;#SUB_CATEGORY;#DONE SEL;\
mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#DRAWING;\
mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;STATION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\
mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\
mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\
mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\
mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#STATION;#SUB_CATEGORY;#DONE SEL;\
mapkey(continued) #DONE/RETURN;#DONE/RETURN; ~ 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) ~ Input `add_opt` `EditPanel` `yes`;~ Update `add_opt` `EditPanel` `yes`;\
mapkey(continued) ~ Activate `add_opt` `AddOpt`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;\
mapkey(continued) ~ Activate `UITools Msg Dialog Future` `no`;

 

3 replies

18-Opal
April 6, 2020

Model Check?  But it sounds like you want a bit more user-level control.

 

Or - CREOSON... (FREE if you want to code a bit)

 

Nitro-BOM does most of what you want it sounds like (commercial option).  Here are some video links:

 

Nitro-BOM is probably the most user friendly approach - and you can learn it in under 30-min.   It is sold on an Annual Subscription for a Globally Floating License... So you can easily share with multiple users.

 

Dave

 

 

BenLoosli23-Emerald IIIAuthor
23-Emerald III
April 7, 2020

Dave,

I have downloaded CreoSon but do not have time to experiment with it at this time.

Are there any tutorials on how to program with CreoSon?

 

Ben

18-Opal
April 7, 2020

The Help Doc included in it is pretty awesome... The real question is what language do you want to use.

 

CREOPYSON is VERY POPULAR for this... It is Python based.  I would recommend looking at that if you are a Python person.

 

If you want another language - there is JavaScript library in the distribution also - so if you want to develop in the browser, you can use that - or Node.js ... 

 

Alternatively - you can pick any modern programming / scripting language and as long as you can do HTTP POST requests you will be able to figure it out.

 

Since CREOSON is a JSON Transaction based approach... you are just passing structured text to CREOSON's server to execute in Creo.

 

The FUNCTIONS are a good place for examples.  They are on-line -- same in the doc.

 

Dave

 

 

 

 

TomU23-Emerald IVAnswer
23-Emerald IV
April 7, 2020

@BenLoosli,

If you record a mapkey using the old parameter ui (hidden config), it can create any missing parameters, set their values, and designate them.  A mapkey built with this old interface will not overwrite any existing parameter values and won't stop running if some parameters already exist.  The ability to switch to this old parameter ui is going away in the near future, so I've been pushing on PTC to provide some way to continue this process with the new parameter UI.  No luck so far. (See CS322155)

 

Below is an example mapkey.  This will create a bunch of parameters, set their values (in this case blank), and designate them.  Run it on a test part to see what it's doing.  Let me know if you need a further explanation of anything.

 

mapkey tucp @MAPKEY_NAMECreate Parameters;@MAPKEY_LABELCreate Parameters;\
mapkey(continued) ~ 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) ~ Input `add_opt` `EditPanel` `no`;~ Update `add_opt` `EditPanel` `no`;\
mapkey(continued) ~ Activate `add_opt` `AddOpt`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;\
mapkey(continued) ~ Activate `UITools Msg Dialog Future` `no`;\
mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#PART;\
mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;STATION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\
mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\
mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\
mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\
mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#STATION;#SUB_CATEGORY;#DONE SEL;\
mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#ASSEMBLY;\
mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;STATION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\
mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\
mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\
mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\
mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#STATION;#SUB_CATEGORY;#DONE SEL;\
mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#DRAWING;\
mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;STATION;<EMPTY_STR>;\
mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\
mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\
mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\
mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\
mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#STATION;#SUB_CATEGORY;#DONE SEL;\
mapkey(continued) #DONE/RETURN;#DONE/RETURN; ~ 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) ~ Input `add_opt` `EditPanel` `yes`;~ Update `add_opt` `EditPanel` `yes`;\
mapkey(continued) ~ Activate `add_opt` `AddOpt`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;\
mapkey(continued) ~ Activate `UITools Msg Dialog Future` `no`;

 

BenLoosli23-Emerald IIIAuthor
23-Emerald III
April 7, 2020

Tom,

 

Thank you, that works exactly like we need. I just changed the parameters to the 7 we need in each section and it works perfectly. Storing this in a separate file for another day, if needed.

 

Ben

Patriot_1776
22-Sapphire II
April 8, 2020

Hey Ben!

The easy answer is.....hire some new Designers?  LOL

You can actually copy parameters from one part to another.  We have a TON of parameters here, it's actually absurd.  And it's tricky, but you can copy User Defined parameters to another part.  I've had a ton of trouble remoting in to work today, I'll try and post up tomorrow about it...if I can.

BenLoosli23-Emerald IIIAuthor
23-Emerald III
April 8, 2020

Hi Frank,

 

I had no say in the contractors being hired and they were left alone to work as the 1 senior person we had left at the end of last year, before the second contractor was hired. I was busy setting up Windchill systems so no babysitting from me! 

 

Anyway, Tom's mapkey has resolved 90%  of our issues with older parts. The final 10% is getting the Creo users to update their part files with the proper parameter values. 

Patriot_1776
22-Sapphire II
April 14, 2020

'Morning Ben!  Yeah, I hear ya.  We hired an Engineer (permanent) recently.  Sharp kid, but I didn't really get a chance to show him how to use Windchill before we started working from home.  Now he's trying to check things in and I'm trying to explain how we do things (attach STEP and PDF files, etc.) via e-mail.  It's good practice for my potential new position that I applied for here.  I'd be helping set policy for the Lab and be part of the Creo/Windchill "help desk".

 

Anyways, I'll try and post up how I was able to copy the parameters.  It's a mite tricky and the steps have to be followed exactly, but it works.  Good thing because I think I have to do it to a bunch of parts now...  *facepalm*  Glad Tom was able to help ya!