阅读:1591回复:1
add polygon有谁有什么好方法吗
<P>在AECENGINE本身存在add polygon,但是我想做一个相同的,最后可以把填充颜色设置透明.有谁有什么好方法吗?怎么做?</P>
<P>写了一个</P> <P>grapgcontain.add(element,0);</P> <P>也设置选择了。但是就是不显示选择.</P> <P>同时还设置selectiontracker.showhandles=true,也不显示.</P> <P>有谁知道不,谢谢</P> |
|
1楼#
发布于:2007-05-11 00:15
<P>这个例子看有没用,有点不明白你要添加的是elment还是feature?</P>
<H1>AddElement Example</H1> <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> |
|
|