MemoryConnectionProperties custom name vs. ExecuteTool in memory

142
1
Jump to solution
09-16-2021 11:21 PM
ole1986
New Contributor II

I am trying to get a memory geodatabase with custom name to work with Geo processing tools (executed in codebehind).

So, I have created a `MemoryConnectionProperties` object as follow

MemoryConnectionProperties _memoryConnectionProperties = new MemoryConnectionProperties("MyCustomName");

 

But yet I could not find out how to access it using `ExecuteToolAsync`?

Usually for memory I have used the following

var parameters = Geoprocessing.MakeValueArray("memory\\" + _targetFeatureClass.GetName(), shapeFileOutputDir, shapeFileOutputName);
var result = await Geoprocessing.ExecuteToolAsync("FeatureClassToFeatureClass", parameters, null, null, null, GPExecuteToolFlags.None);

Which is fine with the default memory.

Since I would want to isolate several "tasks" the idea came up to use a custom memory name. But I could not find out how to define the memory location (with its custom name).

What I have tried without success

// does not work when executing "FeatureToFeatureClass" tool
var parameters = Geoprocessing.MakeValueArray("memory\\MyCustomName\\" + _targetFeatureClass.GetName(), shapeFileOutputDir, shapeFileOutputName);
// also does not work when executing "FeatureToFeatureClass" tool
var parameters = Geoprocessing.MakeValueArray("MyCustomName\\" + _targetFeatureClass.GetName(), shapeFileOutputDir, shapeFileOutputName);

Any ideas how to solve it?

0 Kudos
1 Solution

Accepted Solutions
RichRuh
Esri Regular Contributor

Sorry, geoprocessing can only access the memory geodatabase called "memory."  

--Rich

View solution in original post

0 Kudos
1 Reply
RichRuh
Esri Regular Contributor

Sorry, geoprocessing can only access the memory geodatabase called "memory."  

--Rich

View solution in original post

0 Kudos