/// <summary> /// Occurs when this command is clicked /// </summary> public override void OnClick() { try { OpenSimplePointDlg dlg = new OpenSimplePointDlg(m_hookHelper); dlg.Show(); ////get the type using the ProgID //Type t = Type.GetTypeFromProgID("esriGeoDatabase.SimplePointPluginWorkspaceFactory"); ////Use activator in order to create an instance of the workspace factory //IWorkspaceFactory workspaceFactory = Activator.CreateInstance(t) as IWorkspaceFactory; //string path = GetFileName(); //if (string.Empty == path) // return; ////open the workspace //IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspaceFactory.OpenFromFile(@"C:\Data\Data", 0); ////get a featureclass from the workspace //IFeatureClass featureClass = featureWorkspace.OpenFeatureClass("points"); ////create a new feature layer and add it to the map //IFeatureLayer featureLayer = new FeatureLayerClass(); //featureLayer.Name = featureClass.AliasName; //featureLayer.FeatureClass = featureClass; //m_hookHelper.FocusMap.AddLayer((ILayer)featureLayer); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.Message); } }