clearsky1973
路人甲
路人甲
  • 注册日期2004-03-03
  • 发帖数16
  • QQ
  • 铜币150枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1502回复:1

如何在arcEngine中标注字段属性数据

楼主#
更多 发布于:2005-06-08 10:10
利用VB.net和arcEngine中开发地图,在PageLayout中如何标准字段属性.比如我想在地图中通过选择标注"姓名"或年龄.
喜欢0 评分0
gzstyxb
路人甲
路人甲
  • 注册日期2004-09-22
  • 发帖数358
  • QQ
  • 铜币1045枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2005-11-28 10:45
<P>我在VC里面调试通过的代码。</P>
<P>IGeoFeatureLayerPtr pGeoLyr;<BR> IAnnotateLayerPropertiesCollectionPtr pLabCol;<BR> IAnnotateLayerPropertiesPtr pLab;<BR> ILabelEngineLayerPropertiesPtr pLabEng;<BR> <BR> ILayerPtr ipLayer = m_MapControl.GetLayer(0);<BR> IFeatureLayerPtr ipFLayer = ipLayer;<BR> pGeoLyr = ipFLayer;<BR>  <BR> pGeoLyr->get_AnnotationProperties(;pLabCol);<BR> pLabEng.CreateInstance(CLSID_LabelEngineLayerProperties);<BR> pLabEng->put_Expression(CComBSTR("[单位]"));<BR> pLabEng->putref_Symbol(GetTextSymbol(12)); <BR> pLabEng->put_IsExpressionSimple(VARIANT_TRUE);<BR> pLab = pLabEng;<BR> pLabCol->Clear();<BR> pLabCol->Add(pLab); </P>
<P> pGeoLyr->put_DisplayAnnotation(VARIANT_TRUE);<BR> IActiveViewPtr ipActiveView = m_MapControl.GetActiveView();<BR> ipActiveView->Refresh();  </P>
由爱故生忧, 由爱故生怖. 若离于爱者, 无忧亦无怖.
举报 回复(0) 喜欢(0)     评分
游客

返回顶部