POST
|
I installed the ArcGIS Pro SDK for Visual Studio via the recommended method in the installation guide. However, I do not see any project templates in my menu. Screenshot: I also tried installing via the .visx installers and rebooting the machine, but I am still not seeing the same menu options that are shown in the SDK docs. Has anyone experienced this before? System info: Windows 7 64-bit, Visual Studio 2015, ArcGIS Pro 1.4
... View more
06-04-2017
12:49 PM
|
0
|
2
|
1915
|
POST
|
In arcpy.mapping, df.extent would allow me to set the zoom of the map (not the zoom of the data frame on the layout). Is this functionality available in arcpy.mp? Additionally, am I able to create a new map within an ArcGIS Pro project with arcpy.mp?
... View more
06-02-2017
12:13 PM
|
0
|
1
|
1353
|
POST
|
lol I'm dumb, that was it! Time for bed, enough Python for today!
... View more
06-01-2017
08:33 PM
|
0
|
0
|
6706
|
POST
|
I read the "Guidelines for arcpy.mp" doc, but when I call the sample code myself in the ArcGIS Pro Python window or from a Python script, I get this error: import arcpy
aprx = arcpy.mp.ArcGISProject(r'C:\Path\To\Project\test_project.tbx')
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\_mp.py", line 283, in __init__
self._arc_object = arcgisscripting._mapping.ArcGISProject(*gp_fixargs((aprx_path,), True))
OSError: C:\Path\To\Project\test_project.tbx Is this normal expected behavior? The example code shows setting the project variable with an explicit .aprx file path, and I'm wondering why I'm unable to do the same on my machine. The .aprx file is present/there are no misspellings in the file path in my code. For reference, I'm running a fresh Windows 7 64-bit install with a fresh ArcGIS Desktop install as well (Pro v 1.4.1).
... View more
06-01-2017
08:07 PM
|
2
|
10
|
8907
|
POST
|
Why is it using a WebBrowser class here? It's a one liner to open a url with the system default browser: System.Diagnostics.Process.Start("http://my-url.com");
... View more
02-16-2017
07:47 AM
|
4
|
0
|
4874
|
POST
|
I'm attempting to call the geocodeAddresses method in the ArcGIS REST API in my C# application. The "addresses" input parameter is a potentially very long JSON string containing an array of a complex type. The code below works ok and I get a response from the API if the addresses param is a short JSON string containing only a few addresses, but if it is a very long string with many addresses I get an "Invalid URI: The Uri string is too long." exception when PostAsync() is called. So what I'm doing is just calling the API with a long url. How can I ensure the parameters are posted to the body of the request and not get an extremely long url? string url = "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/geocodeAddresses "; var values = new Dictionary<string, string> { {"token", token}, {"forStorage", "true"}, {"MaxBatchSize", "1000"}, {"outFields", "*"}, {"f", "json"}, {"addresses", inputJson} //inputJson is an array of a complex type }; using (var client = new HttpClient()) { try { var content = new FormUrlEncodedContent(values); var response = await client.PostAsync(url, content); Task<string> responseString = response.Content.ReadAsStringAsync(); string outputJson = await responseString; res = JsonConvert.DeserializeObject<DoStuffResult>(outputJson); } catch (Exception ex) { Debug.WriteLine(ex.ToString()); //"Invalid URI: The Uri string is too long." } }
... View more
08-08-2016
10:51 AM
|
0
|
0
|
22859
|
Title | Kudos | Posted |
---|---|---|
2 | 06-01-2017 08:07 PM | |
4 | 02-16-2017 07:47 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|