0
我使用以下腳本從一個圖層獲取宗地和地址信息,以填充新創建的要素的屬性表。ArcPad - VBscript - Autopopulate屬性
沒有返回錯誤,但我遇到的問題是,似乎有錯誤的信息卡在記錄選擇功能的內存中。無論我在哪裏放置一個點,它都會給出相同的包裹#和地址。或者,也許它實際上不是正確執行IF功能。
Sub Address
Dim rsCurrentXY
Set rsCurrentXY = Map.Layers("Violations").records
rsCurrentXY.movelast
Dim objXYShape
Set objXYShape = rsCurrentXY.Fields.Shape
Dim pControls
Set pControls= Application.Map.selectionlayer.Forms("EDITFORM").Pages(「PAGE1」).Controls
Dim rsGrid
' Find corresponding map page to the valve point
Set rsGrid = Map.Layers("ACPA_parcels").records
rsGrid.movefirst
Do While Not rsGrid.eof
If rsGrid.fields.shape.Ispointin(objXYShape) Then
pControls("txtAddress").value = rsGrid.Fields("ADD1").Value
Exit Do
End If
rsGrid.Movenext
Loop
' Clean Up
Set rsCurrentXY = Nothing
Set objXYShape = Nothing
Set rsGrid = Nothing
End Sub
(我有一個名爲「PIN」另一個子程序,會做同樣的事情。) 我當自定義窗體各自的編輯框檢查員激活叫他們。
感謝您的幫助, 羅伯特
http://forums.arcgis.com/threads/65742-Filling-in-atrributes-for-a-point-layer-from-a-underlying-polygon-layer ?p = 228353&posted = 1#post228353 – user1631426
http://forums.arcgis.com/threads/65742-Filling-in-atrributes-for-a-point-layer-from-a-underlying-polygon-layer?p=228353&posted = 1#post228353 – user1631426