阅读:2334回复:3
ae中怎么实现,插入一个数据框?
<P>ae中怎么实现,插入一个数据框?</P>
<P>类似arcmap中,插入菜单下面的“插入数据框”。请老大们帮忙解决,谢谢。</P> |
|
1楼#
发布于:2008-11-05 11:19
怎么在pagelayout中插入一个数据框?
|
|
2楼#
发布于:2008-11-05 11:20
请高手速速指点,感谢先!
|
|
3楼#
发布于:2008-11-22 18:55
<P>Public Sub AddDataFrame()<BR> <BR> Dim pContentsView As IContentsView<BR> Dim pApp As IMxApplication<BR> Dim pMap As IMap<BR> Dim pMaps As IMaps<BR> Dim pMxDocument As IMxDocument<BR> Dim pActiveView As IActiveView<BR> <BR> Set pApp = Application<BR> Set pMxDocument = ThisDocument<BR> Set pActiveView = pMxDocument.ActiveView<BR> Set pMaps = pMxDocument.Maps<BR> Set pMap = pMaps.Create<BR> <BR> pMaps.Add pMap<BR> <BR> Set pContentsView = pMxDocument.CurrentContentsView<BR> pContentsView.Refresh pMxDocument<BR> <BR> Dim pMapFrame As IMapFrame<BR> Dim pMapExt As IEnvelope<BR> <BR> Set pMapFrame = New MapFrame<BR> Set pMapExt = New Envelope<BR> Set pMapFrame.Map = pMap<BR> <BR> pMapExt.XMin = 3<BR> pMapExt.YMin = 3<BR> pMapExt.XMax = 7<BR> pMapExt.YMax = 7<BR> <BR> Dim pMapElement As IElement<BR> Dim pGeoExt As IGeometry<BR> <BR> Set pMapElement = pMapFrame<BR> Set pGeoExt = pMapExt<BR> pMapElement.Geometry = pGeoExt<BR> <BR> If pActiveView.IsMapActivated Then<BR> Set pMxDocument.ActiveView = pMap<BR> Dim pGraphicsContainer As IGraphicsContainer<BR> Set pGraphicsContainer = pMxDocument.PageLayout<BR> pGraphicsContainer.AddElement pMapElement, 2<BR> Else<BR> pActiveView.GraphicsContainer.AddElement pMapElement, 2<BR> pMapElement.Activate pApp.Display<BR> End If<BR> pActiveView.Refresh<BR> <BR>End Sub</P>
|
|