Merge results after selections using loopWhy “DataBase Connections” mapped to “Dataset DataBase...

Does object always see its latest internal state irrespective of thread?

Convert two switches to a dual stack, and add outlet - possible here?

dbcc cleantable batch size explanation

Does detail obscure or enhance action?

Cross compiling for RPi - error while loading shared libraries

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Two films in a tank, only one comes out with a development error – why?

What's the point of deactivating Num Lock on login screens?

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

Is it inappropriate for a student to attend their mentor's dissertation defense?

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

How does quantile regression compare to logistic regression with the variable split at the quantile?

Maximum likelihood parameters deviate from posterior distributions

What does "Puller Prush Person" mean?

Is it possible to run Internet Explorer on OS X El Capitan?

Important Resources for Dark Age Civilizations?

Do infinite dimensional systems make sense?

How is it possible to have an ability score that is less than 3?

Can a vampire attack twice with their claws using Multiattack?

Did Shadowfax go to Valinor?

How much of data wrangling is a data scientist's job?

High voltage LED indicator 40-1000 VDC without additional power supply

I'm flying to France today and my passport expires in less than 2 months

Why doesn't H₄O²⁺ exist?



Merge results after selections using loop


Why “DataBase Connections” mapped to “Dataset DataBase Connections” in ArcCatalog?Why does AddField give ERROR: 000732 Input Table: does not exist or is not supported?Using IF statement in FOR loop?Replacing NULL values, loop skips records using Python, OGR, Rtree?Use results of loop for another raster calculationPython loop stops before running all filesRunning MaxEnt modelling in “dismo” using “loop” and storing the results in seperate objects and foldersGEE hangs in a for loop using datesMaking loop over shapefile attribute using ArcPy?Multiple selections with a python loop






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







-1















I want to merge shapefiles after selection inside a loop but could not run my codes. Here are my codes.



count = 0
selecationmerge = ""
for selection in selections:
count = count + 1
selectionname = "stats27171wqi_Conlevel" + str(count)
print selectionname
arcpy.SelectLayerByAttribute_management('wqi_Conshp_clip27171','NEW_SELECTION',selection)
arcpy.Statistics_analysis('wqi_Conshp_clip27171',selectionname,[["Shape_Area","sum"]])
arcpy.AddField_management(selectionname,'rate','DOUBLE')
arcpy.CalculateField_management(selectionname,'rate','!SUM_Shape_Area!/{}'.format(Sum_Area27171),'PYTHON_9.3')

arcpy.Merge_management([selecationmerge,selectionname], selecationmerge)


And the error messages are shown below.



ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Datasets: Dataset '';D:/STAR/assignment/assignment7/Zhenyu_Assign7_GISpro/Zhenyu_Assign7_GISpro.gdbstats27171wqi_Conlevel1 does not exist or is not supported
ERROR 000735: Output Dataset: Value is required
Failed to execute (Merge).



I believe the last line of my codes is the problem but I have no idea how to fix this.










share|improve this question





























    -1















    I want to merge shapefiles after selection inside a loop but could not run my codes. Here are my codes.



    count = 0
    selecationmerge = ""
    for selection in selections:
    count = count + 1
    selectionname = "stats27171wqi_Conlevel" + str(count)
    print selectionname
    arcpy.SelectLayerByAttribute_management('wqi_Conshp_clip27171','NEW_SELECTION',selection)
    arcpy.Statistics_analysis('wqi_Conshp_clip27171',selectionname,[["Shape_Area","sum"]])
    arcpy.AddField_management(selectionname,'rate','DOUBLE')
    arcpy.CalculateField_management(selectionname,'rate','!SUM_Shape_Area!/{}'.format(Sum_Area27171),'PYTHON_9.3')

    arcpy.Merge_management([selecationmerge,selectionname], selecationmerge)


    And the error messages are shown below.



    ExecuteError: Failed to execute. Parameters are not valid.
    ERROR 000732: Input Datasets: Dataset '';D:/STAR/assignment/assignment7/Zhenyu_Assign7_GISpro/Zhenyu_Assign7_GISpro.gdbstats27171wqi_Conlevel1 does not exist or is not supported
    ERROR 000735: Output Dataset: Value is required
    Failed to execute (Merge).



    I believe the last line of my codes is the problem but I have no idea how to fix this.










    share|improve this question

























      -1












      -1








      -1








      I want to merge shapefiles after selection inside a loop but could not run my codes. Here are my codes.



      count = 0
      selecationmerge = ""
      for selection in selections:
      count = count + 1
      selectionname = "stats27171wqi_Conlevel" + str(count)
      print selectionname
      arcpy.SelectLayerByAttribute_management('wqi_Conshp_clip27171','NEW_SELECTION',selection)
      arcpy.Statistics_analysis('wqi_Conshp_clip27171',selectionname,[["Shape_Area","sum"]])
      arcpy.AddField_management(selectionname,'rate','DOUBLE')
      arcpy.CalculateField_management(selectionname,'rate','!SUM_Shape_Area!/{}'.format(Sum_Area27171),'PYTHON_9.3')

      arcpy.Merge_management([selecationmerge,selectionname], selecationmerge)


      And the error messages are shown below.



      ExecuteError: Failed to execute. Parameters are not valid.
      ERROR 000732: Input Datasets: Dataset '';D:/STAR/assignment/assignment7/Zhenyu_Assign7_GISpro/Zhenyu_Assign7_GISpro.gdbstats27171wqi_Conlevel1 does not exist or is not supported
      ERROR 000735: Output Dataset: Value is required
      Failed to execute (Merge).



      I believe the last line of my codes is the problem but I have no idea how to fix this.










      share|improve this question














      I want to merge shapefiles after selection inside a loop but could not run my codes. Here are my codes.



      count = 0
      selecationmerge = ""
      for selection in selections:
      count = count + 1
      selectionname = "stats27171wqi_Conlevel" + str(count)
      print selectionname
      arcpy.SelectLayerByAttribute_management('wqi_Conshp_clip27171','NEW_SELECTION',selection)
      arcpy.Statistics_analysis('wqi_Conshp_clip27171',selectionname,[["Shape_Area","sum"]])
      arcpy.AddField_management(selectionname,'rate','DOUBLE')
      arcpy.CalculateField_management(selectionname,'rate','!SUM_Shape_Area!/{}'.format(Sum_Area27171),'PYTHON_9.3')

      arcpy.Merge_management([selecationmerge,selectionname], selecationmerge)


      And the error messages are shown below.



      ExecuteError: Failed to execute. Parameters are not valid.
      ERROR 000732: Input Datasets: Dataset '';D:/STAR/assignment/assignment7/Zhenyu_Assign7_GISpro/Zhenyu_Assign7_GISpro.gdbstats27171wqi_Conlevel1 does not exist or is not supported
      ERROR 000735: Output Dataset: Value is required
      Failed to execute (Merge).



      I believe the last line of my codes is the problem but I have no idea how to fix this.







      arcgis-10.0 for-loop






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 16 mins ago









      Zhenyu YaoZhenyu Yao

      1




      1






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317951%2fmerge-results-after-selections-using-loop%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317951%2fmerge-results-after-selections-using-loop%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

          Meter-Bus Содержание Параметры шины | Стандартизация |...