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

RESTRICTED VALUE PARAMETERS

cspinelli
13-Aquamarine

RESTRICTED VALUE PARAMETERS

hello,

i would like to ask if it possible (with restricted value parameter or something else) to choose for a parameter a value between a restricted value and something added manually.

for example: parameter XYZ could have a value N/A or a numeric value added by the user.

thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

possible solution no.1:

Create a pair ofr parameters MYPAR_EX and MYPAR_VAL

MYPAR_EX = Yes means that MYPAR_VAL value is defined ... this represents MYPAR_VAL = numeric value

MYPAR_EX = No means that MYPAR_VAL value is not defined ... this represents MYPAR_VAL = N/A option

 

possible solution no.2:

Set numerical value that will represent N/A option ... for example 9999999999


Martin Hanák

View solution in original post

11 REPLIES 11

A restricted parameter can have only one type. It cannot select from both a numeric and a text character string.

You could have a relation that detected that a given parameter was not present and set another parameter accordingly. Use the "exists(parameter_name)" function.

cspinelli
13-Aquamarine
(To:dschenken)

ok, thanks. but it is possible to set a parameter via drop down menu?

Hi,

 

possible solution no.1:

Create a pair ofr parameters MYPAR_EX and MYPAR_VAL

MYPAR_EX = Yes means that MYPAR_VAL value is defined ... this represents MYPAR_VAL = numeric value

MYPAR_EX = No means that MYPAR_VAL value is not defined ... this represents MYPAR_VAL = N/A option

 

possible solution no.2:

Set numerical value that will represent N/A option ... for example 9999999999


Martin Hanák
cspinelli
13-Aquamarine
(To:MartinHanak)

thank you very much,

i like solution n°1 but i have a question. if i set this relation:

 

IF MYPAR_EX==NO

MYPAR_VAL="N/A"

ENDIF

 

then i will have MYPAR_VAL as N/A. if in the future i will change MYPAR_EX to NO what will happen to MYPAR_VAL?

 

Hi,

 

please explain your situation more precisely. I do not understand how are you going to use your parameter (containing numeric values or N/A string). Do you really need to have numeric parameter ?

 


Martin Hanák
cspinelli
13-Aquamarine
(To:MartinHanak)

sorry, maybe i do not have written right...

i need parameter to be STRING but with the possibility to have value N/A.

this is not possible via restricted parameter value so your suggestion is useful.

if i set MYPAR_EX to NO then MYPAR_VAL will be "N/A".

but if i change MYPAR_EX to YES then MYPAR_VAL will remain "N/A" and then i will need to change manually the value.

Hi,

 

let us go back to restricted parameters...

 

I created list3.lst file containing following lines

ND_ParamDefArr_K01 = {
{
Name = mypar
Type = String
Default='N/A'
}
}

 

The I added following option into my config.pro file:

restricted_val_definition  D:\users\mh\creo3_parametric\list3.lst

 

Test:

  1. start Creo
  2. create new part
  3. create new parameter
  4. turn on check mark in Restricted column
  5. new parameter name is set to mypar automatically (because only 1 parameter is defined in list3.list file)
  6. parameter value is set to N/A
  7. user can change default parameter value to any string

Is this what you want ?

 

Note: http://support.ptc.com/help/creo/creo_pma/usascii/#page/fundamentals%2Ffundamentals%2Ffund_seven_sub%2Fabout_Restricted_Value_Parameters.html page is start point of help.


Martin Hanák
cspinelli
13-Aquamarine
(To:MartinHanak)

ok, thanks.

i already use restricted_val_definition but in this case i would like to use (if possible) something like that:

 

ND_ParamDefArr_K01 = {
{

Name = mypar
Type = String
Default='-'

ENUM = { '-', N/A}
}
}

 

but with the possibility to write a string instead of those values

Hi,

 

try this one ...

 

ND_ParamDefArr_K01 = {
{

Name = mypar
Type = String
Default='-'

ENUM = { '-', 'N/A'}
}
}


Martin Hanák
cspinelli
13-Aquamarine
(To:MartinHanak)

hi, i tried but i cannot write another value...

Hi,

 

please upload your restriction file and test part. I can test your problem on my PC.


Martin Hanák
Top Tags