ae 二次开发,mdb里的要素类为esriFeatureType.esriFTAnnotation的图层怎么加载

请教一下,ae 二次开发,mdb里的要素类为esriFeatureType.esriFTAnnotation的图层怎么加载,代码如何实现。
已邀请:

朱新颖

赞同来自:

可参考下面代码(对应改为mdb即可):IAnnotationLayerFactory annotationLayerFactory = new FDOGraphicsLayerFactoryClass();
            IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();
            IWorkspace workspace = workspaceFactory.OpenFromFile(@"D:\E_new\ZhuXinying\testData\test.gdb", 0);
            IFeatureWorkspace featureWorkspace = workspace as IFeatureWorkspace;
            // Create the annotation feature class and an annotation layer for it.
            IAnnotationLayer annotationLayer = annotationLayerFactory.OpenAnnotationLayer(featureWorkspace, null, "省界Anno");
            axMapControl1.AddLayer(annotationLayer as ILayer);
            axMapControl1.Refresh();

要回复问题请先登录注册