|
POST
|
Hi Jutta, My understanding was, you wanted to select first 4 rows in all the tables listed from your workspace and merge these rows into a separate table right? I tested the code and it does exactly that. I can't access my ArcGIS box now to double check, my suspicion is on your where clause, can you change it to just arcpy.SelectLayerByAttribute_management(tableView, "NEW_SELECTION","OID < 4") removing the extra double quotes.
... View more
10-08-2014
05:15 AM
|
0
|
1
|
1572
|
|
POST
|
Hi Jutta, try below script. This selects rows in a table and uses the selection to perform merge.
import arcpy
import os, sys
from arcpy import env
env.overwriteOutput = True
env.workspace = r"C:\tempdelete\PL_TO_LINE.gdb" # Set your workspace
env.qualifiedFieldNames = False
resulttxt = r"C:\tempdelete\4resultSUM.dbf" # Set your output
fc_tables = arcpy.ListTables("") # Set your filter here
tableViews = []
for tableR in fc_tables:
#tableresultName = os.path.splitext (tableR) [0]
arcpy.AddMessage(tableR)
tableView = tableR + "_View"
arcpy.MakeTableView_management(tableR, tableView)
arcpy.SelectLayerByAttribute_management(tableView, "NEW_SELECTION","OBJECTID < 4") # Set your where clause here
tableViews.append(tableView)
arcpy.AddMessage(len(tableViews))
arcpy.Merge_management(tableViews, resulttxt)
... View more
10-08-2014
03:50 AM
|
1
|
3
|
1572
|
|
POST
|
Hi Geoffrey, Have a look at this fiddle, Edit fiddle - JSFiddle is this what you are after?
... View more
10-07-2014
07:47 PM
|
0
|
5
|
1762
|
|
POST
|
Hi Jutta, Create an empty table with your target schema. In your for loop, Create a table view with your table ArcGIS Help 10.1 Then do a select by attribute where OID < 4 ArcGIS Help (10.2, 10.2.1, and 10.2.2) Append the table view to your empty table. If creating an empty table is not an option where you don't know the schema before hand. Instead of step 2 above, follow below: Create an empty array outside the for loop and populate the array with your table views after selection. Use the array as input for your merge, do this outside the loop, (In your above code you are doing merge within the loop, which will essentially result in your target table overwritten many times)
... View more
10-07-2014
06:18 PM
|
0
|
5
|
1572
|
|
POST
|
Did you try serviceRequestLayerFields.domain.minValue; serviceRequestLayerFields.domain.maxValue; should work, if your field has range value domain.
... View more
10-07-2014
05:21 PM
|
0
|
7
|
1762
|
|
POST
|
Hi Hemant, Model looks good to me, If your feature classes are within a dataset then you will have to create another model with iterator for dataset and chain them together.
... View more
10-07-2014
05:19 PM
|
1
|
1
|
1046
|
|
POST
|
Hi Henry, anything in between /* */ is a comment and is not used during runtime. JavaScript Comments . The reason you got away with not using requires is because http://js.arcgis.com/3.10/ already requires few modules like button, contentPane etc. Since you are new to javascript i would recommend you start using AMD straight way instead of legacy dojo. dojo.require("dojox.charting.Chart"); var chart = new dojox.charting.Chart(); is legacy require(["dojox/charting/Chart"], function(Chart) { var chart = new Chart(); }); is AMD Check out these samples at Create a map | ArcGIS API for JavaScript you can get fair bit of understanding on using AMD.
... View more
10-06-2014
10:20 PM
|
0
|
1
|
962
|
|
POST
|
Hi Henry, Chart and Form are included in the Javascript API. http://js.arcgis.com/3.10/js/dojo/dojox/charting/Chart.js , http://js.arcgis.com/3.10/js/dojo/dijit/form/Form.js Did you require them before using? dojo.require("dojox.charting.Chart"); dojo.require("dijit.form.Form");
... View more
10-06-2014
09:28 PM
|
0
|
3
|
962
|
|
POST
|
Hi Hemant, You may want to use nested models. Create a model which iterates through feature classes in a workspace and perform extract Another model which iterates through rasters in a workspace and perform extract. Another parent model which will iterate through workplaces in a folder, pass the output workspace as input for previous two models ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
10-06-2014
08:42 PM
|
1
|
3
|
1046
|
|
POST
|
Hi Liz, Number of features seems large for arcgisonline. If the data are points, then you can possibly convert it to CSV file and try adding it to AGOL.I think there are no size limit for CSV files (not sure through). Another option is using json to feature tool ArcGIS Help (10.2, 10.2.1, and 10.2.2) to convert your json to a shape file. Then split the features into multiple shape files containing no more than 1000 features and add the shape files to AGOL Shapefiles—Help | ArcGIS . If you have an in house ArcGIS Server then you can publish the whole shape file a map service and add it to AGOL ArcGIS Server web services—Help | ArcGIS
... View more
10-06-2014
08:02 PM
|
0
|
0
|
678
|
|
POST
|
Hi Work, Try setting your feature layer mode as MODE_SELECTION. featurelayer-amd | API Reference | ArcGIS API for JavaScript
... View more
10-06-2014
06:28 PM
|
0
|
0
|
479
|
|
POST
|
Hi Aaron, This "\"" would actually translate to a double quote in the script. The code is actually prefixing and suffixing the shape file name with double quotes. This will pass the shape file name as a string to Calculate Field tool.
... View more
10-06-2014
06:20 PM
|
1
|
2
|
1892
|
|
POST
|
Hi Geoffrey, Range value domain is a not an array of values like coded value domain, it is a range between minimum and maximum value. rangedomain-amd | API Reference | ArcGIS API for JavaScript
... View more
10-06-2014
06:06 PM
|
0
|
0
|
1762
|
|
POST
|
Hi Aaron, Try using this instead, worked for me. arcpy.CalculateField_management(shp, "map_name","\"" + map_name + "\"", "PYTHON")
... View more
10-06-2014
05:56 PM
|
2
|
4
|
1892
|
|
POST
|
Hi Duncan, You'll have to customize to achieve to achieve this functionality. Refer ArcGIS Help (10.2, 10.2.1, and 10.2.2) . If your feature class and destination table are in Enterprise Geodatabase, then easiest option would be using insert trigger on your source feature class to create records in your destination table.
... View more
10-06-2014
05:15 PM
|
2
|
0
|
830
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-31-2014 06:04 AM | |
| 1 | 09-25-2014 06:03 PM | |
| 1 | 09-16-2014 06:15 PM | |
| 1 | 10-08-2014 03:50 AM | |
| 1 | 08-25-2014 08:33 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|