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

How would you use that in VB?
$cameraInfo->{Range}= 500; $cameraInfo->->LetProperty( Range => 500);

Replies are listed 'Best First'.
Re^4: Controlling Google Earth via COM interface
by jjorsett (Initiate) on Jun 13, 2009 at 10:29 UTC
    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.;
        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.
      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);