Announcement

Collapse
No announcement yet.

Anyone here know Python Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anyone here know Python Script

    ??? Need some help writing a code.

    #2
    I had a code class a decade that had python ago but I don't remember a bit of it.. sorry

    Comment


      #3
      Originally posted by gumbl3 View Post
      I had a code class a decade that had python ago but I don't remember a bit of it.. sorry
      ...

      Comment


        #4
        Just in case anyone does and looks at at this, I have two fields PNTID and PointID here is an example of what I have.

        PNTID
        1
        2
        3
        4

        I need to make PointID = GE_Grass_(PNTID)

        So I have

        PNTID
        1
        2
        3
        4

        and I need

        PNTID PointID
        1 GE_Grass_1
        2 GE_Grass_2
        3 GE_Grass_3
        4 GE_Grass_4

        Comment


          #5
          Anyone here know Python Script

          Easy enough. When I get back to my desk I can give you what you're looking for. Are the PNTIDs in an array or db collection or what?

          Comment


            #6
            Originally posted by Loneaggie View Post
            Easy enough. When I get back to my desk I can give you what you're looking for. Are the PNTIDs in an array or db collection or what?
            Theyre in a table which is in ARCMAP10.1 which is a GIS program.

            Comment


              #7
              Whut?

              Lol...I envy you smart types! Keep Calm and Code On!

              Comment


                #8
                I feel really stupid now!!

                Comment


                  #9
                  Y'all are making my head hurt...

                  Comment


                    #10
                    Originally posted by bigdaddy590 View Post
                    Theyre in a table which is in ARCMAP10.1 which is a GIS program.
                    Yep, cleared that right up lol

                    Comment


                      #11
                      Originally posted by JCG View Post
                      Yep, cleared that right up lol

                      I despise learning this program. I have had to teach myself the program since I got into grad school.

                      Comment


                        #12
                        I use arcmap 10.1 but I purposely avoid python. Bump for ya.

                        Comment


                          #13
                          I use a computer. It is black. Hope that helps.

                          Comment


                            #14
                            No problem if I am understanding what you need.

                            You dont need to know python to do that. Open your feature class to editing, go to the table. Right click on the field name and select "Field Calculator"

                            PM me if that does not make any sense.
                            Attached Files

                            Comment


                              #15
                              Code:
                              pntidList = ["1","2","3","4"]
                              constantString = "GE_Grass_"
                              mergedList =  [  constantString + x for x in pntidList]
                              example

                              press the > (play button) in the middle, then type mergedList in the right hand side.

                              Not an expert at Python though. Note that the pntidList has to be string if it is integers you will need to do some kind of conversion int->string, since in Python you cannot (as far as I know) concatenate int to string values.

                              Comment

                              Working...