阅读:1438回复:0
看看代码里面错在哪???
我的本意是想在现在的点层(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
|
|
|