Public Sub Anno()
Dim pActiveView As IActiveView
Dim pDoc As IMxDocument, pMap As IMap
Dim pGeoLayer As IGeoFeatureLayer
Set pDoc = Application.Document
Set pMap = pDoc.FocusMap
Set pActiveView = pDoc.FocusMap
Set pGeoLayer = pMap.Layer(0)
' MsgBox pGeoLayer.Name
Dim pAnnoProps As IAnnotateLayerPropertiesCollection
Dim pAnnoLayerProps As IAnnotateLayerProperties
Dim pPosition As ILineLabelPosition
Dim pPlacement As ILineLabelPlacementPriorities
Dim pBasic As IBasicOverposterLayerProperties
Dim pLabelEngine As ILabelEngineLayerProperties
Dim pTextSyl As ITextSymbol
Set pAnnoProps = pGeoLayer.AnnotationProperties
pAnnoProps.Clear
Set pTextSyl = New TextSymbol
Dim pFont As stdole.StdFont
Set pFont = New stdole.StdFont
pFont.Name = "verdana"
pFont.size = 12
pTextSyl.Font = pFont
pTextSyl.Color =new HsvColor(250, 160, 200)
Set pPosition = New LineLabelPosition
pPosition.Parallel = False
pPosition.Perpendicular = True
Set pPlacement = New LineLabelPlacementPriorities
Set pBasic = New BasicOverposterLayerProperties
pBasic.FeatureType = esriBasicOverposterFeatureType.esriOverposterPolyline
pBasic.LineLabelPlacementPriorities = pPlacement
pBasic.LineLabelPosition = pPosition
Set pLabelEngine = New LabelEngineLayerProperties
Set pLabelEngine.Symbol = pTextSyl
Set pLabelEngine.BasicOverposterLayerProperties = pBasic
pLabelEngine.Expression = "[44]"
Set pAnnoLayerProps = pLabelEngine
pAnnoProps.Add pAnnoLayerProps
pGeoLayer.DisplayAnnotation = True
pGeoLayer.DisplayField = pLabelEngine.Expression
pActiveView.Refresh
分享到:
相关推荐
AO3415中文资料AO3415中文资料
AO3416中文资料AO3416中文资料
c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO开发代码c#+AO...
这儿的开放性是指在开发环境的选择上可以有VBA、VB、VC++、DEPHI等多种支持COM标准的开发工具,而扩展性是指AO组件没有提供的功能,如需要定义一种新的数据格式,你就可以利用COM技术来写自己的COM组件,对AO组件库...
AO开发入门--AO二次开发入门好教程,真的特别号哦
烘焙AO
AO插件
AO资料AO资料AO资料
AO学习资料 AO学习资料 AO学习资料
AO开发10.2,针对江西理工大学兰小机的ao开发那本书
澳泰自动化AO910-AO910W压力变送器pdf,澳泰自动化AO910-AO910W压力变送器:AO910 系列扩散硅压力变送器采用具有国际先进水平的传感器,配合高精度电子元件,经严格的工艺过程装配而成。它采用无中介液的压力测量技术...
一键渲染通道图 ao图插件 3dmax插件
基于AO的ArcGIS二次开发——AO程序设计入门,
AO系统中所有菜单 都包括在上面了哈 AO系统中所有菜单 都包括在上面了哈AO系统中所有菜单 都包括在上面了哈AO系统中所有菜单 都包括在上面了哈AO系统中所有菜单 都包括在上面了哈AO系统中所有菜单 都包括在上面了哈
The AO3400 uses advanced trench technology to provide excellent RDS(ON), low gate charge and operation with gate voltages as low as 2.5V. This device is suitable for use as a load switch or in PWM ...
绿色风格的ao后台,静态页面模型,希望对你有帮助!
面向AO编程的必经之路
该文档大部分内容都来源于网上 为了更好的方便大家对 AO的学习, 本人把自己在网上收集的 AO 学习经整理贡献出来。 希望学习 AO的朋友通过这份文档对 AO的学习有一定的帮助。 愿 :所有学习 AO的朋友们不在郁闷.
AO工程项目代码全集,包含了超过一万行的AO开发常用代码,从基础到高级,对于初学者,这是一部入门到高级的很好教材,对于熟悉AO开发的人员,也可以从中学习汲取到很多的实用技巧,虽然分是多了点,可是肯定物有所值...
电信设备-循环式AO移动床生物膜反应器.zip