InMemoryFeatureLayer parkmemLayer = new InMemoryFeatureLayer(); InMemoryFeatureLayer phyobjmemLayer = new InMemoryFeatureLayer(); InMemoryFeatureLayer aproadmemLayer = new InMemoryFeatureLayer(); memLayer = new InMemoryFeatureLayer(); multiLayer.Open(); parkmemLayer.Open(); phyobjmemLayer.Open(); aproadmemLayer.Open(); try { //int cCount = multiLayer.QueryTools.GetCount(); string[] landuseColArr = new string[] { "POLYGON_NM", "FEAT_YTPE" }; TransactionResult TResult; Collection allFeatures = multiLayer.QueryTools.GetAllFeatures(landuseColArr); parkmemLayer.EditTools.BeginTransaction(); aproadmemLayer.EditTools.BeginTransaction(); phyobjmemLayer.EditTools.BeginTransaction(); for (int i = 0; i < allFeatures.Count; i++) { if (allFeatures[i].ColumnValues[map_def.LANDUSE_TYPE].Contains("PARK") == true) { parkmemLayer.InternalFeatures.Add(allFeatures[i]); } if (allFeatures[i].ColumnValues[map_def.LANDUSE_TYPE].Contains("AIRCRAFT ROADS") == true) { aproadmemLayer.InternalFeatures.Add(allFeatures[i]); } if (allFeatures[i].ColumnValues[map_def.LANDUSE_TYPE].Contains("SHOPPING CENTRE") == true || allFeatures[i].ColumnValues[map_def.LANDUSE_TYPE].Contains("HOSPITAL") == true || allFeatures[i].ColumnValues[map_def.LANDUSE_TYPE].Contains("SPORTS COMPLEX") == true || allFeatures[i].ColumnValues[map_def.LANDUSE_TYPE].Contains("UNIVERSITY") == true || allFeatures[i].ColumnValues[map_def.LANDUSE_TYPE].Contains("COLLEGE") == true || allFeatures[i].ColumnValues[map_def.LANDUSE_TYPE].StartsWith("AIRPORT") == true) { phyobjmemLayer.InternalFeatures.Add(allFeatures[i]); } } TResult = parkmemLayer.EditTools.CommitTransaction(); if (TResult.TransactionResultStatus != TransactionResultStatus.Success) { parkmemLayer.BuildIndex(); } TResult = aproadmemLayer.EditTools.CommitTransaction(); if (TResult.TransactionResultStatus != TransactionResultStatus.Success) { aproadmemLayer.BuildIndex(); } TResult = phyobjmemLayer.EditTools.CommitTransaction(); if (TResult.TransactionResultStatus != TransactionResultStatus.Success) { phyobjmemLayer.BuildIndex(); } } catch (Exception ex) { string strTest = ""; strTest = "Error adding MultiShape to Engine MSG: " + ex.Message; dbg_log.Log((int)_DBG.ALL, strTest); } parkmemLayer.Close(); phyobjmemLayer.Close(); aproadmemLayer.Close(); multiLayer.Close();