第一范文网 - 专业文章范例文档资料分享平台

ArcEngine 测量 docx

来源:用户分享 时间:2025/6/4 13:53:14 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

} catch { }

}

public override void OnMouseMove(int Button, int Shift, int X, int Y) {

if (m_NewLineFeedback == null) return;

IPoint pt = m_hookHelper.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y);

m_NewLineFeedback.MoveTo(pt);

if (m_ptColl.PointCount == 0) return;

double d_Total = 0; double d_segment = 0;

IPoint lastPt = m_ptColl.get_Point(m_ptColl.PointCount - 1);

ILine line = new LineClass(); line.PutCoords(lastPt, pt); //节距离

d_segment = line.Length; _MsgInfo.Segment = d_segment; try {

IPolyline polyline = m_ptColl as IPolyline; if (polyline.IsEmpty)

{

d_Total = d_segment; } else {

d_Total = polyline.Length + d_segment; }

} catch {

}

//赋值给总长度

_MsgInfo.Total = d_Total; }

public override void OnDblClick() {

if (m_NewLineFeedback == null) return;

//绘制线与多边形几何图形时,双击结束绘制

try {

m_TraceLine = m_NewLineFeedback.Stop(); if (m_TraceLine == null) return; } catch

{ } finally {

Recycle(); } }

#endregion

//回收

public void Recycle() {

m_NewLineFeedback = null;

m_ptColl.RemovePoints(0, m_ptColl.PointCount); m_ptColl = null;

m_hookHelper.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, m_hookHelper.ActiveView.Extent); }

///

/// 从组中删除所有元素 ///

///

void RemoveElementFromGroupElement(IGroupElement groupElement) {

if (groupElement == null || groupElement.ElementCount == 0)

return; try {

IGraphicsContainer g = m_hookHelper.ActiveView.GraphicsContainer;

for (int index = 0; index < groupElement.ElementCoun

t; index++) {

IElement tmp_Ele = groupElement.get_Element(index);

if (tmp_Ele is IGroupElement)

RemoveElementFromGroupElement(tmp_Ele as IGroupElement);

else { try {

groupElement.DeleteElement(tmp_Ele); } catch {

} finally {

tmp_Ele = null; } } }

//groupElement.ClearElements(); } catch { } finally {

//刷新

IEnvelope pEnvBounds = null;

搜索更多关于: ArcEngine 测量 docx 的文档
ArcEngine 测量 docx.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c67xbo6wf2025ui718i2q_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top