1

I'm trying to run a model that gets stops from an in_memory workspace and creates a route with directions based on the route, here is what the model looks like:

enter image description here

The following error (error 030024: Solve returned a failure) Occurs:

enter image description here

I understand that the model doesn't recognize the stops I put in the in_memory, but as I couldn't find documentation on how to enter data into the in_memory and use it as model input (all documentation I found was how to use in_memory for the output), could anyone explain how it's done?


I need to make the stops come from in_memory (and not a shp) as the model is supposed to turn into a geoprocessing package (gpk) in which the user will have to input the stops by clicking them on the map.

2
  • in_memory needs to be a file. You write the output file from a process to in_memory\your_file.shp. If you want to use it, you access it the same way in_memory\your_file.shp. How did you put the stops in in_memory?
    – ustroetz
    Commented Nov 7, 2013 at 23:24
  • I tried putting them on the network using network analyst, and tried from there to load them into in_memory with limited success.
    – jonatr
    Commented Nov 8, 2013 at 0:05

2 Answers 2

3

In order to load your "Stops" data into the in_memory workspace, use the Copy Features geoprocessing tool. The output featureclass should be referenced as "in_memory\stops".

Really, though, there is limited value in loading the source data (on disk) into memory first. Rather, you should simply output all of your interim geoprocessing tasks into the in_memory workspace (ie- (in_memory\memLocations or something similar). That way none of the intermediate data is written to disk and all processing should be done in RAM, thus speeding up the overall operation. In your last step, you could either use Copy Features to copy the in_memory data out to disk, or simply point your final operation to a file or geodatabsae on disk.

See Using in-memory workspace in the online help.

3
  • the source data should be on the in_memory for the further packaging into a geoprocessing package for further use (if it's a general tool it's not useful to hard-code the stops as always coming from a specific shp with the same features every time.
    – jonatr
    Commented Nov 8, 2013 at 0:08
  • @jonatr, you already have the stops layer marked as a ModelBuilder parameter. Why would you need to have it pre-loaded into the in_memory workspace? Commented Nov 8, 2013 at 2:43
  • because I need the model to be eligible to get parameters in Arcgis runtime, by clicking on map, by non-GIS personnel, which don't have access to shp or gdb.
    – jonatr
    Commented Nov 8, 2013 at 6:36
2

OK, after much trial and error I found the answer. As this wasn't in any tutorial, I am posting the answer in case somebody gets stuck with this, like me.

The in-memory stops are put in the program's memory during the running of the model. That is, when I run the model, like in the screen capture below, notice that when I move the cursor outside the tool window, The cursor become a point, like when using the edit tool. In this state you can pinpoint the two stops or more you want to run in your model in_memory. screen capture of the moment running the model

If you get stuck anymore on the matter, maybe this link will help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.