Trouble with a simple expression
Trouble with a simple expression
(OP)
hello,
it's the first time i write in this fantastic forum (i read your tips every day).
I have a trouble with a simple expression.
In my drawing file i have one part attribute called p1 that can have this two string value: "Released" or "working".
according to the value assumed i need to fill another part attribute call p5 with a specific value.
So i try to insert a conditional like this:
if p1=stringValue( Released ) then p5=stringValue( Approved ) else p5=stringValue( Not Approved )
every time the program tell me that the string contain a syntax error..
i use NX 8.5.3
where is the fault?
Thanks.
Luca
it's the first time i write in this fantastic forum (i read your tips every day).
I have a trouble with a simple expression.
In my drawing file i have one part attribute called p1 that can have this two string value: "Released" or "working".
according to the value assumed i need to fill another part attribute call p5 with a specific value.
So i try to insert a conditional like this:
if p1=stringValue( Released ) then p5=stringValue( Approved ) else p5=stringValue( Not Approved )
every time the program tell me that the string contain a syntax error..
i use NX 8.5.3
where is the fault?
Thanks.
Luca





RE: Trouble with a simple expression
(if (P1="RELEASED")("APPROVED")else("NOT APPROVED"))
RE: Trouble with a simple expression
RE: Trouble with a simple expression
I have not used NX in a few years, but I know Wildfire uses the = and == like I asked about.
Regular Expressions also uses the = and == that way.
Also in your screen shot, you have P1 set to Release and your P5 evaluation is looking for Released.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Trouble with a simple expression
File -> Properties -> Attributes
...and simply toggle between the two pre-defined values of the 'Release_Status' attribute, as you can do with the attached example file.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.