keithsandell

IRealTimeLog.LogFile - How to get reference?

Discussion created by keithsandell on Dec 22, 2013
Latest reply on Dec 23, 2013 by keithsandell
I have to use VBA, on 9.2, to get the Log File Location for the GPS Toolbar "Log Setup" dialog.

I have the following code that programmatically fires off the "Log Setup" dialog.

Once closed I need to get the Log File. The IRealTimeLog Interface contains the property I need to access, "LogFile." The property is an implementation of IFeatureClass.

However, any way I have tried to access IRealTimeLog.LogFile raises "Object variable or With block variable not set" or other various errors.

The result of getting the Log File, either in an IFeatureClass implementation or location on disk, will be fed into existing code that adds the shapefile to the TOC and sets the symbology.

I just need help getting a reference to the "Log File".

Private Sub UIButtonControl1_Click()
    Dim pCommandBarItem As ICommandItem
    Set pCommandBarItem = Application.Document.CommandBars.Find(ArcID.GPS_LogfileProperties)
    pCommandBarItem.Execute
    
    'What do I need to do below to get the reference?
    Dim pRealTimeFeatureClass As IFeatureClass
    Dim pRealTimeLog As IRealTimeLog
    Set pRealTimeFeatureClass = pRealTimeLog.LogFile
    
End Sub


Thanks

Outcomes