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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Calculate boolean parameter value by a condition on number

Beniamino71
5-Regular Member

Calculate boolean parameter value by a condition on number

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

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.

Beniamino71
5-Regular Member
(To:KenFarley)

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

Hi,

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

MH


Martin Hanák
Beniamino71
5-Regular Member
(To:MartinHanak)

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

Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags