<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:14pt;color:#000000;"><DIV></DIV>
<DIV> 
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face=Calibri>Dear Python experts, </FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face=Calibri>I hope someone can help me. I am new to Python and trying to achive the following:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-no-proof: yes; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri size=3>1)</FONT><SPAN style="FONT: 7pt 'Times New Roman'">      </SPAN></SPAN></SPAN><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face=Calibri>I would like to populate the <I style="mso-bidi-font-style: normal">Tot_Ouf_Area</I> field with total area of each unique <EM>outfall_id</EM> (code attempted below,<EM> but Tot_Ouf_Area</EM> not populating)</FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-no-proof: yes; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT face=Calibri size=3>2)</FONT><SPAN style="FONT: 7pt 'Times New Roman'">      </SPAN></SPAN></SPAN><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face=Calibri>I would also like to get the user input of Rv ( each landuse type will have a specific Rv value). For example the program should ask the user for <I style="mso-bidi-font-style: normal">Rv</I> value of Low Density Residential (user enters 0.4 in example below and that value must be stored in the Rv field), and so on as shown in the 2nd table below…</FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-no-proof: yes"><FONT size=3><FONT face=Calibri>Below is my original table (comma-delimited)</FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-no-proof: yes">"OBJECTID","OUTFALL_ID","LANDUSE","AREA_ACRES","Rv","Tot_Outf_Area"<BR>16,"ALD06001","High Density Residential",6.860922,0.000000,0.000000<BR>15,"ALD06001","General Commercial",7.520816,0.000000,0.000000<BR>14,"ALD05002","Low Density Residential",7.255491,0.000000,0.000000<BR>13,"ALD05002","Forest",37.090473,0.000000,0.000000<BR>12,"ALD05001","Low Density Residential",16.904560,0.000000,0.000000<BR>11,"ALD05001","Forest",84.971686,0.000000,0.000000<BR>10,"ALD04002","Urban Open",1.478677,0.000000,0.000000<BR>9,"ALD04002","Transportation",0.491887,0.000000,0.000000<BR>8,"ALD04002","Low Density Residential",25.259720,0.000000,0.000000<BR>7,"ALD04002","Forest",0.355659,0.000000,0.000000<BR>6,"ALD04001","Recreational",0.013240,0.000000,0.000000<BR>5,"ALD04001","Low Density
 Residential",34.440130,0.000000,0.000000<BR>4,"ALD04001","Forest",10.229973,0.000000,0.000000<BR>3,"ALD03002","Low Density Residential",23.191538,0.000000,0.000000<BR>2,"ALD03002","Forest",1.853920,0.000000,0.000000<BR>1,"ALD03001","Low Density Residential",6.828130,0.000000,0.000000<BR>21,"ALD06001","Water.dgn",0.013951,0.000000,0.000000<BR>20,"ALD06001","Urban Open",10.382900,0.000000,0.000000<BR>19,"ALD06001","Transportation",2.064454,0.000000,0.000000<BR>18,"ALD06001","Recreational",0.011007,0.000000,0.000000<BR>17,"ALD06001","Low Density Residential",0.752509,0.000000,0.000000</SPAN></P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-no-proof: yes"></SPAN> </P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-no-proof: yes">Below is my desired output table (comma delimited):</SPAN></P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="mso-no-proof: yes">"OBJECTID","OUTFALL_ID","LANDUSE","AREA_ACRES","Rv","Tot_Outf_Area"<BR>16,"ALD06001","High Density Residential",6.860922,0.000000,27.606562<BR>15,"ALD06001","General Commercial",7.520816,0.000000,27.606562<BR>14,"ALD05002","Low Density Residential",7.255491,0.400000,44.345966<BR>13,"ALD05002","Forest",37.090473,0.300000,44.345966<BR>11,"ALD05001","Forest",84.971686,0.300000,101.876247<BR>12,"ALD05001","Low Density Residential",16.904560,0.400000,101.876247<BR>10,"ALD04002","Urban Open",1.478677,0.000000,27.585945<BR>9,"ALD04002","Transportation",0.491887,0.000000,27.585945<BR>8,"ALD04002","Low Density Residential",25.259720,0.400000,27.585945<BR>7,"ALD04002","Forest",0.355659,0.300000,27.585945<BR>6,"ALD04001","Recreational",0.013240,0.000000,44.683345<BR>5,"ALD04001","Low Density
 Residential",34.440130,0.400000,44.683345<BR>4,"ALD04001","Forest",10.229973,0.300000,44.683345<BR>3,"ALD03002","Low Density Residential",23.191538,0.400000,25.045460<BR>2,"ALD03002","Forest",1.853920,0.300000,25.045460<BR>1,"ALD03001","Low Density Residential",6.828130,0.400000,6.828130<BR>21,"ALD06001","Water.dgn",0.013951,0.000000,27.606562<BR>20,"ALD06001","Urban Open",10.382900,0.000000,27.606562<BR>19,"ALD06001","Transportation",2.064454,0.000000,27.606562<BR>18,"ALD06001","Recreational",0.011007,0.000000,27.606562<BR>17,"ALD06001","Low Density Residential",0.752509,0.400000,27.606562</SPAN></P></DIV>
<P>Below is my code so far for updating rows with total area (<EM><FONT face=Calibri>Tot_Ouf_Area):</FONT></EM></P>
<P> </P>
<P>#THE PROGRAM:<BR>import arcgisscripting<BR>gp=arcgisscripting.create()<BR>gp.Workspace = "C:\\NPDES\\NPDES_PYTHON.mdb"<BR>fc = "Outfalls_ND"</P>
<P>try:<BR>    # Set the field to create a list of unique values    <BR>        fieldname = "OUTFALL_ID"<BR>        <BR>    # Open a Search Cursor to identify all unique values<BR>        cur = gp.UpdateCursor(fc)<BR>        row = cur.Next()</P>
<P>        # Set a list variable to hold all unique values<BR>        L = []</P>
<P>        # Using a while loop, cursor through all records and append unique<BR>        #values to the list variable<BR>        while row <> None:<BR>            value = row.GetValue(fieldname)<BR>            if value not in L:<BR>                L.append(value)<BR>            row = cur.Next()<BR>            row.SetValue(Tot_Outf_Area, sum(row.AREA_ACRES)) #total area of each outfall=sum of all area 4 each unique outfallid<BR>            cur.UpdateRow(row) #to commit
 changes<BR>            row=cur.Next()<BR>            print row.Tot_Outf_Area<BR>        # Sort the list variable<BR>        L.sort()</P>
<P>        # If a value in the list variable is blank, remove it from the list variable<BR>        #to filter out diffuse outfalls<BR>        if ' ' in L:<BR>            L.remove(' ')</P>
<P>except:<BR>    # If an error occurred while running a tool, print the messages<BR>    print gp.GetMessages()</P>
<P> </P>
<P>#Please Help!!!</P>
<P>#Esther</P>
<P> </P>
<DIV></DIV></div><br>







      </body></html>