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

Characters (") in repeat region relations

SOLVED

Characters (") in repeat region relations

Hello,

I am able to set relations in repeat region as below:

if asm_mbr_name == "PRT1111"

CAD_SAP_PLM_DESC = "42 Die Components"

endif

I would like to understand how to use (") into value of CAD_SAP_PLM_DESC. My scenario is to set value of 42" Die components. As soon as I put below line in relation, It does not work:

if asm_mbr_name == "PRT1111"

CAD_SAP_PLM_DESC = "42" Die Components"

endif

Thank you in advance.

Regards

Ketan

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Characters (") in repeat region relations

CAD_SAP_PLM_DESC = '42' +'" ' + 'Die Components'

Need to change the type of container, in otherwords, I swapped the double quote to a single to capture the text fields so that I can capture the double quote as text

7 REPLIES 7

Re: Characters (") in repeat region relations

CAD_SAP_PLM_DESC = '42' +'" ' + 'Die Components'

Need to change the type of container, in otherwords, I swapped the double quote to a single to capture the text fields so that I can capture the double quote as text

Re: Characters (") in repeat region relations

Instead of using ' or ", can I use another character to type

CAD_SAP_PLM_DESC = ¿l'arbre mesure 42"¿

 

to avoid writing

CAD_SAP_PLM_DESC = "l'arbre mesure " + '42"'

 

the desired result is (l'arbre mesure 42")

 

Thank you

Mathieu Paillé

Re: Characters (") in repeat region relations

No, it is coded that strings are designated with a ' or ". You can use the ' to designate the string and then use the " for the inch symbol within the string.

 

CAD_SAP_PLM_DESC = 'l'+"'"+'arbre mesure 42"'

single quote around the l, then double quote the apostrophe and single quote the remainder of the string.

Re: Characters (") in repeat region relations

@BenLoosli  Are the ' and " interchangeable and function exactly the same then?  I've currently been using the ", as in "," to put a comma in.

 

Grazie!

 

Frank

Re: Characters (") in repeat region relations

Generally they are interchangeable. I prefer the single quote for strings as it is a single key instead of 2. 

 

As in this example, I had to use both. The single quote was needed to allow the double quote to be accepted as part of the string. The double quote was needed to accept the single quote in the string. I did try to single quote the apostrophe and it did not like the ''' combination.

Re: Characters (") in repeat region relations

@BenLoosli

Hmmm, by " I didn't type 2 ', I simply used a single " key.  Does that matter?

Re: Characters (") in repeat region relations

What I meant was that to get the ", you need to press the shift key with the quote key.

By using the ' for strings it is only 1 key and quicker.

 

If you did use 2 single quotes, the editor would complain about unmatched or illegal characters.