I am aware that one can open a feature class in a geodatabase using the code below.

Geodatabase geodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri("path\\to\\sde\\file\\sdefile.sde")))
FeatureClass table = geodatabase.OpenDataset<FeatureClass>("FeatureClassName");

But how can I open a file that's saved in memory such as "in_memory/testFile"?

I have combed Esri's resources to no avail.

  • The memory-based workspaces are discussed here and even show up in the Geoprocessing ProConcepts in ArcGIS Pro SDK Github, but all the examples are either Python or writes using the SDK. I can't find an example using the SDK to read from it.
    – Soulis
    Nov 22, 2019 at 23:37
  • Also, if you can output the memory-based feature class as a feature layer on a map, you can grab the feature class from that layer. But adding something to the map to grab a by-definition temporary feature class leaves a bad taste in my mouth.
    – Soulis
    Nov 22, 2019 at 23:43
  • 1
    @Soulis I have resorted to utilizing that methodology of creating and then adding the memory layer to the map and grabbing it that way and I agree, it's extremely clumsy.
    – ketar
    Dec 3, 2019 at 17:57
  • 1
    I asked the same question on GeoNet, but no answer yet. I'll add an answer if it ever gets answered there.
    – Soulis
    Dec 5, 2019 at 19:21


Your Answer

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

Browse other questions tagged or ask your own question.