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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

ModelCHECK: Optional Parameters

N.Barnes
13-Aquamarine

ModelCHECK: Optional Parameters

I have a ModelCHECK use case where some parameters may or may not exist.  I have discovered that if I only list the name of the parameter, then ModelCHECK will not report the parameter as "extra".  But if I add extra requirements to the parameter in the .mcs file then ModelCHECK considers the parameter as "required."   I would prefer to continue to check for "extra parameters" as defined in the conditions file.

 

Can I define the con which is.   "If the parameter exists then it must be a string"

 

In this case "the parameter may exist"

PRT_PARAMETER NOTE

 

In this case "the parameter is required and must be a string"

PRT_PARAMETER NOTE STR

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @N.Barnes 

 

There is no direct option just to check the parameter type, if we use PRT_PARAMETER PARAM_NAME STR EQ *, it will check the parameter and type but create a conflict with existing value of parameter. for example if a parameter "NUMBER" is of real number type with some defined value, when converting it will conflict with string  and may not output as expected. 

 

Thanks. 

View solution in original post

2 REPLIES 2
N.Barnes
13-Aquamarine
(To:N.Barnes)

Spelling Correction:  Can I define the condition which is  "If the parameter exists then it must be a string"

Hi @N.Barnes 

 

There is no direct option just to check the parameter type, if we use PRT_PARAMETER PARAM_NAME STR EQ *, it will check the parameter and type but create a conflict with existing value of parameter. for example if a parameter "NUMBER" is of real number type with some defined value, when converting it will conflict with string  and may not output as expected. 

 

Thanks. 

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags