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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Characters (") in repeat region relations

Ketan_Lalcheta
19-Tanzanite

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

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

7 REPLIES 7

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

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é

BenLoosli
23-Emerald II
(To:MatPaille)

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.

Patriot_1776
22-Sapphire II
(To:BenLoosli)

@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

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.

Patriot_1776
22-Sapphire II
(To:BenLoosli)

@BenLoosli

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

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.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags