in reply to Re^3: Controlling Google Earth via COM interface
in thread Controlling Google Earth via COM interface

How would you use that in VB?

I don't use VB so I don't know the syntax in that language, but in C++, this works:
CoInitialize(NULL); IApplicationGEPtr smpGoogleEarth(__uuidof(ApplicationGE)); pCIGE = smpGoogleEarth->GetCamera(false); // (try/catch block left out +) pCIGE->Range = 500.;

Replies are listed 'Best First'.
Re^5: Controlling Google Earth via COM interface
by planetscape (Chancellor) on Jun 13, 2009 at 12:16 UTC
      Is the decimal point significant? Looks to me like Range is of type double.

      Just as an experiment, I added the decimal point to the two test cases from my first post and it made no difference, so that kind of type mismatch wasn't the problem. Thanks for the suggestion, though, it was a good hypothesis.
Re^5: Controlling Google Earth via COM interface
by Anonymous Monk on Jun 13, 2009 at 12:28 UTC
    Sorry, I don't c++, and Win32::OLE documentation only shows VB to perl equivalent syntaxt. Did you try my guess?
      Did you try my guess?

      I just now got the chance (rechargeable mouse batteries choose to die at very inconvenient times). Both forms work, and I made Google Earth move the camera to the new location, so I'm good to go. I haven't worked with Perl much yet, so I'll have to study your example to make sure I understand why it worked and my other form didn't. Many thanks for the help.

      Either of these works to set Range:
      $cameraInfo->{Range}= 500; $cameraInfo->LetProperty( Range => 500);