ArcGIS Add In刷新TOC列表方法

在ArcObject应用程序开发中,TOC控件和Map控件是绑定的,map对象修改后,TOC中的图层自动刷新,但在Add In开发中,TOC的内容不会自动刷新,需要手动刷新,操作方法如下:

IDocument document = ArcMap.Application.Document;
IMxDocument mxDocument = (IMxDocument)document;
IContentsView contentsView = mxDocument.CurrentContentsView;
contentsView.Refresh(null);
posted @ 2023-11-01 16:53  我也是个傻瓜  阅读(104)  评论(0编辑  收藏  举报