简单VBA添加线要素
来源:互联网 发布:怎么目测身高知乎 编辑:程序博客网 时间:2024/05/16 17:11
Dim pMxd As IMxDocument
Set pMxd = Application.Document
Dim pFeaturelayer As IFeatureLayer
Dim pFeatureClass As IFeatureClass
Set pFeaturelayer = pMxd.SelectedLayer
Set pFeatureClass = pFeaturelayer.FeatureClass
Dim pLine As IPointCollection
Set pLine = New Polyline
Dim pPoint1 As IPoint
Set pPoint1 = New Point
pPoint1.X = 114.529
pPoint1.Y = 37.948
Dim pPoint2 As IPoint
Set pPoint2 = New Point
pPoint2.X = 114.469
pPoint2.Y = 37.981
pLine.AddPoint pPoint1
Dim pFeature As IFeature
Set pFeature = pFeatureClass.CreateFeature
MsgBox pFeature.FeatureType
Set pFeature.Shape = pLine
pFeature.Store
MsgBox pFeature.OID
Set pMxd = Application.Document
Dim pFeaturelayer As IFeatureLayer
Dim pFeatureClass As IFeatureClass
Set pFeaturelayer = pMxd.SelectedLayer
Set pFeatureClass = pFeaturelayer.FeatureClass
Dim pLine As IPointCollection
Set pLine = New Polyline
Dim pPoint1 As IPoint
Set pPoint1 = New Point
pPoint1.X = 114.529
pPoint1.Y = 37.948
Dim pPoint2 As IPoint
Set pPoint2 = New Point
pPoint2.X = 114.469
pPoint2.Y = 37.981
pLine.AddPoint pPoint1
Dim pFeature As IFeature
Set pFeature = pFeatureClass.CreateFeature
MsgBox pFeature.FeatureType
Set pFeature.Shape = pLine
pFeature.Store
MsgBox pFeature.OID
- 简单VBA添加线要素
- ARCEngine 添加创建线要素
- AE添加设置线要素,并添加
- VBA 添加简单菜单(有分割线)
- ArcGIS VBA 标注选定的要素
- 向已有的要素图层中添加新要素(点、线)
- 简单要素类ABC
- Outlook2010 VBA添加联系人
- VBA Tips:为VBA program添加数字签名
- 图层中批量添加点要素
- vba简单循环详解
- excel VBA 简单操作
- VBA简单认识
- VBA简单基础
- AE添加设置点要素,并添加
- vba 为图片添加链接
- PowerPoint用VBA添加背景图片
- ArcEngine面要素转线要素
- Ext Js中 Ext.QuickTips的应用
- JSON的javascript调用
- Servlet 环境下取得 spring 的 ApplicationContext
- 怎麼看懂Alt+Ctrl+Delete的性能页面?
- 在Oracle的连接视图上进行数据更新操作
- 简单VBA添加线要素
- spring+ hibenate+proxool 配置两个proxool连接池时报错 Every derived table must have its own alias
- overload和override的区别
- 日出东海落西山,愁也一天,喜也一天
- 测试管理---Testlink
- 开博,留念
- c#验证错误提示
- 2008.12.11
- JVM内存调优