LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Google Earth Events

Hello,

 

I am writing a program that uses the Google Earth API in LabView.  The program points to the ge .dll.  Everything works great except for the event handlers.  The LabView event handling function populates a list of potential events: "eventGEEventEmitterClick", "eventGEEventEmitterDblclick", etc.  These events never seem to trigger.  It is possible that this is Google Earth related issue but wanted to voice it here incase anyone had any ideas. 

 

 

Any advice is appreciated. 

0 Kudos
Message 1 of 12
(3,042 Views)

Hi,

 

might sound obvious, do you trigger any of these events ?

 

How do you know those are not trigerred ? Did you breakpoint the callback VI ?

 

Are you using this plugin ?

0 Kudos
Message 2 of 12
(3,005 Views)

Looking quickly at your attached code you are not perpetuating the execution. You are initialising, then clearing and then registering for an event, then exiting. Unless LabVIEW is continuously running then it will not be prepared for any events.

 

Take a look at my LabVIEW Speech VI library which uses the Microsoft Speech Synthesis and callback events to display speech progress in a text control. This will show you how to handle .NET event registration cleanly.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 12
(2,988 Views)

Thanks for the responses, fellas.

 

Bublina, I am not using that plugin.  The one I use is Google supplied.  I'm not even sure how I would impliment that version.  The downloads section is confusing.  Is there a .dll file associated with it?

 

 

0 Kudos
Message 4 of 12
(2,980 Views)

Sorry for double post.

 

Thoric,

 

Yes, I had thought of that so I ran an infinite loop in this example and it didn't seem to help.  Also, this piece of code was built from a much larger code with an event structure just for debug purposes.  The event structure in the larger code is in a loop and keeps labview executing.

0 Kudos
Message 5 of 12
(2,979 Views)

@asdlkfjalskdjf wrote:

Thanks for the responses, fellas.

 

Bublina, I am not using that plugin.  The one I use is Google supplied.  I'm not even sure how I would impliment that version.  The downloads section is confusing.  Is there a .dll file associated with it?

 

 


Could you post a link to the API ?

 

I was recently resolving similar issue and I ended up with GMap.NET and openstreetmaps.

From what I know, Google is very strict in terms of API and they only support the native javascript and the one with static tiles (unusable)
Everything else there is google prohibited and they do its best in order to supress it.

0 Kudos
Message 6 of 12
(2,971 Views)

I'm not sure what you mean.  I am using the GEPluginCoClass Object in an ActiveX container.  I'm probably under-educated on ActiveX/.NET but I was hoping that the software in the link you supplied would be linkable to LabView via a .dll that could be pointed to in an ActiveX or .NET container.  If it is C# doesn't that mean it should be .NET compatible?

 

You suggested I test it by adding a break point to the called VI.  But does that work?  In examples of the event caller (specifically one using excel), probes in the called VI's don't return anything. 

0 Kudos
Message 7 of 12
(2,966 Views)

So this is what I have for a .NET Labview GE application.  It uses the .dll supplied in the link above.  It does not run.  Although the constructor node will populate invoke nodes/ property nodes, it throws error 1172, 

 

"

Error calling method GEPlugin.GEPluginCoClassClass.start_, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.) <append><b>System.Runtime.InteropServices.COMException</b> in .NET test.vi"

 

Any ideas?

0 Kudos
Message 8 of 12
(2,938 Views)

Hi El_Cheapo,

 

Is the .dll and the VI in the same directory? This can cause some trouble if they are not. This particular exception is very vague and can mean a lot of different things. Can you call the .dll in some other simple kind of application?

 

Best,

 

-KP

 

Edits: spelling and clarification.

Kurt P
Automated Test Software R&D
0 Kudos
Message 9 of 12
(2,912 Views)

@asdlkfjalskdjf wrote:

I'm not sure what you mean.  I am using the GEPluginCoClass Object in an ActiveX container.  I'm probably under-educated on ActiveX/.NET but I was hoping that the software in the link you supplied would be linkable to LabView via a .dll that could be pointed to in an ActiveX or .NET container.  If it is C# doesn't that mean it should be .NET compatible?

 

You suggested I test it by adding a break point to the called VI.  But does that work?  In examples of the event caller (specifically one using excel), probes in the called VI's don't return anything. 


The callback VI is reentrant, it is called once the event triggers. If you put breakpoint on any wire in there, it will break in every own instance. If you put probe there, the probe will never get executed, because labview will allways spawn a new clone.

 

How did you get that DLL ? Just by installing google earth ?

0 Kudos
Message 10 of 12
(2,904 Views)