阅读:3314回复:8
关于ArcEngine符号库的问题
<P>我们在使用符号库的过程中,发现在ArcEngine下不提供StyleGallery coclass,这样的话,只提供ServerStyleGallery coclass来实现IStyleGallery接口来访问符号库.而对于ServerStyleGallery ,只能访问扩展名为ServerStyle的符号库,所以现在的扩展名为Style的符号库要做进一步的转换,经查找资料获悉,ESRI提供了一个MakeServerStyleSet.exe工具(在ArcGIS的Develope kit下的tools目录)来做这个转换工作,但是我们使用做这个转换时,发现转换后的符号库文件不能正常使用,选择了多个style文件进行转换,观察其文件大小都为8k,显然有问题.</P>
<P>求解.</P> |
|
1楼#
发布于:2005-05-25 09:19
<P>是会出现那样的问题</P><P>你有没把style文件放到arcgis的符号目录里?</P>
|
|
|
2楼#
发布于:2005-07-29 11:49
<img src="images/post/smile/dvbbs/em05.gif" />
|
|
3楼#
发布于:2005-08-16 22:30
<P>对,把文件放在arcgis\bin\styles目录下</P>
<P>就可以使用工具进行转换了文件也不会出现问题</P> <P>但是不知道搂主是否遇到了这样的问题</P> <P><FONT color=#ff0066>pEnumsStyleItem.Reset</FONT></P> <P><FONT color=#ff0066>set pStyleItem=pEnumStyleItem.Next</FONT></P> <P><FONT color=#ff0066>出现错误</FONT></P> <P><FONT color=#ff0066>automation error</FONT></P> <P>然后程序终止</P><br> [此贴子已经被作者于2005-8-16 22:32:09编辑过]
|
|
4楼#
发布于:2005-08-16 23:44
我这把文件放在arcgis\bin\styles目录下,仍然是提示"You must select a Style Set Directory"怎么回事?
|
|
5楼#
发布于:2005-08-17 01:18
晕,我的Styles没有在arcgis\bin\styles目录下,而是直接的arcgis\styles目录下,而且里面的也全是*.ServerStyle,是怎么回事?
|
|
|
6楼#
发布于:2005-08-17 21:29
<P><STRONG><FONT face=Verdana color=#61b713>alex_zl 你的问题我也遇到了,但是我换了一台机器后就没有了,具体是怎么回事,我也不清楚</FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>木白林 你的问题是因为没有安装desktop的原因</FONT></STRONG></P> |
|
7楼#
发布于:2005-12-05 11:40
<P>Private Sub ApplyCmd_Click()<BR> Dim txtField As String<BR> Dim pTable As ITable<BR> Dim pQueryFilter As IQueryFilter<BR> Dim pCursor As ICursor<BR> Dim pNextRow As IRow<BR> Dim pNextRowBuffer As IRowBuffer<BR> Dim codeValue, txtValue As Variant<BR> Dim fieldNumber As Integer<BR> txtField = Combo1.Text<BR> <BR> Dim pUniqueValueRenderer As IUniqueValueRenderer<BR> Dim pRen As ISimpleRenderer<BR> Dim pEnum As IEnumStyleGalleryItem<BR> Set pEnum = pStyleGallery.Items("Marker Symbols", "C:\Program Files\ArcGIS\Bin\Styles\ESRI.style", "")<BR> pEnum.Reset<BR> Set pRen = New SimpleRenderer<BR> Dim pItem As IStyleGalleryItem<BR> Set pItem = pEnum.Next<BR> Dim sName As String<BR> Dim pMarkSymbol As IMarkerSymbol<BR> Do While Not pItem Is Nothing<BR> sName = pItem.Name<BR> If sName = List2.Text Then<BR> Set pRen.Symbol = pItem.Item<BR> End If<BR> Set pItem = pEnum.Next<BR> Loop<BR> Set pUniqueValueRenderer = New UniqueValueRenderer<BR> pUniqueValueRenderer.FieldCount = 1<BR> pUniqueValueRenderer.Field(0) = Combo1.Text<BR> <BR> Set pTable = pGeoLayer<BR> fieldNumber = pTable.FindField(txtField)<BR> Set pQueryFilter = New QueryFilter<BR> pQueryFilter.AddField txtField<BR> Set pCursor = pTable.Search(pQueryFilter, True)<BR> Set pNextRow = pCursor.NextRow<BR> <BR> Do While Not pNextRow Is Nothing</P>
<P> ' QI the row buffer from the row and get the value<BR> Set pNextRowBuffer = pNextRow<BR> codeValue = pNextRowBuffer.Value(fieldNumber)<BR> If codeValue = List1.Text Then<BR> pUniqueValueRenderer.AddValue codeValue, "", pRen.Symbol<BR> End If<BR> <BR> Set pNextRow = pCursor.NextRow<BR> Loop<BR> Set pGeoLayer.Renderer = pUniqueValueRenderer<BR> EngineForm.MapControl1.ActiveView.PartialRefresh esriViewGeography, pGeoLayer, Nothing<BR> EngineForm.TOCControl1.Update</P> <P>End Sub</P> |
|
8楼#
发布于:2005-12-12 15:55
扩展名为Style的也可以在ArcEngine里面使用的。不过,我是在Engine里面通过调用ArcMap的功能实现的。
|
|
|