请问高手怎样提取地形图中无高程属性的地形点高程?
<p>如果电子地形图上的高程点没有高程属性,即只有X\Y值,没有Z值,也就是Z值是在图面上用文本表示的,那怎样将地形点提出X\Y\Z值呢?请问高手 ,谢谢</p> 发个图来看看,或许有办法! 期待解决 <p>我也想知道这个 不知道有人可以解决吗 </p><p> </p> <strong><font size="2">获取CAD中图元的坐标软件(提供源代码C#)</font></strong> gzxl发表于2010-7-22 0:07:00static/image/common/back.gif获取CAD中图元的坐标软件(提供源代码C#)
<p>不懂 。。。。。。。。</p> xy值直接提取,z值选取数值附加到xy后面 期待解决! <p><font face="Verdana"> <font face="Verdana">提取无属性小数点的高程点</font></font></p>
<p><font face="Verdana"></font> </p>
<p><font face="Verdana">Set acadApp = GetObject(, "AutoCAD.Application")<br/> If Err Then<br/> Err.Clear<br/> Set acadApp = CreateObject("AutoCAD.Application")<br/> If Err Then End<br/> End If<br/> acadApp.Visible = True<br/> Dim acadDoc As AcadDocument<br/> acadApp.WindowState = acMax<br/> Set acadDoc = acadApp.ActiveDocument<br/> Set Excel = GetObject(, "Excel.Application")<br/> Set xlSheet = Excel.ActiveWorkbook.Sheets("sheet1")<br/> <br/> Dim sjx As AcadSelectionSet<br/> Set sjx = acadDoc.SelectionSets.Add("ss10")<br/> sjx.SelectOnScreen<br/> h = sjx.Count<br/> h = 0<br/> For i = 0 To h - 1 '删除所有的选择集<br/> Set ssetObj = acadDoc.SelectionSets.Item(0)<br/> ssetObj.Delete<br/> Next i<br/> <br/> Dim FilterType(1) As Integer<br/> Dim FilterData(1) As Variant<br/> FilterType(0) = 0<br/> FilterData(0) = "text" '是圆<br/> FilterType(1) = 8<br/> FilterData(1) = "shuju" '图层是0<br/> Dim mode As Integer<br/> mode = acSelectionSetAll<br/> sjx.Select mode, , , FilterType, FilterData<br/> <br/> k = 1<br/> Dim entry As AcadEntity<br/> Dim point As Variant<br/> Dim hjx As String<br/> <br/> For Each entry In sjx<br/> If entry.ObjectName = "AcDbText" Or entry.ObjectName = "AcDbMText" Then<br/> point = entry.InsertionPoint<br/> hjx = entry.TextString<br/> <br/> xlSheet.Cells(k, 1) = Format(point(0), "##0.000")<br/> xlSheet.Cells(k, 2) = Format(point(1), "##0.000")<br/> xlSheet.Cells(k, 3) = Format(hjx, "##0.0")<br/> k = k + 1<br/> End If<br/> Next entry</font></p> <p>先计算高程注记的矩形框,求矩形框的中心点,查找离矩形框中心点最近的高程点匹配,此方法可以匹配出大部分的高程点的Z值,其余的就只能手工匹配了</p>