POST
|
Just back from the weekend and catching up on some reading i see that the activeView and activeMap will always be None when run from outside of the Pro application. So that is unlikely to be the cause of the issue for the case of SINGLE_LAYER never finding any labels to convert.
... View more
07-31-2023
10:31 AM
|
0
|
0
|
648
|
POST
|
@DennisWarnat90 I'm wondering if you ever got this working with SINGLE_LAYER? I am doing something very similar, having published a python toolbox as a Geoprocessing service. The service is running perfectly fine and all the other functions of it work as expected (exporting data from the map etc). One component that is not working is the same example you posted which is the call to ConvertLabelsToAnnotation. From what I can tell this does not appear to work when run within the context of a geoprocessing service (or standalone in your case). From within Pro and using the same aprx file I can execute python commands to generate successfully with the SINGLE_LAYER option, however when run from within a SOC process as a geoprocessing service the tool generates this message (which i suspect is what you might also have seen if you added some debug output via arcpy.AddMessage(arcpy.GetMessages())): Start Time: Thursday, July 27, 2023 9:46:14 AM WARNING 002847: No labels to convert. There are no feature layers that are labeled at the conversion scale. Succeeded at Thursday, July 27, 2023 9:46:16 AM (Elapsed Time: 2.25 seconds) The layer in question is visible, has labelling turned on and has no scale restriction value that impedes the generation of a label at the map scale I am asking (and which works perfectly with the exact same values when run from within Pro). When ALL_LAYERS is used for 'which_layers' it does generate but this is not what I need. I have spun my wheels a lot on this, trying various things and testing in Pro and Enterprise. I feel like it is somehow tied to the fact that when opening the aprx from the Enterprise service context there is no active map (even though the aprx is saved with one). Asking for the activeMap from the ProProject gives None unlike when using from CURRENT within a Pro context. Instead I have to use listMaps()[0]. I'm probably at the point of raising a support issue but just wanted to ask here before I do. Many thanks, mark
... View more
07-27-2023
11:21 AM
|
0
|
1
|
661
|
POST
|
Been talking with Esri folks, look like this is a known issue in 10.8.1 and probably 10.9. Unclear on status in 10.9.1 at this time. BUG-000137332 Short term workaround is to change the cloned env in use for all services via "proswap newenvname" rather than using condaEnvironmentPath for just one service. Not ideal long term for systems with other custom python gp tools installed (with other modules dependencies) since this would break these other tools. Closing discussion, thank you for all assistance!
... View more
01-07-2022
08:49 AM
|
0
|
0
|
739
|
POST
|
Hi Amanda, Not a python expert here but if I'm following this would be a system/server wide change vs specific to just my single service which is the supposed to be the point of the condaEnvironmentPath property. Apologies if not following, mark
... View more
01-06-2022
01:39 PM
|
0
|
0
|
765
|
POST
|
Stepped away for few days and came back to it. Confirmed that it is simply ignoring the condaEnvironmentPath property specified in the documentation.... With the setting in place and the service failing to start, if I jump over to the ArcGIS account and run pip on my modules into the default esri environment and jump back over to my domain account the service then starts just fine. So it is still looking for the modules against the default env. So not sure if documentation is wrong, parameter name maybe wrong, bug, or missing some step to refresh envs and let esri know about?
... View more
01-06-2022
01:35 PM
|
0
|
0
|
765
|
POST
|
Hi, I am creating a custom python GP toolbox that relies on other modules I have built. Based on the Esri recommendation I am have cloned the default server conda env and installed my modules to the cloned env using pip. Everything installs fine and i see the modules listed in the env. Following the steps here I then use the "condaEnvironmentPath" property to tell server to use my cloned environment that includes the installed modules. However when i try to start the service i get: "Geoprocessing Service initialization failed" "The toolbox did not load" "Failed to construct instance of service" If however I use the main non cloned conda environment and install my modules there, everything works fine, the service starts and I am able to call and use the GP service via my web application as expected. It only fails it I try to use the cloned env and the updated "condaEnvironmentPath" property in the service details. I would like to follow the Esri recommended path of not touching the default env but this environment per service approach does not appear to work for me. Has anyone had any success with this? thanks mark
... View more
01-03-2022
03:17 PM
|
0
|
4
|
824
|
POST
|
Hi, I'm looking to add some C++ based ArcObjects code to our SOE (in very specific areas) in order to get performance for some bottleneck areas ie https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#PerformanceAO.htm My question is, does this transfer to the new Enterprise SDK. I know there are differences in the API but is the general concept of being able to use C++ instead of C# supported? I'm not finding any help documentation that would say this is possible. Can anyone confirm "yae" or "nay"? thanks, mark
... View more
09-25-2019
10:21 AM
|
0
|
0
|
511
|
POST
|
I have a complex published GP web service that processes a lot of data. To reduce the complexity of processing on the returned data i would like to add some additional geometry information in a 'BUFFER' BLOB field i add on the RecordSet that is returned by the model. My model adds and populates the BLOB field just fine (results in desktop run of model show it added) but I don't see any way to get at the resulting BLOB data in the JavaScript API. I'm thinking that this is not supported on this return type?? If not what should i be using for the return parameter type? The parameter definition looks like this (removed some items for clarity). Parameter: cheapest_routes Data Type: GPFeatureRecordSetLayer Display Name Cheapest Route Results Direction: esriGPParameterDirectionOutput Geometry Type: esriGeometryPolyline Parameter Type: esriGPParameterTypeDerived The resulting JSON from the call looks like this. The fields list includes 'BUFFER' but there is nothing accessible via attributes on the feature (not that i would necessarily expect it there being of type BLOB). {"paramName":"cheapest_routes","dataType":"GPFeatureRecordSetLayer","value":{"displayFieldName":"","geometryType":"esriGeometryPolyline","spatialReference":{"wkid":102100,"latestWkid":3857},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"FacilityID","type":"esriFieldTypeInteger","alias":"FacilityID"},{"name":"FacilityRank","type":"esriFieldTypeInteger","alias":"FacilityRank"},{"name":"Name","type":"esriFieldTypeString","alias":"Name","length":128},{"name":"IncidentCurbApproach","type":"esriFieldTypeInteger","alias":"IncidentCurbApproach"},{"name":"FacilityCurbApproach","type":"esriFieldTypeInteger","alias":"FacilityCurbApproach"},{"name":"IncidentID","type":"esriFieldTypeInteger","alias":"IncidentID"},{"name":"Total_Feet","type":"esriFieldTypeDouble","alias":"Total_Feet"},{"name":"ROUTE_LENGTH","type":"esriFieldTypeDouble","alias":"ROUTE_LENGTH"},{"name":"REGION_LENGTHS","type":"esriFieldTypeString","alias":"REGION_LENGTHS","length":255},{"name":"REGION_COSTS","type":"esriFieldTypeString","alias":"REGION_COSTS","length":255},{"name":"TOTAL_COST","type":"esriFieldTypeDouble","alias":"TOTAL_COST"},{"name":"BUSINESS_COUNT","type":"esriFieldTypeInteger","alias":"BUSINESS_COUNT"},{"name":"BUFFER","type":"esriFieldTypeBlob","alias":"BUFFER"},{"name":"Shape_Length","type":"esriFieldTypeDouble","alias":"Shape_Length"}],"features":[{"attributes":{"OBJECTID":1,"FacilityID":223,"FacilityRank":1,"Name":"1 - Fiber Equipment_52","IncidentCurbApproach":2,"FacilityCurbApproach":2,"IncidentID":2,"Total_Feet":4509.8375642549054,"ROUTE_LENGTH":155.05697297572786,"REGION_LENGTHS":"155","REGION_COSTS":"5","TOTAL_COST":775,"BUSINESS_COUNT":12,"Shape_Length":47.261365363001858},"geometry":{"paths":[[[-9660317.6412000004,4323080.7396000028],[-9660325.6509000007,4323095.3488000035],[-9660285.8285000008,4323117.2961999997]]]}}],"exceededTransferLimit":false}} Any comments appreciated. mark
... View more
06-01-2016
11:54 AM
|
0
|
0
|
1044
|
POST
|
Ok this was actually an internal problem in the tool. In my case i had 2 c# dictionaries caching information about features (since the model loops over them many times during processing). These dictionaries were not being cleared. On the 2nd invocation of the tool it got the same (not being used) SOC process that was used in the first run. An error was then thrown on adding data to the dictionary as some keys already existed (from invocation 1) causing the model output to never be set (hence the error message on it). After clearing those dictionaries the error is not thrown and the model now runs repeatedly. The trick to hunting this all down is to look in the jobs directory for your model C:\arcgisserver\directories\arcgisjobs\[model name] and the messages.xml file in the scratch folder. In there i could see the error about the pre-existing key. So no special tricks needed to get it working just a user error in the model.
... View more
03-16-2016
12:01 PM
|
0
|
1
|
317
|
POST
|
I have a custom GP tool created that works fine in desktop, i can publish it to server successfully, and i can run it from the server endpoint in desktop and even call it from a web application. The problem is however that on the second execution the tool fails. The error message is: This is one of the tool output parameters. Invalid return value: c:\arcgisserver\directories\arcgisjobs\solveroute_gpserver\j206d69d70deb45f48030116282263aa5\scratch\scratch.gdb\SHORTEST the output is defined as: IGPParameterEdit3 outputParameter = new GPParameterClass();
outputParameter.DataType = new GPFeatureRecordSetLayerTypeClass();
outputParameter.Direction = esriGPParameterDirection.esriGPParameterDirectionOutput;
outputParameter.DisplayName = "Shortest Route Results";
outputParameter.Name = "shortest_routes";
outputParameter.ParameterType = esriGPParameterType.esriGPParameterTypeDerived;
parameters.Add(outputParameter); I can see the job id on the path changes on each invocation but so not sure why its failing. Next call gives: Invalid return value: c:\arcgisserver\directories\arcgisjobs\solveroute_gpserver\jb73331a1e1324bc2b44b2c6d98baed7a\scratch\scratch.gdb\SHORTEST If I restart server it all works again for one execution. Anyone have any tips on what you need to do to make this work? thanks mark
... View more
03-16-2016
10:27 AM
|
0
|
3
|
1544
|
POST
|
Ok got it. Since this was an Esri hosted organizational account i needed to use www.arcgis.com for the portal url and not our organizational url. Once i did this i only had to login once. So i simply need to test if its hosted or not. mark
... View more
10-01-2015
10:36 AM
|
0
|
0
|
303
|
POST
|
I'm using the Javacript API IdentityManager WITHOUT OAuth to sign in to a portal. This works fine and i get back a valid credentials object and i'm able to query items. The problem is when i call arcgisUtils.getItem() on a selected query item i get asked to authenticate once again. If i provide the login again the call then works and i can add the layer. How do i stop this double login though? Is there something i need to do with the returned credentials and the identityManager before calling getItem()? My initial call to get credentials looks like this (edited for clarity): identityManager.getCredential(_portal.url + "/sharing", {oAuthPopupConfirmation: false}).then((credential)=>{ _loggedInUser = credential.userId; return _portal.signIn().then((result)=>{ return _loggedInUser; }); }); this call results in a second login request: getItemDetails(item){ return arcgisUtils.getItem(item.id); } If i use OAuth and a registered appId everything works great with just one login request. We want to give our users the ability to use or not use OAuth however so want both options to work. thanks mark
... View more
10-01-2015
09:27 AM
|
0
|
1
|
2118
|
POST
|
Try using the DLL under C:\Program Files\ArcGIS\Server\DatabaseSupport\PostgreSQL\9.2\Windows64 and place it in the lib directory for your PostgreSQL install. -mike Michael this was the perfect solution for me. Copying from the desktop database support files did not work. Copying from the server database support files location did! thank you! Both files appear to be the same size but something must be different. mark
... View more
04-01-2014
03:16 PM
|
0
|
0
|
1747
|
POST
|
Hi Radu, Sorry been on the road for a few weeks so on catch up again. Did you get this resolved? Email me at mreddick@esri.com and we can arrange a webex to trouble shoot. Regards, mark
... View more
03-01-2013
11:13 AM
|
0
|
0
|
711
|
POST
|
Hi Dave, This looks like possibly a permissions issue. Are they hitting the same data source as you? The tools are basically telling you via the log file that it can see/find the DynamicValue table in that workspace. It needs this table for the tools to function correctly. Anything being created without this table in place will not be correctly populated. You can ping me directly at mreddick@esri.com if you need to arrange a webex to trouble shoot. mark Esri, Technical Marketing - Telecom Solutions
... View more
03-01-2013
11:10 AM
|
0
|
0
|
357
|
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|