Skip to main content
1-Visitor
April 8, 2016
Solved

If Statement

  • April 8, 2016
  • 2 replies
  • 4247 views

Can I build an if statement that would perform the following:

 

If parameter SEE_TABLE exists

name= "SEE TABLE"

ELSE

IF ASM_MBR_RAW_MATERIAL==TRUE

name=asm_mbr_imn

ELSE

name=asm_mbr_name

ENDIF

 

I would guess this is a nested if statement but my background with programming isn't extensive.

 

Thank you all for the help!

 

C


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.
Best answer by ccates

The correct format is as follows.

IF EXISTS("ASM_MBR_SEE_TABLE")

name="SEE TABLE"

ELSE

IF ASM_MBR_RAW_MATERIAL==TRUE

name=asm_mbr_imn

ELSE

NAME=asm_mbr_name

ENDIF

ENDIF

2 replies

ccates1-VisitorAuthor
1-Visitor
April 8, 2016

I have updated some of the coding, however I cannot get the relations to work. As of now the relation is as follows:

IF EXISTS("ASM_MBR_SEE_TABLE")

name="SEE TABLE"

ELSE

IF ASM_MBR_RAW_MATERIAL==TRUE

name=asm_mbr_imn

ELSE

NAME=asm_mbr_name

ENDIF

ccates1-VisitorAuthorAnswer
1-Visitor
April 8, 2016

The correct format is as follows.

IF EXISTS("ASM_MBR_SEE_TABLE")

name="SEE TABLE"

ELSE

IF ASM_MBR_RAW_MATERIAL==TRUE

name=asm_mbr_imn

ELSE

NAME=asm_mbr_name

ENDIF

ENDIF