阅读:2120回复:4
[求助]AE+C# Label标注出不来
<P>IFeatureLayer FT=lyr; </P>
<P>IGeoFeatureLayer pGeoLyr;<BR> IAnnotateLayerPropertiesCollection pLabCol;<BR> IAnnotateLayerProperties pLab;<BR> ILabelEngineLayerProperties pLabEng=new LabelEngineLayerPropertiesClass ();</P> <P> pGeoLyr = (IGeoFeatureLayer)FL;<BR> pLabCol = pGeoLyr.AnnotationProperties;<BR> <BR> pLabEng.IsExpressionSimple = true;<BR> pLabEng.Expression = comboFieldsName.Text;</P> <P> pLabEng.SymbolID = 12;<BR> <BR> pLab = (IAnnotateLayerProperties)pLabEng;<BR> pLabCol.Clear();<BR> pLabCol.Add(pLab);<BR> pGeoLyr.DisplayAnnotation = true;</P> <P>不知为什么,标注出不来?</P> |
|
1楼#
发布于:2008-07-21 17:07
<P> 谢谢,表达式改为脚本后标注真的就可以出现了。</P>
|
|
2楼#
发布于:2008-07-20 21:17
同意楼上观点,表达式为脚本形式才可以的
|
|
3楼#
发布于:2008-07-15 17:41
<P>pLabEng.Expression = comboFieldsName.Text;</P>
<P>这里出错.改为:</P> <P>pLabEng.Expression = "[" + comboFieldsName.Text + "]";</P> <P>就可以了.</P> |
|
|
4楼#
发布于:2008-07-11 16:54
<P>刷新下视图?</P>
|
|
|