IMapDocument.ReplaceContents(IMxdContents pObject)

来源:互联网 发布:中国医药价格数据分析 编辑:程序博客网 时间:2024/06/07 17:02

Replaces the contents of the MapDocument with the contents of the specified Map, PageLayout, MapControl or PageLayoutControl. Before using the ReplaceContents method a New MapDocument must be created or an existing MapDocument must be Open.

If a MapControl  is passed to the ReplaceContents method the MapDocument will be replaced with the IMapControl2::Map. Likewise, if a PageLayoutControl is passed to the ReplaceContents method the MapDocument will be replaced with the IPageLayoutControl::PageLayout.

If the MapDocument contents is replaced with the contents of a Map or MapControl a portriat PageLayout containing the map will be created.

 在使用这个方法之前,或者建立一个新文档或者打开一个已经存在的新文档.

如果MapControl传给方法,MXD文档将要被IMapControl2::Map代替.

原创粉丝点击