Explorer2000
Posts: 10
Joined: Sun Sep 18, 2005 7:29 pm

run time error in getting speed variable

Sat Feb 25, 2006 12:09 pm

run-time error 91
object variable or with block variable not set


code....

Dim objmove As NmeaRMC
Label3.Caption = objmove.GroundSpeed(2)

...........



winxp,gpstools 2.20l,vb6
parsing rmc data only

User avatar
johan
GpsGate
Posts: 15429
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: run time error in getting speed variable

Sat Feb 25, 2006 12:27 pm

You must set a variable to an object before you can use it.

In general terms this works:

Code: Select all

Dim objPos As New Position
objPos.Latitude = 34
But this does not work:

Code: Select all

Dim objPos As Position
objPos.Latitude = 34
Another error you have is that the NmeaRMC object cannot be created, you can only get it from the NmeaParser.RMC event.

If you want the grouns speed, you should take a look at NmeaParser.GetGpsFix:
http://franson.com/gpstools/reference_manual.asp?comp=tools&class=NmeaParser&item=GetGpsFix&platform=win32

Or NmeaParser.OnGpsFix:
http://franson.com/gpstools/reference_manual.asp?comp=tools&class=NmeaParser&item=OnGpsFix&platform=win32

A good startingpoint is to take a look at the SerialPort sample in the SDK


Regards,
Johan

Franson Support

Explorer2000
Posts: 10
Joined: Sun Sep 18, 2005 7:29 pm

RE: run time error in getting speed variable

Sat Feb 25, 2006 1:22 pm

[:)][:)][:)][:)][:)][:)][:)][:)]

Thank you very much.
problem solved.
thanks for your prompt reply.

[:D][:D][:D][:D][:D][:D][:D][:D][:D][:D]

Return to “GpsTools”