When I execute my geoprocessing processing tool, I get this error:
Error code '400' : 'Unable to complete operation.' Error executing tool.: ERROR 000816: The tool is not valid.
My package model includes the following tools:
I've generated this package with ArcMap 10.3.1 and I'm consuming it with the 10.2.6 runtime. According to the documentation that I've found, these tools are supported by this version of the runtime and this version of ArcMap.
Is this a problem in the runtime? In this version of ArcMap?
Is there a workaround for this? I really need to generate a temporary layer and table view so the route event layer tool can execute properly. Working with this SDK is getting incredibly frustrating with its limitations.
Hi,
Please can you try applying the patch: "ArcGIS 10.3.1 for Desktop Package Map For ArcGIS Runtime Patch" ?
ArcGIS 10.3.1 for Desktop Package Map For ArcGIS Runtime Patch | Samples and Utilities
Cheers
Mike
I'll attempt to get this patch applied when our system administrator comes in.
We've applied the patch to ArcMap 10.3.1.
I built a brand new model from scratch using the same tools and exported it as a runtime geoprocessing package. Unfortunately, the patch did not work. I am still receiving the same exception.
I have opened a case with Esri support about this. Hopefully they can help resolve this quickly as my time is running short.
In the meantime, I'll tell you what I'm doing (I've explained this in other posts, but I'll repeat it here). And maybe you can give me some insight into a better way:
Our old applications use ArcObjects. We want to move to .NET with x64 support, so we're using the runtime SDK to build a new mapping component.
The previous component would create an MXD document, and populate it with layers. Some of these layers were Route Event Layers that used SDE connections to the client SQL servers (these were updated on the fly when the connection info changed) to dynamically retrieve data and route it along a central line using routing measurements supplied by our clients.
This allows our clients a great deal of flexibility when manipulating their data.
In our upgrade, I've managed to generate the centerline (plus some ancillary layers that don't apply here) by using a ServiceFeatureTable (and now direct JSON calls because the ServiceFeatureTable refuses to accept custom Measure values). This part works very well, and it generates fast.
Now it is time to add these dynamic layers (facilities layers). We have the facility data, which only contains a start and end point. Using this we need to overlay the facility feature on top of the central line on the map. Unfortunately, I cannot use SDE connections to the tables (or at least, it's never worked for me) using a map package and the LocalFeatureService. So, I built a GeoProcessing package to do the job. Here's what I do:
So, as you can see, it's a pretty complex workflow here. Any suggestions on how I could simplify this (locally, we're not ready to jump on ArcServer yet as our clients may freak out over that)? Since ArcMap refuses to dump out a geo processing model that works for me, I'm hoping there's a potential solution here that I've overlooked or something.
Hi,
Have you had the model working at any point? Did any changes cause the tool to raise the invalid error?
To rule out any issue with ArcGIs Desktop and/or the patch, open up Windows Explorer and navigate to the exploded GPK on disk. By default that will be C:\Users\<UserName>\AppData\Local\ArcGISRuntime\Documents\ArcGIS\Packages\<NameOfGpk>. Inside that folder, do you see a "v101" folder which contains the toolbox, etc?
My first recommendation would be to check all the data paths and make sure you're not writing out to any local machine locations (i.e. use %ScratchWorkspace%\scratch.gdb\<NameOfFeatureClass>). ArcMap will try to wire all this up behind the scenes when you share the GPK, but I like to be more explicit about the paths. You mention using in memory workspaces. I think they should be ok, but it is worth trying physical workspaces just in case. Note, you may find you need to set the ArcMap GP Environment option for your scratchworkspace - i usually use something like "C:\Data\ScratchWorkspace".
If you're able to share the model/data and code I can take a look and see if I can diagnose what's wrong.
I can;t instantly think of another way to get the measure information on to your features, other than perhap exploring the GeometryEngine and constructing a workflow there with intersections, etc.
Cheers
Mike
Hey Mike,
Thanks for getting back to me. I'm out of the office until Tuesday, so I won't be able to look into this. I did open a support request about this issue and sent them a copy of my geo processing model (and a sample project that illustrates the issue). I could send it to you on Tuesday. More eyes on the problem might yield a quicker analysis and all that.
Regardless, it seems like this may be a bug in the ArcMap geoprocessing package generation, at least from my conversation with support. I did get other geoprocessing models to nearly work (By nearly I mean the code executed and returned different errors that were my own fault for sending the wrong type of data as parameters). And some geoprocessors like Create Route + Make Route Event Layer worked perfectly (except that my measure values were off - but Thad Tilton helped me get around that). Anyway, like I said, I'm not in the office, so I won't be able to try those steps. But I'll give it a shot on Tuesday.
At this point my company has decided to forego building the map data with the Runtime and use a separate ArcObjects process to do that. That said, I would like to help solve this particular issue, so I'll definitely devote some resources to doing so.
Just as an aside, I did try and build a geoprocessing package with only the Make Feature Layer tool inside the model, and that error came up then as well, not only that, but trying it with the Make Table View by itself tool also resulted in the same error. When I tried the Make Route Event Layer tool on its own, that error didn't pop up, but I did get an error about incorrect feature class type (my fault as I mentioned above). When I looked at the service web page directly through a browser I noticed something strange. Normally when I go to my URL for the processing service, I can see the task(s) inside the package listed on the page. When I had the Make Feature/Table View tools on their own in the package, nothing showed up at all, and with Make Route Event layer on its own, the task was listed on the page. Maybe that indicates something?