Skip to main content
5-Regular Member
May 23, 2016
Question

Calculate boolean parameter value by a condition on number

  • May 23, 2016
  • 2 replies
  • 1944 views

I have a boolean parameters define on the start part.

The parameter have the default value FALSE

This parameter have to become  TRUE if the number contain '-G' caracters string.

 

Is it possible use some kind of expression to do so during the generation of part, before the saving?

 

Many tanks for your aswer

 

B.


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.

2 replies

21-Topaz II
May 23, 2016

Seems like you want to set a parameter to be "YES" based upon whether another parameter contains the text "-G". You need a relation.

For example, if

paramName is the string parameter with your "name"

paramBool is the YES/NO (boolean) parameter you want to set

Something like this needs to be in your relations:

paramBool = NO

IF search ( paramName, "-G" ) > 0

  paramBool = YES

ENDIF

Or, perhaps you could use

paramBool = ( search ( paramName, "-G" ) > 0 )

I don't know if the second one will work, but it might.

5-Regular Member
May 24, 2016

Hi

At the end my right expression is:

GREZZO = NO

IF (search(PRO_MP_CSYS,"-G") > 0)

GREZZO = YES

ENDIF

Your suggestion was very helpfull

Beniamino

24-Ruby III
May 24, 2016

Hi,

please explain exactly what is the meaning of the number contain '-G' characters string.

MH

5-Regular Member
May 24, 2016

Hi

Number  is the WindChill name of code for the Drawing,  in any case it's ok every parameters that contain for example the file name.

I need that when the file name contaiun "-G " string a specific parameter is set  TRUE

Thnaks for your attention

Beniamino