阅读:1577回复:4
Heip!!!VB+MapX的程序在运行中出现的问题
诸位大虾请救命!我运行下列一段程序出现"Run-time error 1004 no object was found using the index you specified " 急待你的解围.在线恭候.谢谢。
Dim arrVals As Variant Dim obj As MapXLib.Feature Dim iNodeCnt As Integer Dim NodesLBound As Integer Dim NodesUBound As Integer Dim PolysLBound As Integer Dim PolysUBound As Integer Set obj = Map1.Layers("Semple").Selection(1) -------此句有错 arrVals = obj.Nodes NodesLBound = LBound(arrVals, 1) NodesUBound = UBound(arrVals, 1) PolysLBound = LBound(arrVals, 2) PolysUBound = UBound(arrVals, 2) For i = PolysLBound To PolysUBound Debug.Print "Begin Poly #"; i iCoordCnt = arrVals(NodesLBound, i) * 2 For j = NodesLBound + 1 To iCoordCnt Step 2 Debug.Print "Pt#"; j / 2; "("; arrVals(j, i); ","; arrVals(j + 1, i); ")" Next j Debug.Print "End Poly #"; i Debug.Print "" Next i <img src="images/post/smile/dvbbs/em09.gif" /><img src="images/post/smile/dvbbs/em09.gif" /> |
|
1楼#
发布于:2004-02-01 15:00
错误是,在你指定的图层上没有指定的对象!
|
|
2楼#
发布于:2004-02-01 16:58
谢谢斑竹,我还不明白,图层上有呀!请指教。
|
|
3楼#
发布于:2004-02-02 09:05
昨天,在QQ上已经解决了!
在这里,我就不重复了! |
|
4楼#
发布于:2004-02-02 14:20
再次感谢斑竹!
|
|