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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

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

0 Kudos

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

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 Comments
BenLoosli
23-Emerald II

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?

 

mheath
5-Regular Member

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.

dnordin
15-Moonstone

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.

mheath
5-Regular Member

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

dnordin
15-Moonstone

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
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.