04-01-2013 03:18 PM
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.
04-02-2013 03:54 AM - edited 04-02-2013 03:58 AM
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 ?
04-02-2013 08:51 AM
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.
04-02-2013 09:11 AM
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?
04-02-2013 09:12 AM
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.
04-02-2013 09:50 AM
@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.
04-02-2013 10:11 AM
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.
04-02-2013 05:08 PM
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?
04-03-2013 09:58 AM - edited 04-03-2013 09:59 AM
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.
04-03-2013 02:26 PM
@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 ?