Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a shapefile of polylines with information of diameter. But the problem is that i didn't enter the inch sign(") with the values of diameter. What would be the solution that qutation mark would place along with diameter values?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

2 methods.

  1. You have to use 2 single quotes surrounded by double quotes.
    "''"
  2. When you want to display your Inch mark on a label, use the following in the label expression.
    [myinchvaluefield] & "'' "
    EDIT: This works on a string field. (I guess I assumed you were attempting this on a string field to start with.)
    If you have a numeric field type it will not work. As PolyGeo shows you would need to create a new field.
    The easier solution (what I do) is to only show the inch mark on labels.

Inch mark
It might be good though to change the Alias of your field to describe the data clearer.

change alieas

share|improve this answer
    
@Bard Nesom... i added 2 single quotes surrounded by double quotes but it is not working –  muzaffar Jan 22 '13 at 7:34

As in the image below, you need to set a text field (DiamInch) equal to an integer field (Diam - ignore that I accidentally put OBJECTID instead) concatenated with a + sign to a double quote surrounded by two single quotes.

DiamInch = str(!Diam!) + '"'

enter image description here

share|improve this answer

You can also use the Character command (under string). A double quote is ASCII code 34 (decimal), so you would enter Chr(34). Remember, you have to enter your VB code outside of quotations, otherwise it will just enter the text Chr(34) in the middle of your stuff, but yeah.

You can enter any ASCII character inside of the Chr() script, so a character return would be Chr(13) for a new line, tab would be Chr(9), etc. To look up the character codes, just google ASCII Characters.

Thank you, Jake R.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.