POST
|
Hi all, I want to access an Arcgis Online groups content via REST but when I do the list returned is always empty. I have tested it on multiple groups. When accessing the groups content I use an URL similar to this: https://www.arcgis.com/sharing/rest/content/groups/GROUPID The token I am using is valid. The response I get is something like this: {
"total": 0,
"start": 1,
"num": 0,
"nextStart": -1,
"items": [
]
} Does anyone have any idea what I am doing wrong? Kind regards, Jeroen
... View more
a month ago
|
0
|
0
|
133
|
POST
|
Hi Bruce, Thank you for your help, I tried repairing the 10.5.1 version but after that I could not browse for datasets in DI for pro. I will try again and see if it works. I'll keep you updated.
... View more
10-03-2018
07:01 AM
|
0
|
1
|
837
|
POST
|
Yes he has. I can run the extension. The problem is that I can't get the tool to work in both ArcGis Desktop and ArcGis Pro. They both have theire sperate install but somehow the installations of both versions corrupt each other.
... View more
10-03-2018
06:59 AM
|
0
|
0
|
837
|
POST
|
Hi Dan, Thanks for your help but I have already installed the 64-bit version which I downloaded from my.esri.com Jeroen
... View more
10-03-2018
05:14 AM
|
0
|
2
|
837
|
POST
|
Is it possible to install data interoperability for both Arcgis Desktop and Arcgis Pro on the same machine? I have tried to install them both and it seems like they override eachother. First let me start by giving the version numbers: Arcgis Desktop 10.5.1 (10.5.7333) Arcgis Data Interoperability 10.5.1 for Desktop (10.5.7333) Arcgis Pro 2.1 (2.1.10257) Data Interoperability 2.1 (2.1.10256) The following happens when installing Data Interoperability: First Install Second install Result Data interop for desktop Data interop for Pro Data interop doesn't work for desktop Data interop for Pro Data interop for desktop Data interop doesn't work for pro The same will happen when I repair the install, so If i repair data interop for Pro, data interop for desktop stops working and vice versa. In data interop for desktop i get the following script error: After clicking yes the tool stays empty: In Arcgis Pro the tool is not empty but it's impossible to browse for the dataset. Can anyone help me of has anyone an idea how i can fix this?
... View more
10-03-2018
03:37 AM
|
0
|
7
|
1264
|
POST
|
Thanks for the replies all. I think the problem is something in one of my settings because when I do the following simple arcpy command in python: import arcpy
arcpy.env.workspace = "Database Connections\\xyz_select@geooraint.sde"
featureclasses = arcpy.ListFeatureClasses()
print (str(len(featureclasses))) It gives me 0 results. This is straight from python. So arcpy from python seems to think there are no feature classes in the old geodatabase. When I run the exact same command from the python window in arcmap i get something like 1600 results, which should be correct. Both python versions give the same version number (2.7.12). Does anyone have an idea of a setting that I need to change?
... View more
06-09-2017
02:29 AM
|
0
|
0
|
454
|
POST
|
Hi, Thanks for your answer I still had problems and your solution seems to work. The only problem now is that python seems to crash at some points but the solution seems to work.
... View more
10-09-2013
11:46 PM
|
0
|
0
|
819
|
POST
|
I guess no one has an idea of how to fix it? Does it work for other users?
... View more
09-11-2013
12:14 AM
|
0
|
0
|
819
|
POST
|
I haven't tested this code but it should work, or at least not much editing 🙂
#Specify output path and final output PDF
outPath = r"C:MyProjectoutput\"
finalPdf = arcpy.mapping.PDFDocumentCreate(outPath + "ParcelReport.pdf")
#Specify the map document and the data frame
mxd = arcpy.mapping.MapDocument(r"C:MyProjectMyParcelMap.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
#Select a parcel using the LocAddress attribute and zoom to selected
parcelLayer = arcpy.mapping.ListLayers(mxd, "Parcels", df)[0]
arcpy.SelectLayerByAttribute_management(parcelLayer, "NEW_SELECTION", "LocAddress" = '519 Main St')
df.zoomToSelectedFeatures()
#Turn on visibility for each theme and export the page
lyrList = ["Soils", "Floodplains", "Zones"]
for lyrName in lyrList:
lyr = arcpy.mapping.ListLayers(mxd, lyrName, df)[0]
lyr.visible = True
#Export each theme to a temporary PDF and append to the final PDF
tmpPdf = outPath + lyrName + "_temp.pdf"
if os.path.exists(tmpPdf):
os.remove(tmpPdf)
arcpy.mapping.ExportToPDF(mxd, tmpPdf)
finalPdf.appendPages(tmpPdf)
#Turn off layer visibility and clean up for next pass through the loop
lyr.visible = False
del lyr, tmpPdf
del mxd, df, finalPdf
The above code only exports the 3 pdf's for location address 519 Main St. The layers it sets as visible are Soils,Floodplains and Zones. If you want to automate the entire process then you need to have a list or a way to get the locaddresses. You could then loop trough the location adressess like this:
lyrList = ["Soils", "Floodplains", "Zones"]
for locaAddress in locAdresses:
finalPdf = arcpy.mapping.PDFDocumentCreate(outPath + "ParcelReport "+locAddress+".pdf")
arcpy.SelectLayerByAttribute_management(parcelLayer, "NEW_SELECTION", "LocAddress" = locAddress)
df.zoomToSelectedFeatures()
for lyrName in lyrList:
lyr = arcpy.mapping.ListLayers(mxd, lyrName, df)[0]
lyr.visible = True
#Export each theme to a temporary PDF and append to the final PDF
tmpPdf = outPath + lyrName + "_temp.pdf"
if os.path.exists(tmpPdf):
os.remove(tmpPdf)
arcpy.mapping.ExportToPDF(mxd, tmpPdf)
finalPdf.appendPages(tmpPdf)
#Turn off layer visibility and clean up for next pass through the loop
lyr.visible = False
del lyr, tmpPdf
Again the above code isn't tested but the idea is that it should give you 800 pdf's name for example ParcelRepor t519 Main St.pdf It should contain 3 pages (because the lyrList has 3 items). I hope this helps
... View more
09-05-2013
12:26 AM
|
0
|
0
|
338
|
POST
|
I am not entirely sure what you are trying to do. Could you please explain it. Also when you post code can you use the code tag? It makes the code more readable.
... View more
09-04-2013
01:09 AM
|
0
|
0
|
338
|
POST
|
It would be nice to see the functions as well. What is the value of your newDBPath? They should be just the name of the dataset, not the data source. Perhaps you could change the value to equal layer.datasetName. Jeff The function findNewPath searches a csv file for the new connection and featureclass name. The newDBPath contains just the name of the feature class /table etc. Some examples of the newDBPath:
GEONAM_BDMSNRSNRGRD
GEONAM_BDMSNRGRNDCONVRNVLK
GEONAM_WTRSANCONGRDWTRVLK
newDBconnection="Database Connections\\xyz@geooraont.sde\\"
As you can see there is no dataset there which is how it should be. The newDBConnection is the connection to the sde. Also without any datasets. If i look at the mxd after i run the script it shows the following: The first layer is set correctly without any dataset see the attachment datasourceOK The other layers are set incorrectly see for an example the attachment datasourceNotOK Notice that the feature dataset is still set
... View more
09-04-2013
12:23 AM
|
0
|
0
|
819
|
POST
|
Thanks for your reply. Unfortunately i am not at my work pc (it's evening over here) so i can't give you the relevant code. I will do that tomorrow morning.
... View more
09-03-2013
11:33 AM
|
0
|
0
|
819
|
POST
|
Hi All, I got a problem with changing multiple datasources in a mxd. We are migrating from arcgis 9.3.1 to 10.1 and at the same time we are changing our sde structure. In the old structure we are using a lot of feature datasets to group data. In the new structure we remove the feature datasets. So basically all the data in the "root". When i run the below code it changes the datasources for all layers but only the first layer has it's dataset removed. Meaning only the first layer succeeds and the other layers show up as broken. If i then look at the datasource properties via arcmap it still shows the old feature dataset. below the relevant code: mxd = arcpy.mapping.MapDocument(r"KabelsenLeidingen.mxd") for layer in arcpy.mapping.ListLayers(mxd): newDBPath="" newDBPath=findNewPath(layer.dataSource,layer.workspacePath) if newDBPath!="not found": layer.replaceDataSource(newDBconnection,"SDE_WORKSPACE",newDBPath,False) mxd.save() the newDBPath variable is set via a function and is always correct. When running the above code it only removes the dataset of the first layer. The replaceDataSource function takes the longest time on the first layer the others go really fast. I tried multiple MXD's. Any idea what is wrong with the code?
... View more
09-02-2013
05:32 AM
|
0
|
6
|
2511
|
POST
|
Hello all, I am kinda confused. If you look at the different mapservicelayers such as ArcgisDynamicMapServiceLayer and AcrgisTiledMapServiceLayer etc you can see that the object actually describes a mapservice and not an individual layer. Unless i am missing something. The object does keep track of the layers but it is not an individual layer. So for me it makes way more sense to name the classes ArcgisTiledMapservice. This would make it (for me at least) less confusing. For example in my code i need to get an individual layer, i can loop trough all the layers via the layerInfos array. At which point i have an layerinfo. With the layerInfo ID i can get the actual layer from the map via map.getLayer(id) Which does make sense but not if you are for the first time looking at the api and thinking you are working with a layer when in fact it is a mapservice. I can understand it would require a lot of work for everyone if the api gets changed but i wanted to post it anyway. Greetings Jeroen Wisse
... View more
02-04-2013
05:18 AM
|
0
|
0
|
314
|
POST
|
Thanks for your help. I have it fixed now by setting the display fields of the featureLayer in stead of the query. I know i can use the queryIDs() function if i only need the objectid's but i need more. Anyway it works now thanks again
... View more
05-31-2012
12:46 AM
|
0
|
0
|
456
|
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|