POST
|
I had a similar problem with the setCamera and isVisible methods when I was changing these properties on a large number of layers. The map frame display did not reliably update. Breaking out the calls into separate QueuedTask.Run blocks seemed to fix the issue, although it seems less efficient.
... View more
09-06-2023
11:49 AM
|
0
|
0
|
243
|
POST
|
Thanks David. We found that the lists of available packages were different on the same installation of Pro for 2 different users. My manager could see suds-jurko as an option but I could not. We opened a case with ESRI and while they did not address why different users would have varying package selections on the same installation, they did provide step-by-step instructions for installing the package through the conda package manager (critical for a Python newbie such as myself). After following the steps below, suds-jurko showed up as desired in the list of installed packages in the Pro Package Manager. 1. Windows Search for Python Command Prompt (Running this prompt put me into the cloned, active Python environment) 2. Use the following commands: conda install -c conda-forge suds-jurko
... View more
07-12-2023
02:45 PM
|
1
|
0
|
359
|
POST
|
We have a web service that uses arcpy and needs to include information from a government web service that is only available via SOAP. We have used the suds-jurko library for the last few years without incident. After upgrading the server from 2.8 to 3.1.1 (and cloning a new environment) suds-jurko was missing from the list of packages to add. There is another popular SOAP package called zeep but that isn't on the list either. The strange thing is that we have upgraded Pro on 2 different desktop computers to 3.1.1 and suds-jurko and zeep ARE both on the list. One of the desktops went from 2.8 to 3.0.1 and finally to 3.1.1. We tried doing a clean install of 3.0.1 yesterday to see if that would help, but the packages are still not on the list. We have admin privileges on both machines. The server is running a different OS from the desktops. Any ideas?
... View more
06-15-2023
10:15 AM
|
0
|
2
|
463
|
IDEA
|
Does this help? https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-enable-word-wrapping-for-legend-labels/m-p/1119751#M7382. It's been a while.
... View more
05-16-2023
10:51 AM
|
0
|
0
|
387
|
POST
|
Thank you! This worked well. I retrieved a polygon from a feature class to set my clip geometry. Wish I were more competent in LINQ queries when querying the layers to exclude from the clipping, but I got it working!
... View more
01-27-2022
11:29 AM
|
0
|
0
|
437
|
POST
|
There is an example of clipping map layers to a polygon in the ProSnippets for Map Authoring using the SetClipGeometry method. Is there also an API to exclude map layers from the clipping? The ArcGIS Pro map Clip Layers tab provides this capability.
... View more
01-25-2022
02:47 PM
|
0
|
2
|
478
|
POST
|
This works fine. It is quite obscure and I would never have found it on my own. It would be nice if this could be added as a property. Thanks for your help!
... View more
11-24-2021
11:47 AM
|
0
|
0
|
577
|
POST
|
Does anyone have a C# example of enabling word wrapping for legend labels? This setting is accessible on the Legend Arrangement Options in ArcMap but I can't find a way to set it in the API.
... View more
11-23-2021
11:47 AM
|
0
|
2
|
638
|
POST
|
I needed to create a UniqueValueColorizerDefinition to symbolize a raster layer from a custom set of colors. I was able to modify the CreateStretchRendererFromScratch() method in the CIMExamples project to create a UniqueValueColorizerDefinition object using the CIMMultipartColorRamp that is created in the upper portion of this sample method. Thank you for this example. There is not much documentation on raster symbology.
... View more
10-29-2021
01:38 PM
|
0
|
0
|
870
|
POST
|
I struggled to get a simple raster calculator expression working with v2.8.2. I started with this example from the ArcGIS blog. The problem is that the example shows the layer file names encased by single quotes and it apparently needs to be double quotes. With double quotes, my expression with fully qualified file names works fine. Unfortunately comments are closed for the blog entry. Some sample C#: string annualRaster = @”C:\Docs\animas_AOI_prms\prism.gdb\annual”; string quarterlyRaster = @”C:\Docs\animas_AOI_prms\prism.gdb\sq1”; string maExpression = String.Format("\"{1}\" / \"{0}\" * 100", annualRaster, quarterlyRaster); var valueArray = Geoprocessing.MakeValueArray(maExpression, outRaster); var gpResult = await Geoprocessing.ExecuteToolAsync("RasterCalculator_sa", valueArray, environments);
... View more
08-25-2021
01:12 PM
|
0
|
0
|
997
|
BLOG
|
I used Kenny's code to implement a similar solution. A few notes: The return value from the AddJoin GP tool is the name of the layer created by the join. This string should be used as one of the inputs to the CalculateField tool. The code example has it quoted as an actual string. Be sure that you supply a GPExecuteToolFlags value that adds the join layer to the Pro display. I normally have this disabled because I'm working in a non-interactive mode, but if the join isn't in the map view then it can't be used for the calculation. To clean up when you are done, just use the Map.RemoveLayer api to remove the join layer from the map. Again, use the return value from the AddJoin tool to get the layer name.
... View more
08-10-2021
01:31 PM
|
0
|
0
|
1447
|
POST
|
For any ArcGIS Pro SDK developers looking for this setting, you'll find it at the UniqueValueRendererDefinition.UseDefaultSymbol property. Set this to false and 'All Other Values' disappears from the legend.
... View more
03-01-2021
03:51 PM
|
0
|
0
|
1747
|
POST
|
I still haven't been able to get past the 502 Bad Gateway error but wanted to bump this issue back to the top and add my current code. I did find some mistakes in my previous submission. Hopefully someone has been able to get this function to work in the last year or so? var myPortal = ArcGISPortalManager.Current.GetActivePortal(); string strToken = myPortal.GetToken(); var owner = myPortal.GetSignOnUsername(); var url = $"https://www.arcgis.com/sharing/rest/portals/self?f=json&token=" + strToken; var response = new EsriHttpClient().Get(url); var json = await response.Content.ReadAsStringAsync(); dynamic portalSelf = JObject.Parse(json); var uploadUrl = "https://" + Convert.ToString(portalSelf.urlKey) + ".maps.arcgis.com/sharing/rest/content/users/" + owner + "/addItem";//convert filestream to byte array byte[] fileBytes; using (var fileStream = File.OpenRead("C:\\Docs\\animas_AOI_prms\\maps_publish\\title_page.pdf")) { var binaryReader = new BinaryReader(fileStream); fileBytes = binaryReader.ReadBytes((int)fileStream.Length); } var fileBinaryContent = new ByteArrayContent(fileBytes); string strTitle = "Testing 1 2 3"; using (var formData = new MultipartFormDataContent()) { // Add the HttpContent objects to the form dataformData.Add(new StringContent("json"), "f"); formData.Add(new StringContent(strToken), "token"); formData.Add(new StringContent("true"), "async"); formData.Add(new StringContent("PDF"), "type"); formData.Add(new StringContent(strTitle), "title"); formData.Add(new StringContent("eBagis"), "tags"); formData.Add(new StringContent("upload from BAGIS"), "description"); var multipartContent = new MultipartFormDataContent { { fileBinaryContent, "file" } }; formData.Add(multipartContent); // Invoke the request to the server // equivalent to pressing the submit button on // a form with attributes (action="{url}" method="post") response = await new EsriHttpClient().PostAsync(uploadUrl, formData); json = await response.Content.ReadAsStringAsync(); }
... View more
02-23-2021
02:21 PM
|
0
|
0
|
755
|
POST
|
I found that this name for the tool works as well. Not sure if it has changed or if both will work: CreateFileGDB_management
... View more
12-22-2020
10:24 AM
|
0
|
0
|
1941
|
POST
|
Note that this also works for shapefiles when you supply "Shapefile" in the f.Type search string. I have read some posts saying that listing shapefiles in a file system data store is not supported. Developing on 2.6.3.
... View more
12-16-2020
03:39 PM
|
0
|
0
|
916
|
Title | Kudos | Posted |
---|---|---|
1 | 07-12-2023 02:45 PM | |
1 | 11-13-2020 10:17 AM | |
1 | 04-08-2020 10:37 AM | |
1 | 03-25-2020 03:24 PM | |
1 | 10-18-2019 02:22 PM |
Online Status |
Offline
|
Date Last Visited |
09-06-2023
07:49 PM
|