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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Delete Parameter values when doing a Save-As

jwagh
17-Peridot

Delete Parameter values when doing a Save-As

When doing a Save-AS, we would like a config option to remove all user-defined fields for the parameters. This should also apply to any new submodels created from a Save-As of an assembly.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
4 REPLIES 4
dnordin
16-Pearl
(To:jwagh)

Joseph,

You may want to have the option to reset the parameters to match your start model parameter settings vs. blanking the parameter values, or perhaps driving the parameter-value pairs from a file like in ModelCheck.  This could be helpful if you're using an existing product to create a new one, and want to change the values on the parameters in the copied models to specific values.  A simple example would be parameters called CONTRACT_NUMBER or PRODUCT_ID that you'd likely not want blank.

As an example format (from MC):
PRT_PARAMETER DRAWN_BY STR EQ REQUIRED
PRT_PARAMETER DRAWN_DATE STR EQ YYYYMMDD
PRT_PARAMETER CHECKED_BY STR EQ REQUIRED
PRT_PARAMETER CHECKED_DATE STR EQ YYYYMMDD
PRT_PARAMETER APVD_BY_1 STR EQ REQUIRED
PRT_PARAMETER APVD1_DATE STR EQ YYYYMMDD
PRT_PARAMETER APVD_BY_2 STR EQ NULL
PRT_PARAMETER APVD2_DATE STR EQ NULL
PRT_PARAMETER CONTRACT_NUMBER STR EQ 123456789
PRT_PARAMETER PRODUCT_ID STR EQ DEATHRAY_123


As a work around for now, you can configure a modelcheck setup to reset the parameters to whatever values you want (most likely your defaults or "NULL" if you want them blanked).  The user would need to open each file and run MC (or a mapkey you configure), or it could be run as a batch on all the newly created files to automate it somewhat.  This could be incorporated as part of your written model reuse process.

Regards,

Dan N.

jwagh
17-Peridot
(To:jwagh)

Dan,

Good to hear from you again.

Thank you for your response. We are having a hard time getting users to run the regular modelcheck we set up, I doubt we can enforce an extra step or process that would clear/reset the parameters. But, based on your suggestion, what would your condition file use to differentiate between this start file (after a save) and a regular modelcheck run? We use modelupdate, so we have to be careful how we setup our start file.

dnordin
16-Pearl
(To:jwagh)

Joseph,

You can create a new configuration for MC in your setconf.mcc file:
Reset_Parameters=(check/reset_params_checks.mch)(start/reset_params_start.mcs)(constant/inch.mcn)

In the reset_params_checks.mch file:

PARAMCHECK       Y/N/E/W  E E N N N
STARTCHECK       Y/N/E/W  E E N N N
(and any other parameter checks you want to run at the same time (like rename/map, etc.)

In the reset_params_start.mcs file:
PRT_PARAMETER CAGE_CODE STR EQ REQUIRED
PRT_PARAMETER MODELED_BY STR EQ REQUIRED
PRT_PARAMETER MODELED_DATE STR EQ YYYYMMDD
PRT_PARAMETER NEXT_ASSY STR EQ NULL
PRT_PARAMETER USED_ON STR EQ NULL
(and any other parameter settings you want (like rename/map, unwanted, etc.)

Edit the msg_mc.txt file to add the new configuration to the dropdown menu in Creo Parametric.  [FILE > OPTIONS > ENVIRONMENT > LOAD CONFIG]


%CILabel5
Reset_Parameters


%CIMessage5
Reset Parameters Checks


I believe that will do it, but I haven't tested this specifically.  I have a similar setup for copying parameters from one model to another.

Regards,

Dan N.

jwagh
17-Peridot
(To:jwagh)

Dan,

Thanks again.

We use the below option in our config_init.mc file.

CNFG_SELECT_AUTOYNAY

We prefer the condition.mcc file to handle the different options to ensure each user gets the scenario they should be seeing without any extra steps. Our condition.mcc file is over 90 lines long. That being said, even if we did change it to manual, the same users who need the parameters reset/emptied are the same users who won't run it to begin with...

I still greatly appreciate your help and giving insight into different approaches. It is always helpful.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags