Getting "Script Error 800A01B6" error message when you try to collect the points

1347
1
Jump to solution
05-30-2013 09:28 AM
SrinivasaKandula
New Contributor II
Getting "Script Error 800A01B6" error message when you try to collect the points when GPS is active.
Complete error message as follows:

Script Error 800A01B6 Error
Source Unavailable Error
Description Unavailable
[Line: 19, Column: 5]
Source Text Unavailable

We are not getting the above error message when you get the axf file for the First time.
When you open for the .apm file for the first time in ArcPAD I am able to collect as many point  as I need when the GPS is active. But when I tried to Synchronize Data with ArcGIS Server it is failing to Sync.
I have exited the ArcPAD and tried Synchronize Data with ArcGIS Server again then it Synced sucessfully and the collected features were created in SDE database.
But when I tried to collect the points againg after reopening the .apm file I am getting the error message.
The VB Script code which I am using is as follows:

Option Explicit
Sub GetWorkRequestInfo

Application.Timer.Interval = 100 'milliseconds
Application.Timer.Enabled = True
Dim dblx, dbly
If GPS.IsValidFix Then
  dblX = GPS.X
  dblY = GPS.Y
Else
  dblX = Map.PointerX
  dblY = Map.PointerY
End If
Application.Timer.Enabled = False
Call Map.IdentifyXY(dblX,dblY)
IF GPS.Properties("PDOP") > 0
Then Map.Layers.Item(1).Forms("EditForm").fields("WORKREQUESTID").Value = Map.Layers.Item(2).Forms("EditForm").fields("WORKREQUESTID").Value
Map.Layers.Item(1).Forms("EditForm").fields("PDOP").Value = CDbl(GPS.Properties("PDOP"))
Map.Layers.Item(1).Forms("EditForm").fields("HDOP").Value = CDbl(GPS.Properties("HDOP"))
Map.Layers.Item(1).Forms("EditForm").fields("EPE").Value = CDbl(GPS.Properties("EPE"))
Map.Layers.Item(1).Forms("EditForm").fields("HPE").Value = CDbl(GPS.Properties("HPE"))
ELSE
Map.Layers.Item(1).Forms("EditForm").fields("WORKREQUESTID").Value = Map.Layers.Item(2).Forms("EditForm").fields("WORKREQUESTID").Value
Map.Layers.Item(1).Forms("EditForm").fields("PDOP").Value = 0
Map.Layers.Item(1).Forms("EditForm").fields("HDOP").Value = 0
Map.Layers.Item(1).Forms("EditForm").fields("EPE").Value = 0
Map.Layers.Item(1).Forms("EditForm").fields("HPE").Value = 0
END IF
Map.Layers.Item(2).Forms("EditForm").Close
Application.Timer.Enabled = True
set dblX = Nothing
set dbly = Nothing
Application.ExecuteCommand("clearselected")
Map.Refresh(True)
Exit Sub

End Sub
I am calling the above function in the onload event of the page as follows:
Call GetWorkRequestInfo

I am attaching the LocSurvey_Accuracy.zip file which contains the .axf files and .vbs file.

Our Environment is as follows:
ArcPAD 10.0.4.4
VB Script
Trimble GeoXH ??? GEOEXPLORER 6000 SERIES Or Panasonic CF-H2 Tough book.

Please help us to fix the issue.
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
SrinivasaKandula
New Contributor II
I am able to fix the issue

It is the improper casting causing the issue.

I have replace the following line of code to fix the issue.

Map.Layers.Item(1).Forms("EditForm").Fields("WORKREQUESTID").Value = Map.Layers.Item(2).Forms("EditForm").Fields("WORKREQUESTID").Value

to

Map.Layers.Item(1).Forms("EditForm").Fields("WORKREQUESTID").Value = CStr(Map.Layers.Item(2).Forms("EditForm").Fields("WORKREQUESTID").Value)

I am getting numeric values from work request polygon and trying to store it in text field type without converting it to string.

View solution in original post

0 Kudos
1 Reply
SrinivasaKandula
New Contributor II
I am able to fix the issue

It is the improper casting causing the issue.

I have replace the following line of code to fix the issue.

Map.Layers.Item(1).Forms("EditForm").Fields("WORKREQUESTID").Value = Map.Layers.Item(2).Forms("EditForm").Fields("WORKREQUESTID").Value

to

Map.Layers.Item(1).Forms("EditForm").Fields("WORKREQUESTID").Value = CStr(Map.Layers.Item(2).Forms("EditForm").Fields("WORKREQUESTID").Value)

I am getting numeric values from work request polygon and trying to store it in text field type without converting it to string.
0 Kudos