阅读:2927回复:7
由style转换为serverstyle文件后读取错误
<P>我利用makeserverstyleset工具成功的把一个style文件转换为了serverstyle文件,在c#加ae下也正常的显示了出来。但是在选取符号后设置到图层时却出现了问题。这个怎么办呢?我用的是ae9.1。</P>
<P> ServerStyleGallery pStyleGlry=new ServerStyleGalleryClass ();<BR> IEnumStyleGalleryItem pEnumStyle;<BR> IStyleGalleryItem pStyleItem;<BR> String pStylePath;<BR> IStyleGalleryStorage pStylStor;<BR> pStylStor=(IStyleGalleryStorage)pStyleGlry;<BR> pStylStor.AddFile (Form3.file );<BR> String spa=Form3.file ;<BR> pEnumStyle=pStyleGlry.get_Items (Form3.symbolkind ,spa,Form3.cata );<BR> pEnumStyle.Reset ();<BR> if(pEnumStyle!=null)<BR> {<BR> <FONT color=#ff0000>pStyleItem=pEnumStyle.Next ();</FONT> //运行到这个地方就出错了<BR> while(pStyleItem.Name .ToString () !=Form3.symbolname.ToString ())<BR> {<BR> pStyleItem=pEnumStyle.Next ();<BR> if(pStyleItem==null)<BR> {<BR> pStyleItem=pEnumStyle.Next ();<BR> }<BR> }</P> |
|
1楼#
发布于:2006-10-19 08:39
我们现在在AE中都不用读取serverstyle符号文件了,直接读取style符号文件了,所以类似错误是肯定不会出现的.
|
|
|
2楼#
发布于:2006-10-19 11:29
直接读取吗?
|
|
3楼#
发布于:2006-10-24 18:12
<P>怎么设置符号啊?</P>
|
|
|
4楼#
发布于:2006-10-24 20:57
QQ交流:171567188
|
|
|
5楼#
发布于:2006-12-01 23:44
<P>这个是C#的原因因为调用的是非托管的类,所以必须明确释放,使用System.Runtime.InteropServices.Marshal.ReleaseComObject((<FONT color=#ff0000>pEnumStyle</FONT>);</P>
<P><FONT color=#ff0000>pEnumStyle = null ;</FONT></P> <P><FONT color=#ff0000>即可。</FONT></P> |
|
6楼#
发布于:2007-12-21 14:25
[讨论].style文件与.serverstyle文件
<P>是不是AE9.1就不能直接调用.style文件了</P>
<P>是要必须转换为.serverstyle文件呢</P> |
|
7楼#
发布于:2007-12-28 12:04
<P>期待解决!!!</P>
|
|
|