IName接口

命名空间:ESRI.ArcGIS.esriSystem

使用:利用IName来打开一个工作空间

Members

  Description
Read/write property NameString The name string of the object.
Method Open Opens the object referred to by this name.
主要介绍Open方法:

public object Open (
);
例如:

 <span style="white-space:pre">		</span>Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.AccessWorkspaceFactory");
                IWorkspaceFactory pWksFacory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);
                IWorkspaceName pWksName = <span style="font-family: Arial, Helvetica, sans-serif;">pWksFacory </span><span style="font-family: Arial, Helvetica, sans-serif;">.Create(sPath, sName, null, 0);</span>
                if (pWksName != null)
                {
                    object obj = (pWksName as IName).Open();
                    pWks = obj as IWorkspace;
                }


posted @ 2014-12-30 14:45  静以养身 俭以养德  阅读(278)  评论(0编辑  收藏  举报