阅读:5040回复:11
请教版主在AE中实现数据的符号化
<P>请问如何在AE中实现数据的符号化</P><P>在开发帮助中的例子,经过改变但是不能使用</P><P>主要是因为使用了arcGIS中的对象库,在AE中找不到,我现在想问一下在AE中怎么实现数据符号化,感激不仅</P>
|
|
1楼#
发布于:2009-08-13 11:41
<P>在9.2版本以下是有读取serverstyle的BUG.</P>
<P>我以前做项目的时候也遇到过。</P> <P>后来,找了ESRI的技术支持,在用ESRI的工具MakeServerStyleset转换符号库的时候用正版的License之后就不会出错了。建议你试试。</P> |
|
2楼#
发布于:2009-07-27 18:12
<P>栅格数据能实现吗</P>
|
|
3楼#
发布于:2006-12-09 11:20
我们在AE中读取style(呵,不是serverstyle,也不是在AO中读的噢)符号库文件,在此基础上开发了类arcgis符号库管理器,如有兴趣,可以QQ联系:171567188,我发给你DEMO
|
|
|
4楼#
发布于:2006-12-07 13:29
ok
|
|
5楼#
发布于:2005-08-18 10:25
是的,9。1已经解决这个bug了
|
|
|
6楼#
发布于:2005-08-17 21:26
<P>6楼的说得对,5楼的同胞,我的符号库中已经确定有符号了</P>
<P>我在安装了Desktop的机器使用也会出现问题</P> <P>经过修改后问题解决</P> <P>但是当我将程序打包后安装到一台只有runtime的机器上后,上面提到的问题又出现了</P> <P>难道正的是ArcEngine的Bug</P> <P>郁闷 郁闷</P> |
|
7楼#
发布于:2005-08-17 09:59
我的Styles没有在arcgis\bin\styles目录下,而是直接的arcgis\styles目录下,而且里面的也全是*.ServerStyle,是不是没有装arcgis desktop的原因?
|
|
|
8楼#
发布于:2005-08-17 09:27
<P>你确定你的servestyle里已经有符号了吗?</P>
<P>你是不是没有安装arcgis desktop?</P> <P>在9。0版本没有安装arcgis desktop,arcengine显示符号是有问题的</P> |
|
|
9楼#
发布于:2005-08-16 22:43
<P>我今天晚上又进行了试验</P>
<P>我把我的符号库文件拷到arcgis\bin\styles目录下后再利用makeserverstyleset.exe工具进行转换后程序执行到</P> <P> <FONT color=#ff0033>Set pStyleItem = pEnumStyleGall.Next<BR> Do While Not pStyleItem Is Nothing</FONT><BR>不会在出现pstyleitem一直是空值</P> <P>但是在程序的运行过程中却出现了这样的问题</P> <P>参见下面这段程序红色部分</P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Private Sub RendererLayers()</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">'On Error Resume Next</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pFeatureCount As Long</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pFeature As IFeature</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pGeoLayer As IGeoFeatureLayer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pStyleStorage As IStyleGalleryStorage</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pStyleGalleryItem As IStyleGalleryItem</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pEnumStyleGalleryItem As IEnumStyleGalleryItem</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pStyleGallery As IStyleGallery</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pDefaultStyle As IStyleGalleryItem</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim SymPointColor As IRgbColor</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim SymLineColor As IRgbColor</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim SymFillColor As IRgbColor</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pdefaultsymbol As ISimpleMarkerSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pdefaultsymbol1 As ISimpleLineSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pdefaultsymbol2 As ISimpleFillSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pGeoFeaLayer As IGeoFeatureLayer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pQueryFilter As IQueryFilter</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pFeaCursor As IFeatureCursor</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim StylePath As String</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim PrendererValue As String</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim i, j, k, L, Flag As Integer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim StyleFlag, ValExit As Boolean</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pUVRenderer As IUniqueValueRenderer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">Dim pSymbolType As ISymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If pFeatureLayers(0) Is Nothing Then Exit Sub</FONT></P> <P 0cm 0cm 0pt"><p><FONT face="Times New Roman"> </FONT></p></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pStyleGallery = New ServerStyleGallery</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ' pStyleGallery.ImportStyle "D:\Program Files\ArcGIS\Styles\Esri.ServerStyle"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pStyleStorage = pStyleGallery</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> 'MsgBox pStyleStorage.FileCount</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pStyleStorage.TargetFile = "D:\Program Files\ArcGIS\Styles\symbol.ServerStyle"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> '''''''''''''''''</FONT>查找符号库</P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> For j = 0 To pStyleStorage.FileCount - 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If UCase(pStyleStorage.File(j)) = UCase(App.Path) ; "\SYMBOL.SERVERSTYLE" Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> StyleFlag = True</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Else</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> 'MsgBox pStyleStorage.File(j)</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> StyleFlag = False</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Next j</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ''''''''''''''''''''''''''''</FONT>设置默认符号</P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pDefaultStyle = New ServerStyleGalleryItem</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pdefaultsymbol = New SimpleMarkerSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pdefaultsymbol1 = New SimpleLineSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pdefaultsymbol2 = New SimpleFillSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">' If Not StyleFlag Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">' StylePath = App.Path ; "\symbol.ServerStyle"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">' pStyleStorage.AddFile StylePath</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">' End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ''''''''''''''''</FONT>设置以那个字段来作为符号化的标准,以及字段的数量</P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pUVRenderer = New UniqueValueRenderer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.FieldCount = 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Field(0) = "</FONT>名称<FONT face="Times New Roman">"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Dim pFeatureLayer As IFeatureLayer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Dim pFeatureClass As IFeatureClass</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> For i = 0 To UBound(pFeatureLayers)</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pFeatureLayer = pFeatureLayers(i)</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pFeatureClass = pFeatureLayer.FeatureClass</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Select Case UCase(pFeatureClass.AliasName)</FONT></P> <P 0cm 0cm 0pt"><p><FONT face="Times New Roman"> </FONT></p></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> '/////////////////</FONT>改进</P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Case "SDE.DBO.WNNJS"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pUVRenderer = New UniqueValueRenderer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.FieldCount = 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Field(0) = "JLX"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Case "SDE.DBO.WPPGD"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pUVRenderer = New UniqueValueRenderer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.FieldCount = 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Field(0) = "GXLX"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Case Else</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pUVRenderer = New UniqueValueRenderer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.FieldCount = 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Field(0) = "JDLX"</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ''/////////////////////////////////</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End Select</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> '////////////////////</FONT>确定当前图层是用那种符号类型</P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> 'Set pEnumStyleGalleryItem = New EnumServerStyleGalleryItem</FONT></P> <P 0cm 0cm 0pt"><p><FONT face="Times New Roman"> </FONT></p></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Select Case pFeatureClass.ShapeType</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Case 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pSymbolType = New SimpleMarkerSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Flag = 0</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pEnumStyleGalleryItem = pStyleGallery.Items("marker symbols", "", "")</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Case 3</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pSymbolType = New SimpleLineSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Flag = 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pEnumStyleGalleryItem = pStyleGallery.Items("line symbols", "", "")</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Case 4</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> GoTo 30000</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pSymbolType = New SimpleFillSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pEnumStyleGalleryItem = pStyleGallery.Items("fill symbols", "", "")</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End Select</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pGeoLayer = pFeatureLayer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pFeatureCount = pFeatureClass.FeatureCount(Nothing)</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pFeaCursor = pFeatureClass.Search(Nothing, False)</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> For k = 0 To pFeatureCount - 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Dim tempval As String</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pFeature = pFeaCursor.NextFeature</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If UCase(pFeature.Class.AliasName) = "SDE.DBO.WPPGD" Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If Not IsNull(pFeature.Value(pFeature.Fields.FindField("GXLX"))) Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> PrendererValue = Trim(pFeature.Value(pFeature.Fields.FindField("GXLX")))</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Else</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> PrendererValue = ""</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ElseIf UCase(pFeature.Class.AliasName) = "SDE.DBO.WNNJS" Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If Not IsNull(pFeature.Value(pFeature.Fields.FindField("JLX"))) Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> PrendererValue = Trim(pFeature.Value(pFeature.Fields.FindField("JLX")))</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Else</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> PrendererValue = ""</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Else</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If Not IsNull(pFeature.Value(pFeature.Fields.FindField("JDLX"))) Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> PrendererValue = Trim(pFeature.Value(pFeature.Fields.FindField("JDLX")))</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Else</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> PrendererValue = ""</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If tempval <> PrendererValue Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> tempval = PrendererValue</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ValExit = False</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Else</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ValExit = True</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Dim pValueCount As Integer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pValueCount = 0</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> For pValueCount = 0 To pUVRenderer.ValueCount - 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If pUVRenderer.Value(pValueCount) = PrendererValue Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ValExit = True</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Exit For</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Next pValueCount</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If Not ValExit Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> ' pUVRenderer.AddValue</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.AddValue PrendererValue, "</FONT>类型<FONT face="Times New Roman">", pSymbolType</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Label(PrendererValue) = PrendererValue</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Symbol(PrendererValue) = pSymbolType</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Next k</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> For L = 0 To pUVRenderer.ValueCount - 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Dim val As String</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> val = pUVRenderer.Value(L)</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> <FONT color=#ff0066> </FONT><FONT color=#ff0066>If val <> "" Then</FONT></FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"><FONT color=#ff0066> pEnumStyleGalleryItem.Reset</FONT></FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"><FONT color=#ff0066> <FONT color=#09f768> </FONT></FONT><FONT color=#09f768>Set pStyleGalleryItem = pEnumStyleGalleryItem.Next</FONT></FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"><FONT color=#ff0066> Do While Not pStyleGalleryItem Is Nothing</FONT></FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> If pStyleGalleryItem.Name = val Then</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Symbol(val) = pStyleGalleryItem.Item</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> 'Set pGeoLayer = pFeatureLayer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> 'Set pGeoLayer.Renderer = pUVRenderer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Exit Do</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Else</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Select Case Flag</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Case 0</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pGeoLayer = pFeatureLayer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set SymPointColor = New RgbColor</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> SymPointColor.RGB = vbGreen</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pDefaultStyle = New ServerStyleGalleryItem</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pdefaultsymbol = New SimpleMarkerSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pdefaultsymbol.Color = SymPointColor</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pdefaultsymbol.Size = 4</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pdefaultsymbol.Style = esriSMSCircle</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pDefaultStyle.Item = pdefaultsymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Symbol(val) = pdefaultsymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Case 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pGeoLayer = pFeatureLayer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set SymLineColor = New RgbColor</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> SymLineColor.RGB = vbGreen</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pDefaultStyle = New ServerStyleGalleryItem</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pdefaultsymbol1 = New SimpleLineSymbol</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pdefaultsymbol1.Color = SymLineColor</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pdefaultsymbol1.Width = 1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pdefaultsymbol1.Style = esriSLSSolid</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pDefaultStyle.Item = pdefaultsymbol1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> pUVRenderer.Symbol(val) = pdefaultsymbol1</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End Select</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pStyleGalleryItem = pEnumStyleGalleryItem.Next</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> <st1:place w:st="on">Loop</st1:place></FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> End If</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Next L</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pGeoLayer.Renderer = pUVRenderer</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> Set pUVRenderer = Nothing</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman">30000: Next i</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> frmmain.MapControl1.ActiveView.ContentsChanged</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> </FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> frmmain.MapControl1.ActiveView.Refresh</FONT></P> <P 0cm 0cm 0pt"><FONT face="Times New Roman"> frmmain.MapControl1.ActiveView.PartialRefresh esriViewGeography, Nothing, Nothing</FONT></P> <P>在代码中绿色部分运行时出现</P> <P>automation error</P> <P>请教版主这个问题是怎么回事</P> <P>你遇到过这样的问题吗?</P> <P>有人说是arcgis的bug是这样的吗?</P> |
|
上一页
下一页