eagling
路人甲
路人甲
  • 注册日期2004-10-21
  • 发帖数126
  • QQ
  • 铜币540枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1321回复:0

看看代码里面错在哪???

楼主#
更多 发布于:2007-03-21 09:04
我的本意是想在现在的点层(point)上根据自己输入的坐标添加新的点,  可是运行后出现“自动化(Automation)错误”,高手能否解答下是怎么回事?????<BR>sub addpoint()<BR>Dim pPoint As IPoint<BR>  Dim x, y<BR>  Set pPoint = New Point<BR>  Set x = UserForm3.TextBox1   ‘自己输入坐标<BR>  Set y = UserForm3.TextBox2<BR>  pPoint.PutCoords x, y<BR>  <BR>  Dim pEditor As IEditor<BR>  Dim pID As New UID<BR>  Dim pEditsketch As IEditSketch<BR>  <BR>  'Get a reference to the editor extension<BR>  pID = "esriEditor.Editor"<BR>  Set pEditor = Application.FindExtensionByCLSID(pID)<BR>  Set pEditsketch = pEditor<BR>  <BR>  pEditsketch.AddPoint pPoint, True<BR>end sub
喜欢0 评分0
中国GIS的未来,要靠GIS农民创造.
游客

返回顶部