Skip to main content
Dec 18, 2017 6:13 PM UTC
Archived

IF (PARAMETER NOT EXIST) config=(??)

Related products:Creo Parametric

I would like to see the ModelCheck condition.mcc file offer a conditional statement that if a parameter does not exist then run certain modelcheck files. I was just told by PTC support that this feature does not exist. I would like to see this added to ModelCheck.

6 replies

Dec 18, 2017 6:38 PM UTC

Modelcheck can check for a parameter and execute checks against that value.

If you have a parameter named COMPANY in your file and it has values of CPY1 or CPY2, then in the conditions.mcc you can have:

IF (COMPANY EQ CPY1) config = <list of MC files to use>

IF (COMPNAY EQ CPY2) config = <another list of MC files to use>

 

But I don't see how MODELCHECK can check against something that does not exist!

 

Can you give a better explaination of what you are looking for with examples and results?

 

mheathAuthor
Dec 18, 2017 6:44 PM UTC

We have legacy parts that didn't include the parameter TB_FINISH_STD, but we don't want to add that to the legacy models or assemblies, but leave it as is and run other configuration files against it, but also if it does exist then run other configuration files. Strange I can do this in any other programming language. I would have thought something like this would be beneficial to others that myself. Thanks Ben.

Dec 18, 2017 10:02 PM UTC

MHeath,

 

Check the use of the condition.mcc file to select the proper config files to use in MC.

 

Perhaps you could use the creation date of the files to pick the config files to use.  Something along the lines of:

 

IF (DATE_CREATED GTE 20050418) config=....

ELSE config=....

 

There are other conditions that may be useful as well depending on what difference you have between your old and new models.

 

Regards,

 

Dan N.

mheathAuthor
Jan 3, 2018 2:16 PM UTC

Thanks for your response Dan, but I've been trying to find the magic creation date that the legacy stopped and the latest began. We've been using Creo/Pro-Engineer since the late 1980's. I'll keep up the search.  Thanks, Mike

Jan 4, 2018 1:06 PM UTC

Mike,

 

The IF (TB_FINISH_STD) config=.... check may work for you.  From the 4.0 help pages:

 

IF (NOSTART) config=(simple_checks.mch) (nostart.mcs) (constant_inch.mcn) (status_2.mcq)

Runs the listed configuration files if a parameter called NOSTART is found in the model.

 

Sounds like the check is simply looking if the parameter exists (vs. checking its value).

 

Regards,

 

Dan N.

olivierlp
Community Manager
Jan 4, 2022 2:40 PM UTC
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.

Thank you for your participation.

Olivier