qingqibing
路人甲
路人甲
  • 注册日期2004-07-12
  • 发帖数44
  • QQ
  • 铜币282枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1857回复:2

tin中绘制等高线问题

楼主#
更多 发布于:2005-03-28 14:11
<P>我在tin中绘制一条等高线,以下是代码:</P>
<P>
''/*************************************************
''  Function:             // GetContour
''  Description:         // 以参考点InPoint绘制一条在InTinLay图层中的等高线
''  Experience:          //函数测试(正式使用)次数0
''  Calls:                   // 被本函数调用的函数清单
''  Called By:            // 调用本函数的函数清单
''  Table Accessed:  // 被访问的表(此项仅对于牵扯到数据库操作的程序)
''  Table Updated:    // 被修改的表(此项仅对于牵扯到数据库操作的程序)
''  Input:                   // InPoint:参考点
''                             // InTinLay:Tin图层
''  Output:                // 对输出参数的说明。
''  Return:                // Polyline:参考点的等高线
''  Others:                // 其它说明
''                             函数不负责保证参数的和法性
''*************************************************/
Public Function GetContour(ByVal InPoint As IPoint, ByVal InTinLay As ITinLayer) As Polyline
    Dim pTinSurface As ITinSurface
'    Dim pSurface As iSurface
    Dim pTin As ITin
    Dim ppContour As IPolyline
    
    Set pTin = InTinLay.Dataset
    Set pTinSurface = pTin
'    Set pSurface = pTinSurface</P>
<P>    ' 调用方法
    pTinSurface.GetContour InPoint, ppContour, 10
    Set GetContour = ppContour
    
    ''销毁
    Set pTinSurface = Nothing
    Set pTin = Nothing
    Set ppContour = Nothing
    
End Function</P>
<P>我在Mapctrol的Mouseup中调用该函数.</P>
<P>程序停止在" pTinSurface.GetContour InPoint, ppContour, 10"行,</P>
<P>提示:</P>
<P>Record Call Stack Sequence - Bottom line is error line.</P>
<P> ITool_OnMouseUp</P>
<P>Error Number
 -2147219394
Description
 The 3D Analyst extension has not been enabled.
</P>
喜欢0 评分0
qingqibing
路人甲
路人甲
  • 注册日期2004-07-12
  • 发帖数44
  • QQ
  • 铜币282枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2005-03-28 15:49
<img src="http://www.gisempire.com/bbs/Skins/default/topicface/face323.gif">
举报 回复(0) 喜欢(0)     评分
qingqibing
路人甲
路人甲
  • 注册日期2004-07-12
  • 发帖数44
  • QQ
  • 铜币282枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2005-03-28 14:15
<P>如果在arcmap中tool->txtensions中选择3d analyst.在vba中是正确的,</P><P>但在MapCtrol中,我不知道怎么设置该个选项.</P><P>谢谢那位遇到这个问题过吗?</P><img src="images/post/smile/dvbbs/em01.gif" />
举报 回复(0) 喜欢(0)     评分
游客

返回顶部