阅读:1373回复:1
请帮看看下面画专题图的程序有什么错误?
<P ><FONT face="Times New Roman" size=3>Dim pGraphicsContainer As IGraphicsContainer</FONT></P>
<P ><FONT size=3><FONT face="Times New Roman"> Dim pActiveView As IActiveView</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Dim pRectangle As IRectangleElement</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Dim pFRect As IFillShapeElement</FONT></FONT></P> <P ><FONT face="Times New Roman" size=3> </FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Set pRectangle = New RectangleElement</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Set pFRect = pRectangle</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Dim pFillSym As ISimpleFillSymbol</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Dim pLineSym As ILineSymbol</FONT></FONT></P> <P ><FONT face="Times New Roman" size=3> </FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Set pFillSym = New SimpleFillSymbol</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> 'pFillSym.Style = esriSFSSolid</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Dim pColor As IColor</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Set pColor = New RgbColor</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> pColor.RGB = vbBlue</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> pFillSym.Color = pColor</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> Set pLineSym = pFillSym.Outline</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> pColor.RGB = vbRed</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> pLineSym.Color = pColor</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> pLineSym.Width = 1.5</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> pFillSym.Outline = pLineSym</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> 'pElement.Symbol = pFillSym</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> pFRect.Symbol = pFillSym</FONT></FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> 'pElement.Symbol = pFillSym</FONT></FONT></P> <P ><FONT face="Times New Roman" size=3>' Dim pevlope As IEnvelope</FONT></P> <P ><FONT face="Times New Roman" size=3>' Set pevlope = pFeature.Shape.Envelope</FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> 'pElement.Geometry = pevlope</FONT></FONT></P> <P ><FONT face="Times New Roman" size=3> </FONT></P> <P ><FONT face="Times New Roman" size=3> </FONT></P> <P ><FONT size=3><FONT face="Times New Roman"> pGraphicsContainer.AddElement pRectangle, 0 每次执行到这一步的时候会提示出错,错误信息是“object variable or with block variable is not set"我觉得我前面设置了的呀,请大家帮忙看看,谢谢</FONT></FONT></P> <P ><p><FONT face="Times New Roman" size=3> </FONT></p></P> <P ><FONT size=3><FONT face="Times New Roman"> pActiveView.PartialRefresh esriViewGraphics, Nothing, Nothing</FONT></FONT></P> |
|
1楼#
发布于:2004-09-13 14:07
<a href="http://www.gisempire.com/bbs/dispbbs.asp?boardid=62;id=29338" target="_blank" >http://www.gisempire.com/bbs/dispbbs.asp?boardid=62;id=29338</A>
|
|
|